All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v3 2/9] of_path: add of_find_path_by_node()
Date: Wed, 28 Oct 2015 09:26:23 +0100	[thread overview]
Message-ID: <563086AF.10706@pengutronix.de> (raw)
In-Reply-To: <20151028062054.GQ25308@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1572 bytes --]

On 10/28/2015 07:20 AM, Sascha Hauer wrote:
> On Sun, Oct 25, 2015 at 10:03:29PM +0100, Marc Kleine-Budde wrote:
>> This patch adds the function of_find_path_by_node(), which is similar to
>> of_find_path(), but it translates a device tree node into a barebox device path
>> directly.
>>
>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>> ---
>>  drivers/of/of_path.c | 17 ++++++++++++++++-
>>  include/of.h         |  1 +
>>  2 files changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
>> index ad64bee08af9..690390525919 100644
>> --- a/drivers/of/of_path.c
>> +++ b/drivers/of/of_path.c
>> @@ -126,7 +126,7 @@ static int __of_find_path(struct device_node *node, const char *propname, char *
>>  
>>  	i = 1;
>>  
>> -	while (1) {
>> +	while (propname) {
>>  		ret = of_property_read_string_index(node, propname, i++, &str);
>>  		if (ret)
>>  			break;
> 
> Is this hunk intentional? Is this a fix for something?

Yes, it's called with propname == NULL by int of_find_path_by_node():

> +int of_find_path_by_node(struct device_node *node, char **outpath, unsigned flags) 
> +{ 
> +	return __of_find_path(node, NULL, outpath, flags);
                                    ^^^^

> +} 
> + 

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-10-28  8:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25 21:03 [PATCH v3 0/8] state framework enhancements Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 1/9] of_path: of_find_path() factor out device detection logic into separate function Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 2/9] of_path: add of_find_path_by_node() Marc Kleine-Budde
2015-10-28  6:20   ` Sascha Hauer
2015-10-28  8:26     ` Marc Kleine-Budde [this message]
2015-10-25 21:03 ` [PATCH v3 3/9] state: make use of of_find_path_by_node() and add return -EPROBE_DEFER if device is not available Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 4/9] state: use name of device node as name if alias " Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 5/9] state: disable load command Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 6/9] crypto: Kconfig: add submenu for crypto related config options Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 7/9] crypto: add simple keystore Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 8/9] state: prepare raw backend for hmac support Marc Kleine-Budde
2015-10-25 21:03 ` [PATCH v3 9/9] state: backend_raw: add hamc support Marc Kleine-Budde
2015-10-28  6:24   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=563086AF.10706@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.