[U-Boot-Users] [PATCH] Fix some more printf() format problems.

Signed-off-by: Kumar Gala galak@kernel.crashing.org --- common/cmd_mp.c | 2 +- cpu/mpc85xx/mp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/cmd_mp.c b/common/cmd_mp.c index 26a57c5..59d0d15 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -35,7 +35,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
cpuid = simple_strtoul(argv[1], NULL, 10); if (cpuid >= CONFIG_NR_CPUS) { - printf ("Core num: %d is out of range[0..%d]\n", + printf ("Core num: %ld is out of range[0..%d]\n", cpuid, CONFIG_NR_CPUS - 1); return 1; } diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index a527cf3..75ceba9 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -50,12 +50,12 @@ int cpu_status(int nr)
if (nr == id) { table = (u32 *)get_spin_addr(); - printf("table base @ 0x%08x\n", table); + printf("table base @ 0x%08x\n", (u32)table); } else { table = (u32 *)get_spin_addr() + nr * NUM_BOOT_ENTRY; printf("Running on cpu %d\n", id); printf("\n"); - printf("table @ 0x%08x:\n", table); + printf("table @ 0x%08x:\n", (u32)table); printf(" addr - 0x%08x\n", table[BOOT_ENTRY_ADDR_LOWER]); printf(" pir - 0x%08x\n", table[BOOT_ENTRY_PIR]); printf(" r3 - 0x%08x\n", table[BOOT_ENTRY_R3_LOWER]);

On 09:42 Mon 14 Jul , Kumar Gala wrote:
Signed-off-by: Kumar Gala galak@kernel.crashing.org
common/cmd_mp.c | 2 +- cpu/mpc85xx/mp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/cmd_mp.c b/common/cmd_mp.c index 26a57c5..59d0d15 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -35,7 +35,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
cpuid = simple_strtoul(argv[1], NULL, 10); if (cpuid >= CONFIG_NR_CPUS) {
printf ("Core num: %d is out of range[0..%d]\n",
printf ("Core num: %ld is out of range[0..%d]\n",
is it not %lu? cpuid is a unsigned long.
cpuid, CONFIG_NR_CPUS - 1); return 1;
} diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index a527cf3..75ceba9 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -50,12 +50,12 @@ int cpu_status(int nr)
if (nr == id) { table = (u32 *)get_spin_addr();
printf("table base @ 0x%08x\n", table);
printf("table base @ 0x%08x\n", (u32)table);
why not use %p? it's a pointer.
} else { table = (u32 *)get_spin_addr() + nr * NUM_BOOT_ENTRY; printf("Running on cpu %d\n", id); printf("\n");
printf("table @ 0x%08x:\n", table);
printf("table @ 0x%08x:\n", (u32)table);
same.
printf(" addr - 0x%08x\n", table[BOOT_ENTRY_ADDR_LOWER]); printf(" pir - 0x%08x\n", table[BOOT_ENTRY_PIR]); printf(" r3 - 0x%08x\n", table[BOOT_ENTRY_R3_LOWER]);
-- 1.5.5.1
Best Regards, J.

On Jul 14, 2008, at 10:09 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 09:42 Mon 14 Jul , Kumar Gala wrote:
Signed-off-by: Kumar Gala galak@kernel.crashing.org
common/cmd_mp.c | 2 +- cpu/mpc85xx/mp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/cmd_mp.c b/common/cmd_mp.c index 26a57c5..59d0d15 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -35,7 +35,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
cpuid = simple_strtoul(argv[1], NULL, 10); if (cpuid >= CONFIG_NR_CPUS) {
printf ("Core num: %d is out of range[0..%d]\n",
printf ("Core num: %ld is out of range[0..%d]\n",
is it not %lu? cpuid is a unsigned long.
probably.
cpuid, CONFIG_NR_CPUS - 1); return 1;
} diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index a527cf3..75ceba9 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -50,12 +50,12 @@ int cpu_status(int nr)
if (nr == id) { table = (u32 *)get_spin_addr();
printf("table base @ 0x%08x\n", table);
printf("table base @ 0x%08x\n", (u32)table);
why not use %p? it's a pointer.
do we support %p in u-boot?
- k

cpuid, CONFIG_NR_CPUS - 1); return 1;
} diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index a527cf3..75ceba9 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -50,12 +50,12 @@ int cpu_status(int nr)
if (nr == id) { table = (u32 *)get_spin_addr();
printf("table base @ 0x%08x\n", table);
printf("table base @ 0x%08x\n", (u32)table);
why not use %p? it's a pointer.
do we support %p in u-boot?
yes we support it.
Best Regards, J.
participants (2)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Kumar Gala