From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57A82C4338F for ; Thu, 29 Jul 2021 23:47:51 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2386160F23 for ; Thu, 29 Jul 2021 23:47:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2386160F23 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GbRzS4Vl3z3cRy for ; Fri, 30 Jul 2021 09:47:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=pengutronix.de (client-ip=2001:67c:670:201:290:27ff:fe1d:cc33; helo=metis.ext.pengutronix.de; envelope-from=ukl@pengutronix.de; receiver=) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GbMnt722Fz2xg5 for ; Fri, 30 Jul 2021 06:39:13 +1000 (AEST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Cmx-0000F8-Gi; Thu, 29 Jul 2021 22:37:55 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m9Cml-0003d6-RY; Thu, 29 Jul 2021 22:37:43 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m9Cml-0004Ht-Nr; Thu, 29 Jul 2021 22:37:43 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Bjorn Helgaas Subject: [PATCH v1 0/5] PCI: Drop duplicated tracking of a pci_dev's bound driver Date: Thu, 29 Jul 2021 22:37:35 +0200 Message-Id: <20210729203740.1377045-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linuxppc-dev@lists.ozlabs.org X-Mailman-Approved-At: Fri, 30 Jul 2021 09:47:29 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Giovanni Cabiddu , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Peter Zijlstra , linux-pci@vger.kernel.org, Alexander Duyck , Sathya Prakash , oss-drivers@corigine.com, Oliver O'Halloran , "H. Peter Anvin" , Jiri Olsa , Boris Ostrovsky , linux-perf-users@vger.kernel.org, Stefano Stabellini , Herbert Xu , linux-scsi@vger.kernel.org, Ido Schimmel , x86@kernel.org, qat-linux@intel.com, Alexander Shishkin , Ingo Molnar , Geert Uytterhoeven , linux-wireless@vger.kernel.org, Jakub Kicinski , Mathias Nyman , Yisen Zhuang , Fiona Trahe , Andrew Donnellan , Arnd Bergmann , Konrad Rzeszutek Wilk , Suganath Prabu Subramani , Simon Horman , Arnaldo Carvalho de Melo , Borislav Petkov , Michael Buesch , Jiri Pirko , Namhyung Kim , Thomas Gleixner , Andy Shevchenko , Juergen Gross , Salil Mehta , Sreekanth Reddy , xen-devel@lists.xenproject.org, Vadym Kochan , MPT-FusionLinux.pdl@broadcom.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, Wojciech Ziemba , linux-kernel@vger.kernel.org, Taras Chornyi , Zhou Wang , linux-crypto@vger.kernel.org, kernel@pengutronix.de, netdev@vger.kernel.org, Frederic Barrat , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hello, struct pci_dev tracks the bound pci driver twice. This series is about removing this duplication. The first two patches are just cleanups. The third patch introduces a wrapper that abstracts access to struct pci_dev->driver. In the next patch (hopefully) all users are converted to use the new wrapper and finally the fifth patch removes the duplication. Note this series is only build tested (allmodconfig on several architectures). I'm open to restructure this series if this simplifies things. E.g. the use of the new wrapper in drivers/pci could be squashed into the patch introducing the wrapper. Patch 4 could be split by maintainer tree or squashed into patch 3 completely. Best regards Uwe Uwe Kleine-König (5): PCI: Simplify pci_device_remove() PCI: Drop useless check from pci_device_probe() PCI: Provide wrapper to access a pci_dev's bound driver PCI: Adapt all code locations to not use struct pci_dev::driver directly PCI: Drop duplicated tracking of a pci_dev's bound driver arch/powerpc/include/asm/ppc-pci.h | 3 +- arch/powerpc/kernel/eeh_driver.c | 12 +++-- arch/x86/events/intel/uncore.c | 2 +- arch/x86/kernel/probe_roms.c | 2 +- drivers/bcma/host_pci.c | 6 ++- drivers/crypto/hisilicon/qm.c | 2 +- drivers/crypto/qat/qat_common/adf_aer.c | 2 +- drivers/message/fusion/mptbase.c | 4 +- drivers/misc/cxl/guest.c | 21 ++++---- drivers/misc/cxl/pci.c | 25 ++++++---- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 3 +- .../ethernet/marvell/prestera/prestera_pci.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- .../ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +- drivers/pci/iov.c | 23 +++++---- drivers/pci/pci-driver.c | 48 +++++++++---------- drivers/pci/pci.c | 10 ++-- drivers/pci/pcie/err.c | 35 +++++++------- drivers/pci/xen-pcifront.c | 4 +- drivers/ssb/pcihost_wrapper.c | 7 ++- drivers/usb/host/xhci-pci.c | 3 +- include/linux/pci.h | 2 +- 22 files changed, 121 insertions(+), 99 deletions(-) base-commit: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c -- 2.30.2