From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC for-4.5 05/12] xen/dts: Add dt_parse_phandle_with_args and dt_parse_phandle Date: Wed, 19 Feb 2014 16:52:31 +0000 Message-ID: <5304E14F.5090507@linaro.org> References: <1391794991-5919-1-git-send-email-julien.grall@linaro.org> <1391794991-5919-6-git-send-email-julien.grall@linaro.org> <1392813280.29739.43.camel@kazak.uk.xensource.com> <5304D924.4090504@linaro.org> <1392827186.29739.92.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WGANv-0001LI-Im for xen-devel@lists.xenproject.org; Wed, 19 Feb 2014 16:52:35 +0000 Received: by mail-ea0-f179.google.com with SMTP id q10so495651ead.10 for ; Wed, 19 Feb 2014 08:52:33 -0800 (PST) In-Reply-To: <1392827186.29739.92.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 02/19/2014 04:26 PM, Ian Campbell wrote: > On Wed, 2014-02-19 at 16:17 +0000, Julien Grall wrote: >>>> +/** >>>> + * dt_parse_phandle - Resolve a phandle property to a device_node pointer >>>> + * @np: Pointer to device node holding phandle property >>>> + * @phandle_name: Name of property holding a phandle value >>>> + * @index: For properties holding a table of phandles, this is the index into >>>> + * the table >>> >>> Otherwise it is -1 or something else? >> >> Even with one element, the property contains a table of phandles. So, >> the first index is always 0. > > OK, so the "For a properties holding a table..." bit is misleading > (that's the "otherwise" I was referring too, e..g properties which do > not hold a table0, since this is always the index, even if the table has > a single element. It was copied from Linux. Shall I update the comment? -- Julien Grall