devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: joe@perches.com
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, rafael@kernel.org
Subject: Re: [PATCH v2 00/28] drivers: Consolidate device lookup helpers
Date: Mon, 17 Jun 2019 11:07:29 +0100	[thread overview]
Message-ID: <c6813d08-b70b-f153-a651-94d1bcaa5522@arm.com> (raw)
In-Reply-To: <3aa6d42db4b64c625b8461ee7d442f3f1830e8c3.camel@perches.com>

Cc: Greg, Rafael

Hi Joe,

On 14/06/2019 19:24, Joe Perches wrote:
> (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.

I agree that it is more suitable api. However, that would need much more
conversions for the existing "class_find_device()" , which are not touched by
the series and would make this series even more bigger. With that said, I
am fine with implementing the suggestion if Greg/Rafael thinks that is fine.

>> 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.

Unfortunately, yes.

> If the list is generated using scripts/get_maintainer.pl
> perhaps it is more sensible to add --nogit --nogit-fallback

Yes, and trimmed manually a bit to remove the "commit-signers".
I have tried to keep only the maintainers/reviewers/supporters.
Thanks for the option, I will give that a try.

> to its arguments to cc actual maintainers and avoid people
> that have submitted cleanup style patches to various files.
> 

Cheers
Suzuki

  reply	other threads:[~2019-06-17 10:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 17:53 [PATCH v2 00/28] drivers: Consolidate device lookup helpers 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 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 18:24 ` [PATCH v2 00/28] drivers: Consolidate device lookup helpers Joe Perches
2019-06-17 10:07   ` Suzuki K Poulose [this message]
2019-06-24  3:23 ` Greg KH

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=c6813d08-b70b-f153-a651-94d1bcaa5522@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).