]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: UniPhier: leave the last element of boot_device_table empty
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 5 Feb 2015 11:56:24 +0000 (20:56 +0900)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 10:59:08 +0000 (12:59 +0200)
Checking if the pointer is NULL would be easier to know the tail
of the boot_device_table[] array.
For clarification, add the /* sentinel */ comment.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
arch/arm/cpu/armv7/uniphier/cmd_pinmon.c
arch/arm/cpu/armv7/uniphier/ph1-pro4/boot-mode.c

index d8a6361a46f3267780f6551a5ca836ce4b13a699..3c1b32597646b94a8c7f20be000a4feaff3eb750 100644 (file)
@@ -19,7 +19,7 @@ static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
        puts("Boot Mode Pin:\n");
 
-       for (i = 0; strlen(boot_device_table[i].info); i++)
+       for (i = 0; boot_device_table[i].info; i++)
                printf(" %c %02x %s\n", i == mode_sel ? '*' : ' ', i,
                       boot_device_table[i].info);
 
index 90d41865e924c2b7e83b9ad56c3d546037760bf1..c31b74badd26968550dd6a2f09074c4b4bb7d343 100644 (file)
@@ -45,7 +45,7 @@ struct boot_device_info boot_device_table[] = {
        {BOOT_DEVICE_NONE, "Reserved"},
        {BOOT_DEVICE_NONE, "Reserved"},
        {BOOT_DEVICE_NONE, "Reserved"},
-       {BOOT_DEVICE_NONE, ""}
+       { /* sentinel */ }
 };
 
 int get_boot_mode_sel(void)