diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2015-02-05 20:56:24 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2015-02-07 00:15:03 +0900 |
commit | 4e79908044e4ebf186464cf118497458faf0903c (patch) | |
tree | 9116b4651a8c9375e62ed258ea36d7c5515c5e06 /arch/arm/cpu | |
parent | 4431684910217022bad85a0bc931ad9bfb78859f (diff) |
ARM: UniPhier: leave the last element of boot_device_table empty
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>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv7/uniphier/cmd_pinmon.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/uniphier/ph1-pro4/boot-mode.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/uniphier/cmd_pinmon.c b/arch/arm/cpu/armv7/uniphier/cmd_pinmon.c index d8a6361a46..3c1b325976 100644 --- a/arch/arm/cpu/armv7/uniphier/cmd_pinmon.c +++ b/arch/arm/cpu/armv7/uniphier/cmd_pinmon.c @@ -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); diff --git a/arch/arm/cpu/armv7/uniphier/ph1-pro4/boot-mode.c b/arch/arm/cpu/armv7/uniphier/ph1-pro4/boot-mode.c index 90d41865e9..c31b74badd 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-pro4/boot-mode.c +++ b/arch/arm/cpu/armv7/uniphier/ph1-pro4/boot-mode.c @@ -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) |