From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tuomas Tynkkynen Subject: Re: [PATCH 1/3] of: Add of_match_machine helper Date: Mon, 18 Aug 2014 13:10:13 +0300 Message-ID: <53F1D105.1070107@nvidia.com> References: <1407452515-2390-1-git-send-email-ttynkkynen@nvidia.com> <1407452515-2390-2-git-send-email-ttynkkynen@nvidia.com> <20140817152854.5406BC40ADD@trevor.secretlab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140817152854.5406BC40ADD@trevor.secretlab.ca> 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 To: Grant Likely Cc: devicetree@vger.kernel.org, Daniel Lezcano , linux-pm@vger.kernel.org, Stephen Warren , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Rob Herring , Thierry Reding , linux-tegra@vger.kernel.org, Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org List-Id: linux-pm@vger.kernel.org On 17/08/14 18:28, Grant Likely wrote: > On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen wrote: [...] >> +EXPORT_SYMBOL(of_match_machine); > > Too wordy... > > return of_match_node(matches, of_allnodes); > > :-) > > It could be a static inline, but I don't think it's even worth having a > helper. The callers could just open code the above. > Do you mean all the drivers should be referring to of_allnodes directly? I see that it's indeed exported, but to me that sounds like relying too much on an implementation detail. In fact, Documentation/devicetree/todo.txt even seems to have a TODO entry for its removal ("Remove of_allnodes list and iterate using list of child nodes alone"). -- nvpublic From mboxrd@z Thu Jan 1 00:00:00 1970 From: ttynkkynen@nvidia.com (Tuomas Tynkkynen) Date: Mon, 18 Aug 2014 13:10:13 +0300 Subject: [PATCH 1/3] of: Add of_match_machine helper In-Reply-To: <20140817152854.5406BC40ADD@trevor.secretlab.ca> References: <1407452515-2390-1-git-send-email-ttynkkynen@nvidia.com> <1407452515-2390-2-git-send-email-ttynkkynen@nvidia.com> <20140817152854.5406BC40ADD@trevor.secretlab.ca> Message-ID: <53F1D105.1070107@nvidia.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 17/08/14 18:28, Grant Likely wrote: > On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen wrote: [...] >> +EXPORT_SYMBOL(of_match_machine); > > Too wordy... > > return of_match_node(matches, of_allnodes); > > :-) > > It could be a static inline, but I don't think it's even worth having a > helper. The callers could just open code the above. > Do you mean all the drivers should be referring to of_allnodes directly? I see that it's indeed exported, but to me that sounds like relying too much on an implementation detail. In fact, Documentation/devicetree/todo.txt even seems to have a TODO entry for its removal ("Remove of_allnodes list and iterate using list of child nodes alone"). -- nvpublic From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754802AbaHRKKW (ORCPT ); Mon, 18 Aug 2014 06:10:22 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:11421 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751245AbaHRKKS (ORCPT ); Mon, 18 Aug 2014 06:10:18 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 18 Aug 2014 03:00:46 -0700 Message-ID: <53F1D105.1070107@nvidia.com> Date: Mon, 18 Aug 2014 13:10:13 +0300 From: Tuomas Tynkkynen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Grant Likely CC: Rob Herring , Stephen Warren , Thierry Reding , , , , , , "Rafael J. Wysocki" , Daniel Lezcano , Lorenzo Pieralisi Subject: Re: [PATCH 1/3] of: Add of_match_machine helper References: <1407452515-2390-1-git-send-email-ttynkkynen@nvidia.com> <1407452515-2390-2-git-send-email-ttynkkynen@nvidia.com> <20140817152854.5406BC40ADD@trevor.secretlab.ca> In-Reply-To: <20140817152854.5406BC40ADD@trevor.secretlab.ca> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/08/14 18:28, Grant Likely wrote: > On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen wrote: [...] >> +EXPORT_SYMBOL(of_match_machine); > > Too wordy... > > return of_match_node(matches, of_allnodes); > > :-) > > It could be a static inline, but I don't think it's even worth having a > helper. The callers could just open code the above. > Do you mean all the drivers should be referring to of_allnodes directly? I see that it's indeed exported, but to me that sounds like relying too much on an implementation detail. In fact, Documentation/devicetree/todo.txt even seems to have a TODO entry for its removal ("Remove of_allnodes list and iterate using list of child nodes alone"). -- nvpublic