From patchwork Mon Aug 15 22:51:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9282283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9B806086A for ; Mon, 15 Aug 2016 22:53:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACC1628EA3 for ; Mon, 15 Aug 2016 22:53:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A195128EA4; Mon, 15 Aug 2016 22:53:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5D88B28EA5 for ; Mon, 15 Aug 2016 22:53:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZQjj-0003Xj-25; Mon, 15 Aug 2016 22:52:03 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZQjd-0003U4-Cs for linux-arm-kernel@lists.infradead.org; Mon, 15 Aug 2016 22:51:58 +0000 Received: by mail-pf0-x242.google.com with SMTP id h186so4362446pfg.2 for ; Mon, 15 Aug 2016 15:51:37 -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=nrmXTwpvqd0wKAWbX6Zn5d5V6rx6eRwVduL+PY60mW8=; b=UX7r99jU5UX8WDHzHyLUgllkyBiHRShNDGspWt+UIyQXpp4mOqhkFJEX6i6ERds+V7 GsFgHzcSnqsM+T/Bpy9LxGCqXzqiTE8EKoKzA97BbRpc96fYBuA636x8doYOF+OkmOvF eDafi0e73al00M1wePqn3yy14rBI/pIZIcHFuuVDdhUjQjcHBiGuj4vw+2E8iiv5i3Sw YhskoOx4xFV5KW11IlgNEe4RRRaFg+DY9oNzEDVdVKQAGU3tD78W2edRzbNhgMHvdu0O umTABOBvQ7FOKZV9pgGk0KvdVXUrxzzoQ7vZiuJQbQd6cvp44Rb2DLkdujO/zIlLTYBG xDtw== 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=nrmXTwpvqd0wKAWbX6Zn5d5V6rx6eRwVduL+PY60mW8=; b=e8rYK7csRPwVHEvPL+pivVXwoXo8x16J8O0z3Ja4aIsjVNghVEjsSI01ErUDmOi6fa gZFyq+zIwTdqvfW9Y1cy2yjN9DrKf/mbqDnvsMYTfdSV3gLOWZSu1JSEFhuw0t7naYJz rHKQP1T6mU0tNX41L0/LQpTvXALcFeWmvf/MjogxmAsajbpph1t5XnX4rLLQr/9k2rpk EJd+71iAut9GvzHhZL2E6JRZKhlfHp3hW/8cmIEtp6smm4pF/63nHnaxlWAiyBEm20ZL j8LJhe4Vqf5NVkgvdsQRvTTQioCtyRa/mPUvUuDsvHpuDk52wUYOOYRYL1CnkziQ866T lYJQ== X-Gm-Message-State: AEkooutxgGZAcLvxTuAwJTjrc2WxjLb3WTuPubMiw1Yt/QJjlNaRVg4/KX697eJJG9Mi4A== X-Received: by 10.98.59.70 with SMTP id i67mr6367406pfa.45.1471301496723; Mon, 15 Aug 2016 15:51:36 -0700 (PDT) Received: from bogon.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id t7sm33927934paz.21.2016.08.15.15.51.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Aug 2016 15:51:36 -0700 (PDT) From: Wei Yongjun To: Sunil Goutham , Robert Richter Subject: [PATCH -next] net: thunderx: Remove unnecessary pci_set_drvdata() Date: Mon, 15 Aug 2016 22:51:29 +0000 Message-Id: <1471301489-24888-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160815_155157_499260_418405BE X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c index 9210d04..67befed 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_xcv.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_xcv.c @@ -194,7 +194,6 @@ err_release_regions: err_disable_device: pci_disable_device(pdev); err_kfree: - pci_set_drvdata(pdev, NULL); devm_kfree(dev, xcv); xcv = NULL; return err; @@ -211,7 +210,6 @@ static void xcv_remove(struct pci_dev *pdev) pci_release_regions(pdev); pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); } static struct pci_driver xcv_driver = {