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

On Tue, Aug 03, 2021 at 12:01:48PM +0200, Uwe Kleine-König wrote:
> Which driver a device is bound to is available twice: In struct
> pci_dev::dev->driver and in struct pci_dev::driver. To get rid of the
> duplication introduce a wrapper to access struct pci_dev's driver
> member. Once all users are converted the wrapper can be changed to
> calculate the driver using pci_dev::dev->driver.

...

>  #define	to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
> +#define pci_driver_of_dev(pdev) ((pdev)->driver)

Seems like above is (mis)using TAB instead of space after #define. Not sure if
it's good to have them different.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-08-03 14:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 10:01 [PATCH v2 0/6] PCI: Drop duplicated tracking of " Uwe Kleine-König
2021-08-03 10:01 ` [PATCH v2 4/6] PCI: Provide wrapper to access " Uwe Kleine-König
2021-08-03 14:37   ` Andy Shevchenko [this message]
2021-08-03 10:01 ` [PATCH v2 5/6] PCI: Adapt all code locations to not use struct pci_dev::driver directly Uwe Kleine-König
2021-08-03 13:53   ` Boris Ostrovsky
2021-08-03 14:38   ` Andy Shevchenko
2021-08-03 14:46   ` Ido Schimmel
2021-08-05 15:09   ` Andrew Donnellan
2021-08-03 10:01 ` [PATCH v2 6/6] PCI: Drop duplicated tracking of a pci_dev's bound driver Uwe Kleine-König
2021-08-05 23:42 ` [PATCH v2 0/6] " Bjorn Helgaas
2021-08-06  6:46   ` Uwe Kleine-König
2021-08-06 21:24     ` Bjorn Helgaas
2021-08-07  9:26       ` Uwe Kleine-König
2021-08-09 18:14         ` Bjorn Helgaas

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=YQlUoGYP6c/eWgJO@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --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=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=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=idosch@nvidia.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=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=u.kleine-koenig@pengutronix.de \
    --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 v2 4/6] PCI: Provide wrapper to access 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).