public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	rafael@kernel.org,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Andreas Noever <andreas.noever@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Corey Minyard <minyard@acm.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Kershner <david.kershner@unisys.com>,
	"David S. Miller" <davem@davemloft.net>,
	David Airlie <airlied@linux.ie>, Felipe Balbi <balbi@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Heiko Stuebner <heiko@sntech.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	Jonathan Cameron <jic23@kernel.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Len Brown <lenb@kernel.org>, Mark Brown <broonie@kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Michael Jamet <michael.jamet@intel.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Peter Oberparleiter <oberpar@linux.ibm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Sebastian Ott <sebott@linux.ibm.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>
Subject: Re: [PATCH v2 04/28] bus_find_device: Unify the match callback with class_find_device
Date: Fri, 14 Jun 2019 22:30:51 +0200	[thread overview]
Message-ID: <20190614203051.GA7991@kunai> (raw)
In-Reply-To: <1560534863-15115-5-git-send-email-suzuki.poulose@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

On Fri, Jun 14, 2019 at 06:53:59PM +0100, 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.

Acked-by: Wolfram Sang <wsa@the-dreams.de> # for the I2C parts


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2019-06-14 20:30 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com>
2019-06-14 17:53 ` [PATCH v2 01/28] staging: most-core: Use bus_find_device_by_name Suzuki K Poulose
2019-06-14 17:53 ` [PATCH v2 02/28] mfd: Remove unused helper syscon_regmap_lookup_by_pdevname Suzuki K Poulose
2019-07-25 10:50   ` Lee Jones
2019-06-14 17:53 ` [PATCH v2 03/28] acpi: utils: Cleanup acpi_dev_match_cb Suzuki K Poulose
2019-06-17 22:08   ` Rafael J. Wysocki
2019-06-24  3:20     ` Greg Kroah-Hartman
2019-06-14 17:53 ` [PATCH v2 04/28] bus_find_device: Unify the match callback with class_find_device Suzuki K Poulose
2019-06-14 20:30   ` Rob Herring
2019-06-14 20:30   ` Wolfram Sang [this message]
2019-06-14 17:54 ` [PATCH v2 05/28] driver_find_device: Unify the match function with class_find_device() Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 06/28] drivers: Add generic helper to match by of_node Suzuki K Poulose
2019-06-14 20:31   ` Wolfram Sang
2019-06-17  9:59     ` Suzuki K Poulose
2019-06-17 10:06       ` Wolfram Sang
2019-06-14 17:54 ` [PATCH v2 07/28] drivers: Add generic helper to match by fwnode Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 08/28] drivers: Add generic helper to match by device type Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 09/28] drivers: Add generic match helper by ACPI_COMPANION device Suzuki K Poulose
2019-06-17 22:07   ` Rafael J. Wysocki
2019-06-18  8:38     ` Suzuki K Poulose
2019-06-18  8:40       ` Rafael J. Wysocki
2019-06-14 17:54 ` [PATCH v2 10/28] drivers: Add generic helper to match by name Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 11/28] drivers: Add generic helper to match any device Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 12/28] drivers: Introduce class_find_device_by_name() helper Suzuki K Poulose
2019-06-21 11:02   ` Pavel Machek
2019-06-24 10:08   ` Alexandre Belloni
2019-06-14 17:54 ` [PATCH v2 13/28] drivers: Introduce class_find_device_by_of_node() helper Suzuki K Poulose
2019-06-22  5:25   ` Peter Rosin
2019-06-24  8:34     ` Suzuki K Poulose
2019-06-24 14:07       ` Peter Rosin
2019-06-24 15:19         ` Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 14/28] drivers: Introduce class_find_device_by_fwnode() helper Suzuki K Poulose
2019-06-18 10:42   ` Heikki Krogerus
2019-06-14 17:54 ` [PATCH v2 15/28] drivers: Introduce class_find_device_by_devt() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 16/28] drivers: Introduce class_find_device_by_acpi_dev() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 17/28] drivers: Introduce bus_find_device_by_of_node() helper Suzuki K Poulose
2019-06-14 20:32   ` Wolfram Sang
2019-07-09 16:19   ` Rob Herring
2019-06-14 17:54 ` [PATCH v2 18/28] drivers: Introduce bus_find_device_by_fwnode() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 19/28] drivers: Introduce bus_find_device_by_devt() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 20/28] drivers: Introduce bus_find_next_device() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 21/28] drivers: Introduce bus_find_device_by_acpi_dev() helper Suzuki K Poulose
2019-06-14 18:08   ` Mark Brown
2019-06-17  9:39   ` Mika Westerberg
2019-06-17 10:07   ` Wolfram Sang
2019-06-14 17:54 ` [PATCH v2 22/28] drivers: Introduce driver_find_device_by_name() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 23/28] drivers: Introduce driver_find_device_by_of_node() helper Suzuki K Poulose
2019-07-25 10:51   ` Lee Jones
2019-07-25 13:38     ` Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 24/28] drivers: Introduce driver_find_device_by_fwnode() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 25/28] drivers: Introduce driver_find_device_by_devt() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 26/28] drivers: Introduce driver_find_next_device() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 27/28] drivers: Introduce driver_find_device_by_acpi_dev() helper Suzuki K Poulose
2019-06-14 17:54 ` [PATCH v2 28/28] platform: Add platform_find_device_by_driver() helper Suzuki K Poulose
2019-06-14 18:24 ` [PATCH v2 00/28] drivers: Consolidate device lookup helpers Joe Perches
2019-06-17 10:07   ` Suzuki K Poulose
     [not found] ` <20190624032348.GA28919@kroah.com>
2019-06-24  8:31   ` Suzuki K Poulose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190614203051.GA7991@kunai \
    --to=wsa@the-dreams.de \
    --cc=YehezkelShB@gmail.com \
    --cc=airlied@linux.ie \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=balbi@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=borntraeger@de.ibm.com \
    --cc=broonie@kernel.org \
    --cc=davem@davemloft.net \
    --cc=david.kershner@unisys.com \
    --cc=freude@linux.ibm.com \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=grygorii.strashko@ti.com \
    --cc=heiko@sntech.de \
    --cc=jejb@linux.ibm.com \
    --cc=jgg@ziepe.ca \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.jamet@intel.com \
    --cc=minyard@acm.org \
    --cc=mpe@ellerman.id.au \
    --cc=oberpar@linux.ibm.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebott@linux.ibm.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox