From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Mon, 24 Jun 2019 05:23:48 +0200 From: Greg KH Subject: Re: [PATCH v2 00/28] drivers: Consolidate device lookup helpers Message-ID: <20190624032348.GA28919@kroah.com> References: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> To: Suzuki K Poulose Cc: linux-kernel@vger.kernel.org, rafael@kernel.org, Alan Tull , Alessandro Zummo , Alexander Aring , Alexander Shishkin , Alexandre Belloni , Andreas Noever , Andrew Lunn , Arnd Bergmann , Bjorn Helgaas , Corey Minyard , Daniel Vetter , Dan Murphy , David Airlie , David Kershner , "David S. Miller" , Doug Ledford , dri-devel@lists.freedesktop.org, Elie Morisse , Eric Anholt , Felipe Balbi , Florian Fainelli , Frank Rowand , Grant Likely , Grygorii Strashko , Harald Freudenberger , Hartmut Knaack , Heikki Krogerus , Heiko Carstens , Heiko =?iso-8859-1?Q?St=FCbner?= , Heiner Kallweit , Inki Dae , Jacek Anaszewski , "James E.J. Bottomley" , Jason Gunthorpe , Jiri Slaby , Joe Perches , Joerg Roedel , Jonathan Cameron , Jonathan Hunter , Lee Jones , Len Brown , Liam Girdwood , Maarten Lankhorst , Mark Brown , "Martin K. Petersen" , Mathieu Poirier , Maxime Coquelin , Maxime Ripard , Michael Jamet , Mika Westerberg , Moritz Fischer , Nehal Shah , Oliver Neukum , Pavel Machek , Peter Oberparleiter , Peter Rosin , "Rafael J. Wysocki" , "Rafael J . Wysocki " , Rob Herring , Robin Murphy , Russell King , Sandy Huang , Sebastian Andrzej Siewior , Sebastian Ott , Seung-Woo Kim , Shyam Sundar S K , Srinivas Kandagatla , Stefan Schmidt , Takashi Iwai , Thierry Reding , Thor Thayer , Tomas Winkler , Ulf Hansson , Will Deacon , Wolfram Sang , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-fpga@vger.kernel.org, linux-i2c@vger.kernel.org, linux-leds@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-rtc@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org, linux-wpan@vger.kernel.org List-ID: On Fri, Jun 14, 2019 at 06:53:55PM +0100, Suzuki K Poulose wrote: > We have device iterators to find a particular device matching a criteria > for a given bus/class/driver. i.e, {bus,class,driver}_find_device() APIs. > The matching criteria is a function pointer for the APIs. Often the lookup > is based on a generic property of a device (e.g, name, fwnode, of node pointer > or device type) rather than a driver specific information. However, each driver > writes up its own "match" function, spilling the similar match functions all > over the driver subsystems. > > Additionally the prototype for the "match" functions accepted by the above APIs > have a minute difference which prevents us otherwise sharing the match functions. > i.e, > int (*match)(struct device *dev, void *data) for {bus/driver}_find_device() > vs > int (*match)(struct device *dev, const void *) for class_find_device() > > If we promote the former to accept a "const void*" parameter, we could share one > single match function for all the helpers. This series achieves the following: > > a) [Patches 03-05] Unify the prototype for "match" functions accepted by the > device lookup APIs. I've applied the first 6 patches of this series to my tree now. Let's see how that goes, and this should give you a more solid base to redo the rest of the series off of. thanks, greg k-h