From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH v2 00/28] drivers: Consolidate device lookup helpers Date: Fri, 14 Jun 2019 11:24:18 -0700 Message-ID: <3aa6d42db4b64c625b8461ee7d442f3f1830e8c3.camel@perches.com> References: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org To: Suzuki K Poulose Cc: devicetree@vger.kernel.org, LKML List-Id: devicetree@vger.kernel.org (dropping the very long cc list just cc'ing LKML and devicetree) On Fri, 2019-06-14 at 18:53 +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() > As you are doing treewide conversions, perhaps using bool (*match)(...) is a more sensible api. > Changes since v1: > - Drop start parameter for *_find_device_by_devt(). > - Fix build warnings for s390 > - Add *_find_device_by_acpi_dev() wrappers. > - Group wrappers and the consumers into single patch, reducing > the total patches to 28 from 57. (Rafael). > - Better description for acpi cleanup patch. > - Added tags from v1. Below this is a _very_ long list of cc:'s. If the list is generated using scripts/get_maintainer.pl perhaps it is more sensible to add --nogit --nogit-fallback to its arguments to cc actual maintainers and avoid people that have submitted cleanup style patches to various files. > Cc: Alan Tull > Cc: Alessandro Zummo > Cc: Alexander Aring > Cc: Alexander Shishkin > Cc: Alexandre Belloni > Cc: Andreas Noever > Cc: Andrew Lunn > Cc: Arnd Bergmann > Cc: Bjorn Helgaas > Cc: Corey Minyard > Cc: Daniel Vetter > Cc: Dan Murphy > Cc: David Airlie > Cc: David Kershner > Cc: "David S. Miller" > Cc: Doug Ledford > Cc: dri-devel@lists.freedesktop.org > Cc: Elie Morisse > Cc: Eric Anholt > Cc: Felipe Balbi > Cc: Florian Fainelli > Cc: Frank Rowand > Cc: Grant Likely > Cc: Greg Kroah-Hartman > Cc: Grygorii Strashko > Cc: Harald Freudenberger > Cc: Hartmut Knaack > Cc: Heikki Krogerus > Cc: Heiko Carstens > Cc: "Heiko Stübner" > Cc: Heiko Stuebner > Cc: Heiner Kallweit > Cc: Inki Dae > Cc: Jacek Anaszewski > Cc: "James E.J. Bottomley" > Cc: Jason Gunthorpe > Cc: Jiri Slaby > Cc: Joe Perches > Cc: Joerg Roedel > Cc: Jonathan Cameron > Cc: Jonathan Hunter > Cc: Lee Jones > Cc: Len Brown Cc: Liam Girdwood > Cc: Maarten Lankhorst > Cc: Mark Brown > Cc: "Martin K. Petersen" > Cc: Mathieu Poirier > Cc: Maxime Coquelin > Cc: Maxime Ripard > Cc: Michael Jamet > Cc: Mika Westerberg > Cc: Moritz Fischer > Cc: Nehal Shah > Cc: Oliver Neukum > Cc: Pavel Machek > Cc: Peter Oberparleiter > Cc: Peter Rosin > Cc: "Rafael J. Wysocki" > Cc: "Rafael J. Wysocki" > Cc: Rafael J. Wysocki" > Cc: Rob Herring > Cc: Robin Murphy > Cc: Russell King > Cc: Sandy Huang > Cc: Sebastian Andrzej Siewior > Cc: Sebastian Ott > Cc: Seung-Woo Kim > Cc: Shyam Sundar S K > Cc: Srinivas Kandagatla > Cc: Stefan Schmidt > Cc: Takashi Iwai > Cc: Thierry Reding > Cc: Thor Thayer > Cc: Tomas Winkler > Cc: Ulf Hansson > Cc: Will Deacon > Cc: Wolfram Sang > Cc: devicetree@vger.kernel.org > Cc: linux-acpi@vger.kernel.org > Cc: linux-fpga@vger.kernel.org > Cc: linux-i2c@vger.kernel.org > Cc: linux-leds@vger.kernel.org > Cc: linux-rockchip@lists.infradead.org > Cc: linux-rtc@vger.kernel.org > Cc: linux-spi@vger.kernel.org > Cc: linux-usb@vger.kernel.org > Cc: linux-wpan@vger.kernel.org