From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH net-next v4 05/10] drivers: base: Add device_find_in_class_name() Date: Tue, 17 Jan 2017 16:13:11 -0800 Message-ID: References: <20170117232152.1661-1-f.fainelli@gmail.com> <20170117232152.1661-6-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Andrew Lunn , Jason Cooper , Vivien Didelot , netdev , Russell King , open list , Greg Kroah-Hartman , Gregory Clement , "David S. Miller" , "moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support" , Sebastian Hesselbarth To: Andy Shevchenko Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: netdev.vger.kernel.org On 01/17/2017 04:07 PM, Andy Shevchenko wrote: > On Wed, Jan 18, 2017 at 2:04 AM, Florian Fainelli wrote: >> On 01/17/2017 04:00 PM, Andy Shevchenko wrote: >>> On Wed, Jan 18, 2017 at 1:43 AM, Florian Fainelli wrote: >>>> On 01/17/2017 03:34 PM, Andy Shevchenko wrote: >>>>> On Wed, Jan 18, 2017 at 1:21 AM, Florian Fainelli wrote: > >>> But why not to use void *class_name to be consistent with callback and >>> device_find_child()? >> >> The top-level function: device_find_in_class_name() should have a >> stronger typing of its argument even if it internally uses >> device_find_child() and a callback that takes a void * argument, that's >> how I see it. > > Fair enough. > >>> Btw, >>> return get_device(parent); >> >> Not sure I follow what that means here? > > Missed remark. Instead of > > get_device(parent); > return parent; > > you can use > > return get_device(parent); Seems reasonable, if I have to respin a v5, will add that, thanks! -- Florian