From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524AbdARAH2 (ORCPT ); Tue, 17 Jan 2017 19:07:28 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33617 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595AbdARAHZ (ORCPT ); Tue, 17 Jan 2017 19:07:25 -0500 MIME-Version: 1.0 In-Reply-To: References: <20170117232152.1661-1-f.fainelli@gmail.com> <20170117232152.1661-6-f.fainelli@gmail.com> From: Andy Shevchenko Date: Wed, 18 Jan 2017 02:07:24 +0200 Message-ID: Subject: Re: [PATCH net-next v4 05/10] drivers: base: Add device_find_in_class_name() To: Florian Fainelli Cc: netdev , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Vivien Didelot , "David S. Miller" , Greg Kroah-Hartman , "moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support" , open list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- With Best Regards, Andy Shevchenko