Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>,
	linux-pci@vger.kernel.org, kernel@pengutronix.de,
	"Alexander Duyck" <alexanderduyck@fb.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Andrew Donnellan" <ajd@linux.ibm.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Borislav Petkov" <bp@alien8.de>,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Fiona Trahe" <fiona.trahe@intel.com>,
	"Frederic Barrat" <fbarrat@linux.ibm.com>,
	"Giovanni Cabiddu" <giovanni.cabiddu@intel.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Ido Schimmel" <idosch@nvidia.com>,
	"Ingo Molnar" <mingo@redhat.com>, "Jack Xu" <jack.xu@intel.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Jesse Brandeburg" <jesse.brandeburg@intel.com>,
	"Jiri Olsa" <jolsa@redhat.com>, "Jiri Pirko" <jiri@nvidia.com>,
	"Juergen Gross" <jgross@suse.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Marco Chiappero" <marco.chiappero@intel.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Mathias Nyman" <mathias.nyman@intel.com>,
	"Michael Buesch" <m@bues.ch>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	"Paul Mackerras" <paulus@samba.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Russell Currey" <ruscur@russell.cc>,
	"Salil Mehta" <salil.mehta@huawei.com>,
	"Sathya Prakash" <sathya.prakash@broadcom.com>,
	"Simon Horman" <simon.horman@corigine.com>,
	"Sreekanth Reddy" <sreekanth.reddy@broadcom.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Suganath Prabu Subramani"
	<suganath-prabu.subramani@broadcom.com>,
	"Taras Chornyi" <tchornyi@marvell.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Tomaszx Kowalik" <tomaszx.kowalik@intel.com>,
	"Vadym Kochan" <vkochan@marvell.com>,
	"Wojciech Ziemba" <wojciech.ziemba@intel.com>,
	"Yisen Zhuang" <yisen.zhuang@huawei.com>,
	"Zhou Wang" <wangzhou1@hisilicon.com>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-wireless@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com,
	netdev@vger.kernel.org, oss-drivers@corigine.com,
	qat-linux@intel.com, x86@kernel.org,
	xen-devel@lists.xenproject.org
Subject: [PATCH v3 0/8] PCI: Drop duplicated tracking of a pci_dev's bound driver
Date: Wed, 11 Aug 2021 10:06:29 +0200	[thread overview]
Message-ID: <20210811080637.2596434-1-u.kleine-koenig@pengutronix.de> (raw)

From: Uwe Kleine-König <uwe@kleine-koenig.org>

Hello,

Today the following is always true for a struct pci_dev *pdev:

	pdev->driver ==
		pdev->dev.driver ? to_pci_driver(pdev->dev.driver) : NULL

This series is about getting rid of struct pci_dev::driver. The first
three patches are unmodified compared to v2 (apart from an added
Reviewed-by tag) and are just minor cleanups.

Patch #4 replaces all usages of pci_dev::driver->name by
dev_driver_string().

Patch #5 simplifies struct mpt_pci_driver by dropping an unused
parameter from a function callback. The calculation of this parameter
made use of struct pci_dev::driver.

Patch #6 simplifies adf_enable_aer() and moves one assignment done in
that function to the initializer of the respective static data.

Patch #7 then modifies all remaining users of struct pci_dev::driver to
use to_pci_driver(pdev->dev.driver) instead and finally patch #8 gets
rid of the driver member.

Note this series is only build tested.

Theoretically patches #4 and #7 could be split by subsystem, there are
no dependencies, but I'd prefer that all patches go in together via the
pci tree to simplify the procedure. If you don't agree please speak up.

Best regards
Uwe

Uwe Kleine-König (8):
  PCI: Simplify pci_device_remove()
  PCI: Drop useless check from pci_device_probe()
  xen/pci: Drop some checks that are always true
  PCI: replace pci_dev::driver usage that gets the driver name
  scsi: message: fusion: Remove unused parameter of mpt_pci driver's
    probe()
  crypto: qat - simplify adf_enable_aer()
  PCI: Replace pci_dev::driver usage by pci_dev::dev.driver
  PCI: Drop duplicated tracking of a pci_dev's bound driver

 arch/powerpc/include/asm/ppc-pci.h            |  7 ++-
 arch/powerpc/kernel/eeh_driver.c              | 10 +--
 arch/x86/events/intel/uncore.c                |  2 +-
 arch/x86/kernel/probe_roms.c                  |  2 +-
 drivers/bcma/host_pci.c                       |  7 ++-
 drivers/crypto/hisilicon/qm.c                 |  2 +-
 drivers/crypto/qat/qat_4xxx/adf_drv.c         |  7 +--
 drivers/crypto/qat/qat_c3xxx/adf_drv.c        |  7 +--
 drivers/crypto/qat/qat_c62x/adf_drv.c         |  7 +--
 drivers/crypto/qat/qat_common/adf_aer.c       | 10 +--
 .../crypto/qat/qat_common/adf_common_drv.h    |  2 +-
 drivers/crypto/qat/qat_dh895xcc/adf_drv.c     |  7 +--
 drivers/message/fusion/mptbase.c              |  7 +--
 drivers/message/fusion/mptbase.h              |  2 +-
 drivers/message/fusion/mptctl.c               |  4 +-
 drivers/message/fusion/mptlan.c               |  2 +-
 drivers/misc/cxl/guest.c                      | 24 ++++---
 drivers/misc/cxl/pci.c                        | 30 +++++----
 .../ethernet/hisilicon/hns3/hns3_ethtool.c    |  2 +-
 .../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                             | 25 +++++---
 drivers/pci/pci-driver.c                      | 45 ++++++-------
 drivers/pci/pci.c                             |  4 +-
 drivers/pci/pcie/err.c                        | 36 ++++++-----
 drivers/pci/xen-pcifront.c                    | 63 +++++++++----------
 drivers/ssb/pcihost_wrapper.c                 |  8 ++-
 drivers/usb/host/xhci-pci.c                   |  2 +-
 include/linux/pci.h                           |  1 -
 30 files changed, 164 insertions(+), 167 deletions(-)

base-commit: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
-- 
2.30.2


             reply	other threads:[~2021-08-11  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  8:06 Uwe Kleine-König [this message]
2021-08-11  8:06 ` [PATCH v3 4/8] PCI: replace pci_dev::driver usage that gets the driver name Uwe Kleine-König
2021-08-12  7:07   ` Christoph Hellwig
2021-08-12  8:14     ` Uwe Kleine-König
2021-08-14  8:38       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210811080637.2596434-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=acme@kernel.org \
    --cc=ajd@linux.ibm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexanderduyck@fb.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --cc=fbarrat@linux.ibm.com \
    --cc=fiona.trahe@intel.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=idosch@nvidia.com \
    --cc=jack.xu@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgross@suse.com \
    --cc=jiri@nvidia.com \
    --cc=jolsa@redhat.com \
    --cc=kernel@pengutronix.de \
    --cc=konrad.wilk@oracle.com \
    --cc=kuba@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=m@bues.ch \
    --cc=marco.chiappero@intel.com \
    --cc=mark.rutland@arm.com \
    --cc=mathias.nyman@intel.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oohall@gmail.com \
    --cc=oss-drivers@corigine.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=qat-linux@intel.com \
    --cc=ruscur@russell.cc \
    --cc=salil.mehta@huawei.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=simon.horman@corigine.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=sstabellini@kernel.org \
    --cc=suganath-prabu.subramani@broadcom.com \
    --cc=tchornyi@marvell.com \
    --cc=tglx@linutronix.de \
    --cc=tomaszx.kowalik@intel.com \
    --cc=uwe@kleine-koenig.org \
    --cc=vkochan@marvell.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=wojciech.ziemba@intel.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yisen.zhuang@huawei.com \
    --cc=zajec5@gmail.com \
    --subject='Re: [PATCH v3 0/8] PCI: Drop duplicated tracking of a pci_dev'\''s bound driver' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).