Re: [PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 compilation warnings
On 11/9/23 10:13, Patrick DELAUNAY wrote: > Hi, > > > On 10/27/23 16:42, Patrice Chotard wrote: >> From: Patrick Delaunay >> >> When building with AARCH64 defconfig, we got warnings for debug >> message >> - format '%x' expects argument of type 'unsigned int', >> but argument 3 has type 'size_t' {aka 'long unsigned int'}). >> - format '%lx' expects argument of type 'long unsigned int', >> but argument 2 has type 'phys_addr_t' {aka 'long long unsigned >> int'} >> >> Signed-off-by: Patrick Delaunay >> Signed-off-by: Patrice Chotard >> --- >> >> arch/arm/mach-stm32mp/dram_init.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm/mach-stm32mp/dram_init.c >> b/arch/arm/mach-stm32mp/dram_init.c >> index a1e77a42e4f..cb35ed60ca1 100644 >> --- a/arch/arm/mach-stm32mp/dram_init.c >> +++ b/arch/arm/mach-stm32mp/dram_init.c >> @@ -36,7 +36,7 @@ int dram_init(void) >> log_debug("Cannot get RAM size: %d\n", ret); >> return ret; >> } >> - log_debug("RAM init base=%lx, size=%x\n", ram.base, ram.size); >> + log_debug("RAM init base=%p, size=%zx\n", (void *)ram.base, ram.size); >> gd->ram_size = ram.size; >> > > > Reviewed-by: Patrick Delaunay > > Thanks > Patrick > Applied to u-boot-stm32/next Thanks Patrice
Re: [PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 compilation warnings
On 10/27/23 16:42, Patrice Chotard wrote: > From: Patrick Delaunay > > When building with AARCH64 defconfig, we got warnings for debug > message > - format '%x' expects argument of type 'unsigned int', >but argument 3 has type 'size_t' {aka 'long unsigned int'}). > - format '%lx' expects argument of type 'long unsigned int', > but argument 2 has type 'phys_addr_t' {aka 'long long unsigned > int'} > > Signed-off-by: Patrick Delaunay > Signed-off-by: Patrice Chotard > --- > > arch/arm/mach-stm32mp/dram_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-stm32mp/dram_init.c > b/arch/arm/mach-stm32mp/dram_init.c > index a1e77a42e4f..cb35ed60ca1 100644 > --- a/arch/arm/mach-stm32mp/dram_init.c > +++ b/arch/arm/mach-stm32mp/dram_init.c > @@ -36,7 +36,7 @@ int dram_init(void) > log_debug("Cannot get RAM size: %d\n", ret); > return ret; > } > - log_debug("RAM init base=%lx, size=%x\n", ram.base, ram.size); > + log_debug("RAM init base=%p, size=%zx\n", (void *)ram.base, ram.size); > > gd->ram_size = ram.size; > Applied to u-boot-stm32/next Thanks Patrice
Re: [PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 compilation warnings
Hi, On 10/27/23 16:42, Patrice Chotard wrote: From: Patrick Delaunay When building with AARCH64 defconfig, we got warnings for debug message - format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'}). - format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'phys_addr_t' {aka 'long long unsigned int'} Signed-off-by: Patrick Delaunay Signed-off-by: Patrice Chotard --- arch/arm/mach-stm32mp/dram_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c index a1e77a42e4f..cb35ed60ca1 100644 --- a/arch/arm/mach-stm32mp/dram_init.c +++ b/arch/arm/mach-stm32mp/dram_init.c @@ -36,7 +36,7 @@ int dram_init(void) log_debug("Cannot get RAM size: %d\n", ret); return ret; } - log_debug("RAM init base=%lx, size=%x\n", ram.base, ram.size); + log_debug("RAM init base=%p, size=%zx\n", (void *)ram.base, ram.size); gd->ram_size = ram.size; Reviewed-by: Patrick Delaunay Thanks Patrick
[PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 compilation warnings
From: Patrick Delaunay When building with AARCH64 defconfig, we got warnings for debug message - format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'}). - format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'phys_addr_t' {aka 'long long unsigned int'} Signed-off-by: Patrick Delaunay Signed-off-by: Patrice Chotard --- arch/arm/mach-stm32mp/dram_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c index a1e77a42e4f..cb35ed60ca1 100644 --- a/arch/arm/mach-stm32mp/dram_init.c +++ b/arch/arm/mach-stm32mp/dram_init.c @@ -36,7 +36,7 @@ int dram_init(void) log_debug("Cannot get RAM size: %d\n", ret); return ret; } - log_debug("RAM init base=%lx, size=%x\n", ram.base, ram.size); + log_debug("RAM init base=%p, size=%zx\n", (void *)ram.base, ram.size); gd->ram_size = ram.size; -- 2.25.1
[PATCH v1 3/9] stm32mp: dram_init: Fix AARCH64 compilation warnings
From: Patrick Delaunay When building with AARCH64 defconfig, we got warnings for debug message - format '%x' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'}). - format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'phys_addr_t' {aka 'long long unsigned int'} Signed-off-by: Patrick Delaunay Signed-off-by: Patrice Chotard --- arch/arm/mach-stm32mp/dram_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c index a1e77a42e4f..cb35ed60ca1 100644 --- a/arch/arm/mach-stm32mp/dram_init.c +++ b/arch/arm/mach-stm32mp/dram_init.c @@ -36,7 +36,7 @@ int dram_init(void) log_debug("Cannot get RAM size: %d\n", ret); return ret; } - log_debug("RAM init base=%lx, size=%x\n", ram.base, ram.size); + log_debug("RAM init base=%p, size=%zx\n", (void *)ram.base, ram.size); gd->ram_size = ram.size; -- 2.25.1