On Fri, Jun 14, 2019 at 11:54 AM Suzuki K Poulose
<[email protected]> 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]>
> Acked-by: Corey Minyard <[email protected]>
> Acked-by: David Kershner <[email protected]>
> Acked-by: Mark Brown <[email protected]>
> Acked-by: Rafael J. Wysocki <[email protected]>
> Acked-by: Srinivas Kandagatla <[email protected]>
> Signed-off-by: Suzuki K Poulose <[email protected]>

Acked-by: Rob Herring <[email protected]>

Reply via email to