From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751941AbbCVUFI (ORCPT ); Sun, 22 Mar 2015 16:05:08 -0400 Received: from mail-we0-f181.google.com ([74.125.82.181]:35977 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbbCVUFF (ORCPT ); Sun, 22 Mar 2015 16:05:05 -0400 MIME-Version: 1.0 In-Reply-To: <1426620632-23383-1-git-send-email-computersforpeace@gmail.com> References: <1425924225-22748-2-git-send-email-leif.lindholm@linaro.org> <1426620632-23383-1-git-send-email-computersforpeace@gmail.com> From: Rob Herring Date: Sun, 22 Mar 2015 15:04:43 -0500 X-Google-Sender-Auth: 4K3xIcZu4ZXk85EeUEUU_a2lhqc Message-ID: Subject: Re: [PATCH 1/2] of: handle both '/' and ':' in path strings To: Brian Norris Cc: Peter Hurley , Leif Lindholm , stable , Grant Likely , Rob Herring , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" 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 Tue, Mar 17, 2015 at 2:30 PM, Brian Norris wrote: > Commit 106937e8ccdc ("of: fix handling of '/' in options for > of_find_node_by_path()") caused a regression in OF handling of > stdout-path. While it fixes some cases which have '/' after the ':', it > breaks cases where there is more than one '/' *before* the ':'. > > For example, it breaks this boot string > > stdout-path = "/rdb/serial@f040ab00:115200"; > > So rather than doing sequentialized checks (first for '/', then for ':'; > or vice versa), to get the correct behavior we need to check for the > first occurrence of either one of them. > > It so happens that the handy strcspn() helper can do just that. > > Fixes: 106937e8ccdc ("of: fix handling of '/' in options for of_find_node_by_path()") > Signed-off-by: Brian Norris > Cc: stable@vger.kernel.org Thanks. Applied both and in Linus' tree now. Rob