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<[email protected]> Cc: Andrew Lunn<[email protected]> Cc: Andreas Noever<[email protected]> Cc: Arnd Bergmann<[email protected]> Cc: Bjorn Helgaas<[email protected]> Cc: Corey Minyard<[email protected]> Cc: Christian Borntraeger<[email protected]> Cc: David Kershner<[email protected]> Cc: "David S. Miller"<[email protected]> Cc: David Airlie<[email protected]> Cc: Felipe Balbi<[email protected]> Cc: Frank Rowand<[email protected]> Cc: Grygorii Strashko<[email protected]> Cc: Harald Freudenberger<[email protected]> Cc: Hartmut Knaack<[email protected]> Cc: Heiko Stuebner<[email protected]> Cc: Jason Gunthorpe<[email protected]> Cc: Jonathan Cameron<[email protected]> Cc: Jonathan Cameron<[email protected]> Cc: "James E.J. Bottomley"<[email protected]> Cc: Len Brown<[email protected]> Cc: Mark Brown<[email protected]> Cc: Michael Ellerman<[email protected]> Cc: Michael Jamet<[email protected]> Cc: "Martin K. Petersen"<[email protected]> Cc: Peter Oberparleiter<[email protected]> Cc: Rob Herring<[email protected]> Cc: Sebastian Ott<[email protected]> Cc: Srinivas Kandagatla<[email protected]> Cc: Yehezkel Bernat<[email protected]> Cc: Wolfram Sang<[email protected]> Cc:[email protected] Cc: Greg Kroah-Hartman<[email protected]> Signed-off-by: Suzuki K Poulose<[email protected]> --- 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 <[email protected]> --srini

