All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David E. Box" <david.e.box@linux.intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: gregkh@linuxfoundation.org, mustafa.ismail@intel.com,
	shiraz.saleem@intel.com, dledford@redhat.com, leon@kernel.org,
	saeedm@nvidia.com, davem@davemloft.net, kuba@kernel.org,
	vkoul@kernel.org, yung-chuan.liao@linux.intel.com,
	pierre-louis.bossart@linux.intel.com, mst@redhat.com,
	jasowang@redhat.com, andriy.shevchenko@linux.intel.com,
	hdegoede@redhat.com, virtualization@lists.linux-foundation.org,
	alsa-devel@alsa-project.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 0/4] driver_core: Auxiliary drvdata helper cleanup
Date: Tue, 21 Dec 2021 16:48:17 -0800	[thread overview]
Message-ID: <35bca887e697597f7b3e1944b3dd7347c6defca1.camel@linux.intel.com> (raw)
In-Reply-To: <20211222000905.GN6467@ziepe.ca>

On Tue, 2021-12-21 at 20:09 -0400, Jason Gunthorpe wrote:
> On Tue, Dec 21, 2021 at 03:58:48PM -0800, David E. Box wrote:
> > Depends on "driver core: auxiliary bus: Add driver data helpers" patch [1].
> > Applies the helpers to all auxiliary device drivers using
> > dev_(get/set)_drvdata. Drivers were found using the following search:
> > 
> >     grep -lr "struct auxiliary_device" $(grep -lr "drvdata" .)
> > 
> > Changes were build tested using the following configs:
> > 
> >     vdpa/mlx5:       CONFIG_MLX5_VDPA_NET
> >     net/mlx53:       CONFIG_MLX5_CORE_EN
> >     soundwire/intel: CONFIG_SOUNDWIRE_INTEL
> >     RDAM/irdma:      CONFIG_INFINIBAND_IRDMA
> >                      CONFIG_MLX5_INFINIBAND
> > 
> > [1] https://www.spinics.net/lists/platform-driver-x86/msg29940.html 
> 
> I have to say I don't really find this to be a big readability
> improvement.

I should have referenced the thread [1] discussing the benefit of this change
since the question was asked and answered already. The idea is that drivers
shouldn't have to touch the device API directly if they are already using a
higher level core API (auxiliary bus) that can do that on its behalf.

One benefit of this scheme is that it limits the number of places where changes
need to be made if the device core were to change.

[1] https://lore.kernel.org/all/YbBwOb6JvWkT3JWI@kroah.com/

> 
> Also, what use is 'to_auxiliary_dev()' ? I didn't see any users added..

This was not added by that patch.

Thanks

David
> 
> Jason


  reply	other threads:[~2021-12-22  0:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 23:58 [PATCH 0/4] driver_core: Auxiliary drvdata helper cleanup David E. Box
2021-12-21 23:58 ` [PATCH 1/4] RDMA/irdma: Use auxiliary_device driver data helpers David E. Box
2021-12-22  7:34   ` kernel test robot
2021-12-22 12:27   ` Cezary Rojewski
2021-12-22 12:27     ` Cezary Rojewski
2021-12-21 23:58 ` [PATCH 2/4] soundwire: intel: " David E. Box
2021-12-22 11:18   ` Andy Shevchenko
2021-12-22 11:18     ` Andy Shevchenko
2021-12-22 11:18     ` Andy Shevchenko
2021-12-21 23:58 ` [PATCH 3/4] net/mlx5e: " David E. Box
2021-12-22  9:56   ` kernel test robot
2021-12-21 23:58 ` [PATCH 4/4] vdpa/mlx5: " David E. Box
2021-12-22 12:08   ` kernel test robot
2021-12-22  0:09 ` [PATCH 0/4] driver_core: Auxiliary drvdata helper cleanup Jason Gunthorpe
2021-12-22  0:09   ` Jason Gunthorpe
2021-12-22  0:09   ` Jason Gunthorpe
2021-12-22  0:48   ` David E. Box [this message]
2021-12-22 17:18     ` Jason Gunthorpe
2021-12-22 17:18       ` Jason Gunthorpe
2021-12-22 17:18       ` Jason Gunthorpe
2021-12-22 12:34 ` Cezary Rojewski
2021-12-22 12:34   ` Cezary Rojewski

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=35bca887e697597f7b3e1944b3dd7347c6defca1.camel@linux.intel.com \
    --to=david.e.box@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mustafa.ismail@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=saeedm@nvidia.com \
    --cc=shiraz.saleem@intel.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.