From: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 1/2] commands: i2c: do not restrict i2c_write's data to be hex-formatted
Date: Thu, 19 Oct 2017 08:55:26 +0200 [thread overview]
Message-ID: <20171019065526.ulpe5c4saw6xzkot@pengutronix.de> (raw)
In-Reply-To: <20171017135137.4z7dj7zy4furcos7@pengutronix.de>
Hi Uwe and list,
On Tue, Oct 17, 2017 at 03:51:37PM +0200, Uwe Kleine-König wrote:
> On Tue, Oct 17, 2017 at 03:16:24PM +0200, Ulrich Ölmann wrote:
> > The price to pay is needing the usual prefix "0x" for each hex-formatted number.
> >
> > Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
>
> ack for the change. I'd like to see the motivation (i.e. consistency with
> the other commands in barebox as mentioned in the cover letter) in the
> commit log, though.
just sent a v2.
> [...]
> > - *(buf + i) = (char) simple_strtol(argv[optind+i], NULL, 16);
> > + *(buf + i) = (char) simple_strtol(argv[optind+i], NULL, 0);
>
> Maybe change that to:
>
> buf[i] = simple_strtol(...);
>
> which is a bit easier to read and drops an unnecessary cast? (Or should
> that better go in a separate change?)
Fully agreed. Will you prepare a patch?
Best regards
Ulrich
--
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
next prev parent reply other threads:[~2017-10-19 6:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 13:16 [PATCH 0/2] Allow decimally formatted data for the commands "i2c_write" and "spi" Ulrich Ölmann
2017-10-17 13:16 ` [PATCH 1/2] commands: i2c: do not restrict i2c_write's data to be hex-formatted Ulrich Ölmann
2017-10-17 13:51 ` Uwe Kleine-König
2017-10-19 6:55 ` Ulrich Ölmann [this message]
2017-10-17 13:16 ` [PATCH 2/2] commands: spi: do not restrict spi's " Ulrich Ölmann
2017-10-19 6:53 [PATCH 0/2] Allow decimally formatted data for the commands "i2c_write" and "spi" Ulrich Ölmann
2017-10-19 6:53 ` [PATCH 1/2] commands: i2c: do not restrict i2c_write's data to be hex-formatted Ulrich Ölmann
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=20171019065526.ulpe5c4saw6xzkot@pengutronix.de \
--to=u.oelmann@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=u.kleine-koenig@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