Thread (10 messages) 10 messages, 4 authors, 2015-03-22

Re: [PATCH 1/2] of: handle both '/' and ':' in path strings

From: Rob Herring <robh@kernel.org>
Date: 2015-03-22 20:05:08
Also in: lkml, stable

On Tue, Mar 17, 2015 at 2:30 PM, Brian Norris
[off-list ref] 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 <computersforpeace@gmail.com>
Cc: stable@vger.kernel.org
Thanks. Applied both and in Linus' tree now.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help