public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chunhe Lan <b25806@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2 v3] fdt: Add a do_fixup_by_path_string() function
Date: Mon, 29 Aug 2011 10:54:53 +0800	[thread overview]
Message-ID: <op.v0yfpruqrxq6oa@localhost.localdomain> (raw)
In-Reply-To: <77DC5CB9-2436-4813-855B-FA65EA304DCB@freescale.com>

On Mon, 29 Aug 2011 02:15:15 +0800, Kumar Gala <kumar.gala@freescale.com>  
wrote:

>
> On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote:
>
>> The do_fixup_by_path_string() will set the specified
>> node's property to the value contained in "status".
>> It would just be a wrapper for do_fixup_by_path()
>> that calls strlen on the argument.
>>
>
> Fix where you break the line, should like more like (use upto 75 chars  
> per line):

     OK.

    Thanks.

    -Jack Lan

>     The do_fixup_by_path_string() will set the specified node's property  
> to the
>     value contained in "status".  It would just be a wrapper for
>     do_fixup_by_path() that calls strlen on the argument.
>
>
>> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
>> ---
>> include/fdt_support.h |    7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/fdt_support.h b/include/fdt_support.h
>> index 863024f..1de4a1d 100644
>> --- a/include/fdt_support.h
>> +++ b/include/fdt_support.h
>> @@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path,  
>> const char *prop,
>> 		      const void *val, int len, int create);
>> void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop,
>> 			  u32 val, int create);
>> +
>> +static inline void do_fixup_by_path_string(void *fdt, const char *path,
>> +					   const char *prop, const char *status)
>> +{
>> +	do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1);
>> +}
>> +
>> void do_fixup_by_prop(void *fdt,
>> 		      const char *pname, const void *pval, int plen,
>> 		      const char *prop, const void *val, int len,
>> --
>> 1.5.6.5
>

      reply	other threads:[~2011-08-29  2:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17  6:24 [U-Boot] [PATCH 1/2 v3] fdt: Add a do_fixup_by_path_string() function Chunhe Lan
2011-08-18  0:29 ` Jerry Van Baren
2011-08-18  6:32   ` Lan Chunhe
2011-08-18 15:14   ` Scott Wood
2011-08-28 18:15 ` Kumar Gala
2011-08-29  2:54   ` Chunhe Lan [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=op.v0yfpruqrxq6oa@localhost.localdomain \
    --to=b25806@freescale.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox