lkml.org 
[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/13] bus_find_device: Unify the match callback with class_find_device
From
Date


On 05/06/2019 16:13, Suzuki K Poulose wrote:
> There is an arbitrary difference between the prototypes of
> bus_find_device() and class_find_device() preventing their callers
> from passing the same pair of data and match() arguments to both of
> them, which is the const qualifier used in the prototype of
> class_find_device(). If that qualifier is also used in the
> bus_find_device() prototype, it will be possible to pass the same
> match() callback function to both bus_find_device() and
> class_find_device(), which will allow some optimizations to be made in
> order to avoid code duplication going forward. Also with that, constify
> the "data" parameter as it is passed as a const to the match function.
>
> For this reason, change the prototype of bus_find_device() to match
> the prototype of class_find_device() and adjust its callers to use the
> const qualifier in accordance with the new prototype of it.
>
> Cc: Alexander Shishkin<alexander.shishkin@linux.intel.com>
> Cc: Andrew Lunn<andrew@lunn.ch>
> Cc: Andreas Noever<andreas.noever@gmail.com>
> Cc: Arnd Bergmann<arnd@arndb.de>
> Cc: Bjorn Helgaas<bhelgaas@google.com>
> Cc: Corey Minyard<minyard@acm.org>
> Cc: Christian Borntraeger<borntraeger@de.ibm.com>
> Cc: David Kershner<david.kershner@unisys.com>
> Cc: "David S. Miller"<davem@davemloft.net>
> Cc: David Airlie<airlied@linux.ie>
> Cc: Felipe Balbi<balbi@kernel.org>
> Cc: Frank Rowand<frowand.list@gmail.com>
> Cc: Grygorii Strashko<grygorii.strashko@ti.com>
> Cc: Harald Freudenberger<freude@linux.ibm.com>
> Cc: Hartmut Knaack<knaack.h@gmx.de>
> Cc: Heiko Stuebner<heiko@sntech.de>
> Cc: Jason Gunthorpe<jgg@ziepe.ca>
> Cc: Jonathan Cameron<jic23@kernel.org>
> Cc: Jonathan Cameron<jic23@kernel.org>
> Cc: "James E.J. Bottomley"<jejb@linux.ibm.com>
> Cc: Len Brown<lenb@kernel.org>
> Cc: Mark Brown<broonie@kernel.org>
> Cc: Michael Ellerman<mpe@ellerman.id.au>
> Cc: Michael Jamet<michael.jamet@intel.com>
> Cc: "Martin K. Petersen"<martin.petersen@oracle.com>
> Cc: Peter Oberparleiter<oberpar@linux.ibm.com>
> Cc: Rob Herring<robh+dt@kernel.org>
> Cc: Sebastian Ott<sebott@linux.ibm.com>
> Cc: Srinivas Kandagatla<srinivas.kandagatla@linaro.org>
> Cc: Yehezkel Bernat<YehezkelShB@gmail.com>
> Cc: Wolfram Sang<wsa@the-dreams.de>
> Cc:rafael@kernel.org
> Cc: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
> Signed-off-by: Suzuki K Poulose<suzuki.poulose@arm.com>
> ---
> arch/powerpc/platforms/pseries/ibmebus.c | 4 ++--
> drivers/acpi/acpi_lpss.c | 4 ++--
> drivers/acpi/sleep.c | 2 +-
> drivers/acpi/utils.c | 4 ++--
> drivers/base/bus.c | 6 +++---
> drivers/base/devcon.c | 2 +-
> drivers/char/ipmi/ipmi_si_platform.c | 2 +-
> drivers/firmware/efi/dev-path-parser.c | 4 ++--
> drivers/gpu/drm/drm_mipi_dsi.c | 2 +-
> drivers/hwtracing/coresight/coresight.c | 6 +++---
> drivers/hwtracing/coresight/of_coresight.c | 2 +-
> drivers/hwtracing/intel_th/core.c | 5 ++---
> drivers/i2c/i2c-core-acpi.c | 4 ++--
> drivers/i2c/i2c-core-of.c | 4 ++--
> drivers/iio/inkern.c | 2 +-
> drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +-
> drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 2 +-
> drivers/net/ethernet/ti/cpsw-phy-sel.c | 4 ++--
> drivers/net/ethernet/ti/davinci_emac.c | 2 +-
> drivers/net/ethernet/toshiba/tc35815.c | 4 ++--
> drivers/nvmem/core.c | 2 +-


For NVMEM changes,

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


--srini

\
 
 \ /
  Last update: 2019-06-06 11:02    [W:0.075 / U:6.636 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site