From patchwork Tue Jul 26 04:58:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 652912 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rzVJy5CmQz9stY for ; Wed, 27 Jul 2016 06:36:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=a/LkfAAU; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 574978B6EE; Tue, 26 Jul 2016 20:36:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B3acs2mXGhzP; Tue, 26 Jul 2016 20:36:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 531AB8B6B9; Tue, 26 Jul 2016 20:36:29 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A34871C0F89 for ; Tue, 26 Jul 2016 14:58:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9B7A689816 for ; Tue, 26 Jul 2016 14:58:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kcBWhhINg1Xm for ; Tue, 26 Jul 2016 14:58:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f66.google.com (mail-pa0-f66.google.com [209.85.220.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0267F88A36 for ; Tue, 26 Jul 2016 14:58:39 +0000 (UTC) Received: by mail-pa0-f66.google.com with SMTP id hh10so114224pac.1 for ; Tue, 26 Jul 2016 07:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=u3oNDwSmVvPhawITjUyNXSIkTFm5crHp4Aux9nVDs+U=; b=a/LkfAAUyFuKhHaNtV1+VeF2Z0wYfely41M2yI+9s5i14V2RbsHaC+20+rkvAIL3mq FEMY7b+LdSq5l5VspsIk66zc8FHUflx0VODmVq2WCt83It9fPnCtMvG2qf8QSKh8zqvB 02bmOfIMTdfvSGXoE6GV+omnlY/qetLn65hvthAGZpscj7XUmXryPFxUUV+heHymYF9Z ZFTyQ4JMeNqz9eNRmmwVhCfByDuihfghp+PtTWBErw4GBaPYu8iP94Ze4yTr51hJHNGk yDEL/gRIOPtYIHs8SLycAPIZQwh/DcQD4ph8G6iaXWeJxz+knPLnVUeV3fsAY91xsle8 V0NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=u3oNDwSmVvPhawITjUyNXSIkTFm5crHp4Aux9nVDs+U=; b=X2x5EMSS+4Prm5NgMzA859d/0UcG6NTT9lJm2/JBBbJ2ZMU9X/zNo8sFf5ck+N9coy tah9DntKx5zRyzJufE2PpCZjE2a18VtJDW/eak+yBU8FVHCe7y5gnCh+j0vR6aAs2TE1 58xZpsvseVuKy3KLSpsiFI6jDJFwVJtXF2ambJEEP+AKBgSWB1zr3NTYZTuyvCZ/QSw2 aEmWCagAdhLZVL3lrqwdf4QvF0lkN9H9CVidAjJMmUxK5v2XUl7vCribrWUOnCp7odxW expCP7W1rBib47M8bXrzUQpVAl45BwyeXb5Ibaj6D2e6RKbOfZzj3Ry7l4vOoEEcVk4m 71fg== X-Gm-Message-State: AEkoouuHhdzvUKXWmvHfZqamhCK0gqfNqAs2evNOnaCqqfFWomtY52/Mz8nQUA5KL85FMw== X-Received: by 10.66.138.74 with SMTP id qo10mr40063294pab.135.1469545118644; Tue, 26 Jul 2016 07:58:38 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id d2sm2346175pat.6.2016.07.26.07.58.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 07:58:38 -0700 (PDT) From: Wei Yongjun To: Jeff Kirsher Date: Tue, 26 Jul 2016 14:58:30 +0000 Message-Id: <1469545110-32553-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 26 Jul 2016 20:36:27 +0000 Cc: intel-wired-lan@lists.osuosl.org, Wei Yongjun , netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH -next] i40e: Use list_move instead of list_del/list_add X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun Tested-by: Andrew Bowers --- drivers/net/ethernet/intel/i40e/i40e_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c index e1370c5..e6b9263 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_client.c +++ b/drivers/net/ethernet/intel/i40e/i40e_client.c @@ -662,8 +662,7 @@ static int i40e_client_release(struct i40e_client *client) client->name, pf->hw.pf_id); } /* delete the client instance from the list */ - list_del(&cdev->list); - list_add(&cdev->list, &cdevs_tmp); + list_move(&cdev->list, &cdevs_tmp); atomic_dec(&client->ref_cnt); dev_info(&pf->pdev->dev, "Deleted client instance of Client %s\n", client->name);