From: Ian Campbell Subject: Re: [RFC 01/24] xen/char: dt-uart: Allow the user to give a path to the node Date: Thu, 22 Aug 2013 13:23:46 +0100 Message-ID: <1377174226.9517.90.camel@kazak.uk.xensource.com> References: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> <1376687156-6737-2-git-send-email-julien.grall@linaro.org> <520E98D7.6010405@linaro.org> <5212353A.8060700@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5212353A.8060700@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: patches@linaro.org, xen-devel@lists.xen.org, Andre Przywara , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2013-08-19 at 16:09 +0100, Julien Grall wrote: > On 08/16/2013 10:25 PM, Andre Przywara wrote: > > On 08/16/2013 11:05 PM, Julien Grall wrote: > >> On some board, there is no alias to the UART. To avoid modification in > >> the device tree, dt-uart should also search device by path. > > > > Funny, it wrote almost the same patch two days ago (including the > > variable renaming, minus the "/" check). Thanks for saving me the > > cleanup and send-out ;-) > > It is really useful for Midway! > > > >> To distinguish an alias from a path, dt-uart will check the first > >> character. > >> If it's a / then it's path, otherwise it's an alias. > > > > Is that really needed? In my patch I just try it as an alias first, if > > there is no match (dev == NULL), I try the full path. > > Are there any ambiguities expected between an alias and a full path? > > Following the ePAPR documentation (section 2.2.4), the name property > can't contain '/' in the name. > > I choose this solution, because I want to avoid to call the 2 functions > if it's possible. It's a waste of time to call both if we know that the > path always start with a '/' and alias not. This is hardly a hot path. But in any case: Acked-by: Ian Campbell