mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] common: state: use of_property_write_string() where appropriate
Date: Fri, 12 Oct 2018 09:10:55 +0200	[thread overview]
Message-ID: <20181012071055.iyri2e64dug34232@pengutronix.de> (raw)
In-Reply-To: <20181011071302.6366-1-u.oelmann@pengutronix.de>

On Thu, Oct 11, 2018 at 09:13:02AM +0200, Ulrich Ölmann wrote:
> See commit b6089182316d ("treewide: Use of_property_write_string() where
> appropriate").
> 
> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
> ---
>  common/state/state_variables.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/common/state/state_variables.c b/common/state/state_variables.c
> index de9ba4ab61ac..abd714ceda1e 100644
> --- a/common/state/state_variables.c
> +++ b/common/state/state_variables.c
> @@ -339,8 +339,7 @@ static int state_string_export(struct state_variable *var,
>  	int ret = 0;
>  
>  	if (string->value_default) {
> -		ret = of_set_property(node, "default", string->value_default,
> -				      strlen(string->value_default) + 1, 1);
> +		ret = of_property_write_string(node, "default", string->value_default);
>  
>  		if (ret)
>  			return ret;
> @@ -350,8 +349,7 @@ static int state_string_export(struct state_variable *var,
>  		return 0;
>  
>  	if (string->value)
> -		ret = of_set_property(node, "value", string->value,
> -				      strlen(string->value) + 1, 1);
> +		ret = of_property_write_string(node, "value", string->value);
>  
>  	return ret;
>  }
> -- 
> 2.19.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2018-10-12  7:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11  7:13 Ulrich Ölmann
2018-10-12  7:10 ` Sascha Hauer [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=20181012071055.iyri2e64dug34232@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=u.oelmann@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox