From patchwork Mon Oct 17 15:04:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9379557 X-Patchwork-Delegate: bhelgaas@google.com 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 E80A2607D4 for ; Mon, 17 Oct 2016 15:05:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D979029305 for ; Mon, 17 Oct 2016 15:05:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE1A229309; Mon, 17 Oct 2016 15:05:11 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDDFD29306 for ; Mon, 17 Oct 2016 15:05:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933512AbcJQPFC (ORCPT ); Mon, 17 Oct 2016 11:05:02 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:36628 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934300AbcJQPFA (ORCPT ); Mon, 17 Oct 2016 11:05:00 -0400 Received: by mail-pa0-f66.google.com with SMTP id os4so5252610pac.3 for ; Mon, 17 Oct 2016 08:05:00 -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=DCEDgwgsLuO4mPzisp0hprW/jmMeCBLSgQYbJI3pDXs=; b=K7yNANeeq5E+NXPKIYL4PeVWz1A3XAWoKzCdJ3u4wqaTYUqsH8CSZfS8GuRqD1eQyG 97WN53XCOamDkR6FLV1zSwP+Pkll/1l2I3qGdYOYrtkVwMJslUktROF1JILz/nQukmU1 pGaiZdKyRXpFe/cexqsQvYy0joldP/dAoKBBaJX301+hpXCVpDp4Q1iN8j0s/BWzdmju rDLE70EvAW11aXBpB//uICJ8N1RGcpWQUGmgqxrZnjYHwCaRy8QW6RX12bKduauHfxke bi0AWBGiVfRLeJL3G30+sLXEIIc1I2NcJELCvukvB3ujcko5EMI9JjT0mUY8xBOk6ZC5 4oPA== 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=DCEDgwgsLuO4mPzisp0hprW/jmMeCBLSgQYbJI3pDXs=; b=PU7CqCmZ1iCzMHT6C9CFra/6MQdpw8+dFCIqH8aQzBQiFV/UHmF4zCh/NRnWNhW5SK xV6kQ/5tcAWIc3puz5QNCJ1s2I2fJSFPCFh9+bfNPCr7R5sQS3RTurSfny236Hio9KM1 gogFwwXw5dmPw5M1GgH2QgCb/14Rqm9q4YdtEksPD0zziqXvjhVtRVRKa4ZFZ7GNvrE1 mg5CQbGzbudtYfYCcMpH8KhsrcosfTDrQc/PydaVqjN+jL4Y3f5KOmmWW8yagf6hSoWp oi+uxS5uVof7hIFIRXD7HIEOzDqmrFt1zyx8/5pDArqGlCj4pkx+mGnBpcA/SA2qkqln JWEA== X-Gm-Message-State: AA6/9Rmz+LIRdQOI5ynoaB5plzNqIRzhFFPcJ/QzHmoUinkfxuYG9n26OT72Q3JuiC7ACw== X-Received: by 10.66.166.103 with SMTP id zf7mr32909438pab.178.1476716699606; Mon, 17 Oct 2016 08:04:59 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id v86sm48857237pfa.91.2016.10.17.08.04.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 08:04:56 -0700 (PDT) From: Wei Yongjun To: Bjorn Helgaas , Krzysztof Kozlowski , Keith Busch , Jon Derrick , Vineet Gupta , Robin Murphy Cc: Wei Yongjun , linux-pci@vger.kernel.org Subject: [PATCH -next] x86/PCI: VMD: Remove unnecessary pci_set_drvdata() Date: Mon, 17 Oct 2016 15:04:44 +0000 Message-Id: <1476716684-6778-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun 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 Reviewed-by: Keith Busch --- drivers/pci/host/vmd.c | 1 - 1 file changed, 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c index 37e29b5..6614b3552 100644 --- a/drivers/pci/host/vmd.c +++ b/drivers/pci/host/vmd.c @@ -719,7 +719,6 @@ static void vmd_remove(struct pci_dev *dev) struct vmd_dev *vmd = pci_get_drvdata(dev); vmd_detach_resources(vmd); - pci_set_drvdata(dev, NULL); sysfs_remove_link(&vmd->dev->dev.kobj, "domain"); pci_stop_root_bus(vmd->bus); pci_remove_root_bus(vmd->bus);