diff mbox

[U-Boot,v4,01/13] cmd: fdt: Narrow the check for fdt addr

Message ID 20160705082646.25044-2-maxime.ripard@free-electrons.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Maxime Ripard July 5, 2016, 8:26 a.m. UTC
The current code only checks if the fdt subcommand is fdt addr by checking
whether it starts with 'a'.

Since this is a pretty widely used letter, narrow down that check a bit.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 cmd/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jaehoon Chung Aug. 16, 2016, 1:52 a.m. UTC | #1
Hi,

On 07/05/2016 05:26 PM, Maxime Ripard wrote:
> The current code only checks if the fdt subcommand is fdt addr by checking
> whether it starts with 'a'.
> 
> Since this is a pretty widely used letter, narrow down that check a bit.
> 
> Acked-by: Simon Glass <sjg@chromium.org>
> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

I don't know what these patchset were delegated to me..I think it's not my scope.
Simon is FDT maintainer..Could you check these patch-set?

Best Regards,
Jaehoon Chung

> ---
>  cmd/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/fdt.c b/cmd/fdt.c
> index 898217ffe5f8..0f5923e75a41 100644
> --- a/cmd/fdt.c
> +++ b/cmd/fdt.c
> @@ -87,7 +87,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  	/*
>  	 * Set the address of the fdt
>  	 */
> -	if (argv[1][0] == 'a') {
> +	if (strncmp(argv[1], "ad", 2) == 0) {
>  		unsigned long addr;
>  		int control = 0;
>  		struct fdt_header *blob;
>
Tom Rini Aug. 16, 2016, 1:55 a.m. UTC | #2
On Tue, Aug 16, 2016 at 10:52:04AM +0900, Jaehoon Chung wrote:
> Hi,
> 
> On 07/05/2016 05:26 PM, Maxime Ripard wrote:
> > The current code only checks if the fdt subcommand is fdt addr by checking
> > whether it starts with 'a'.
> > 
> > Since this is a pretty widely used letter, narrow down that check a bit.
> > 
> > Acked-by: Simon Glass <sjg@chromium.org>
> > Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> I don't know what these patchset were delegated to me..I think it's not my scope.
> Simon is FDT maintainer..Could you check these patch-set?

Ah whoops, that would be me.  I assigned Pantelis some FDT stuff in
patchwork too, but I bulk changed it all over to you, sorry!
Jaehoon Chung Aug. 17, 2016, 2:31 a.m. UTC | #3
On 08/16/2016 10:55 AM, Tom Rini wrote:
> On Tue, Aug 16, 2016 at 10:52:04AM +0900, Jaehoon Chung wrote:
>> Hi,
>>
>> On 07/05/2016 05:26 PM, Maxime Ripard wrote:
>>> The current code only checks if the fdt subcommand is fdt addr by checking
>>> whether it starts with 'a'.
>>>
>>> Since this is a pretty widely used letter, narrow down that check a bit.
>>>
>>> Acked-by: Simon Glass <sjg@chromium.org>
>>> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>
>> I don't know what these patchset were delegated to me..I think it's not my scope.
>> Simon is FDT maintainer..Could you check these patch-set?
> 
> Ah whoops, that would be me.  I assigned Pantelis some FDT stuff in
> patchwork too, but I bulk changed it all over to you, sorry!

Thanks! :)  Then I will delegate to you, is it ok?

Best Regards,
Jaehoon Chung

>
Tom Rini Aug. 17, 2016, 12:48 p.m. UTC | #4
On Wed, Aug 17, 2016 at 11:31:18AM +0900, Jaehoon Chung wrote:
> On 08/16/2016 10:55 AM, Tom Rini wrote:
> > On Tue, Aug 16, 2016 at 10:52:04AM +0900, Jaehoon Chung wrote:
> >> Hi,
> >>
> >> On 07/05/2016 05:26 PM, Maxime Ripard wrote:
> >>> The current code only checks if the fdt subcommand is fdt addr by checking
> >>> whether it starts with 'a'.
> >>>
> >>> Since this is a pretty widely used letter, narrow down that check a bit.
> >>>
> >>> Acked-by: Simon Glass <sjg@chromium.org>
> >>> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> >>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >>
> >> I don't know what these patchset were delegated to me..I think it's not my scope.
> >> Simon is FDT maintainer..Could you check these patch-set?
> > 
> > Ah whoops, that would be me.  I assigned Pantelis some FDT stuff in
> > patchwork too, but I bulk changed it all over to you, sorry!
> 
> Thanks! :)  Then I will delegate to you, is it ok?

Sure.
Tom Rini Aug. 21, 2016, 3:06 p.m. UTC | #5
On Tue, Jul 05, 2016 at 10:26:34AM +0200, Maxime Ripard wrote:

> The current code only checks if the fdt subcommand is fdt addr by checking
> whether it starts with 'a'.
> 
> Since this is a pretty widely used letter, narrow down that check a bit.
> 
> Acked-by: Simon Glass <sjg@chromium.org>
> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/cmd/fdt.c b/cmd/fdt.c
index 898217ffe5f8..0f5923e75a41 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -87,7 +87,7 @@  static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	/*
 	 * Set the address of the fdt
 	 */
-	if (argv[1][0] == 'a') {
+	if (strncmp(argv[1], "ad", 2) == 0) {
 		unsigned long addr;
 		int control = 0;
 		struct fdt_header *blob;