All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: "devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH] of/fdt: NULL-terminate the root node path
Date: Fri, 16 Nov 2012 09:38:26 -0600	[thread overview]
Message-ID: <50A65DF2.7010506@gmail.com> (raw)
In-Reply-To: <20121116151610.GF20103@arm.com>

On 11/16/2012 09:16 AM, Catalin Marinas wrote:
> On Fri, Nov 16, 2012 at 03:14:38PM +0000, Catalin Marinas wrote:
>> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Ah, this shouldn't have been here. git commit -c set the author as well.

I'll fix that and apply. Thanks.

Rob

> 
>> Commit 509b7455 (of/fdt: Don't copy garbage after "/" in root node path)
>> sets the path length to 0 to ignore any garbage after "/" in the root
>> node path. This has the side effect of also ignoring '\0' at the end of
>> the root node path. This patch sets the ignores the garbage by setting
>> the last character to '\0' and length to 1.
>>
>> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Cc: Rob Herring <rob.herring@calxeda.com>
>> ---
>>
>> The patch is against linux-next, not sure whether mainline will get the
>> same commit number. Please feel free to fold it into the original patch,
>> whichever is easier. Without this I can't boot arm64, doesn't populate
>> the platform devices.
>>
>>  drivers/of/fdt.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index 73fb8c0..d9b2207 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -186,7 +186,8 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
>>  			 */
>>  			fpsize = 1;
>>  			allocl = 2;
>> -			l = 0;
>> +			l = 1;
>> +			*pathp = '\0';
>>  		} else {
>>  			/* account for '/' and path size minus terminal 0
>>  			 * already in 'l'
> 

      reply	other threads:[~2012-11-16 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 15:14 [PATCH] of/fdt: NULL-terminate the root node path Catalin Marinas
2012-11-16 15:16 ` Catalin Marinas
2012-11-16 15:38   ` Rob Herring [this message]

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=50A65DF2.7010506@gmail.com \
    --to=robherring2@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    /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.