All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] cmd_sf warning on size_t
@ 2011-12-14  6:36 Thomas Chou
  2011-12-14  9:34 ` Andreas Bießmann
  2011-12-14 10:04 ` [U-Boot] [PATCH/RFC] fix several printf() modifiers Andreas Bießmann
  0 siblings, 2 replies; 19+ messages in thread
From: Thomas Chou @ 2011-12-14  6:36 UTC (permalink / raw)
  To: u-boot

Hi Mike,

I got this warning on cmd_sf.c,

cmd_sf.c: In function `spi_flash_update_block':
cmd_sf.c:130: warning: unsigned int format, size_t arg (arg 4)
cmd_sf.c:135: warning: unsigned int format, size_t arg (arg 3)


It was related to our arch/avr32|blackfin|nios2/asm/posix_types.h
typedef unsigned long __kernel_size_t;

While most other 32 bits archs use unsigned int, we three use unsigned long.

It is said in linux-2.6/include/asm-generic/posix_types.h
/*
  * Most 32 bit architectures use "unsigned int" size_t,
  * and all 64 bit architectures use "unsigned long" size_t.
  */

Shall we fix the cmd_sf.c, or shall I change size_t to unsigned int as 
other 32 bits archs do?

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] cmd_sf warning on size_t
  2011-12-14  6:36 [U-Boot] cmd_sf warning on size_t Thomas Chou
@ 2011-12-14  9:34 ` Andreas Bießmann
  2011-12-14 10:04 ` [U-Boot] [PATCH/RFC] fix several printf() modifiers Andreas Bießmann
  1 sibling, 0 replies; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-14  9:34 UTC (permalink / raw)
  To: u-boot

Dear Thomas Chou,

On 14.12.2011 07:36, Thomas Chou wrote:
> Hi Mike,
> 
> I got this warning on cmd_sf.c,
> 
> cmd_sf.c: In function `spi_flash_update_block':
> cmd_sf.c:130: warning: unsigned int format, size_t arg (arg 4)
> cmd_sf.c:135: warning: unsigned int format, size_t arg (arg 3)

I tumble over this these days too.

> It was related to our arch/avr32|blackfin|nios2/asm/posix_types.h
> typedef unsigned long __kernel_size_t;
> 
> While most other 32 bits archs use unsigned int, we three use unsigned
> long.
> 
> It is said in linux-2.6/include/asm-generic/posix_types.h
> /*
>  * Most 32 bit architectures use "unsigned int" size_t,
>  * and all 64 bit architectures use "unsigned long" size_t.
>  */
> 
> Shall we fix the cmd_sf.c, or shall I change size_t to unsigned int as
> other 32 bits archs do?

I tend to fix the cmd_sf.c and arch/avr32/cpu/at32ap700x/mmu.c
->
mmu.c:25: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'uintptr_t'

I have already a patch, and would send it.

best regards

Andreas Bie?mann

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-14  6:36 [U-Boot] cmd_sf warning on size_t Thomas Chou
  2011-12-14  9:34 ` Andreas Bießmann
@ 2011-12-14 10:04 ` Andreas Bießmann
  2011-12-15  2:22   ` Thomas Chou
                     ` (2 more replies)
  1 sibling, 3 replies; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-14 10:04 UTC (permalink / raw)
  To: u-boot

From: Andreas Bie?mann <biessmann@corscience.de>

Some architectures define size_t to unsigned long even though they are 32 bit
architectures.

This patch fixes several warnings when running MAKEALL for avr32 architecture:

---8<---
mmu.c: In function 'mmu_init_r':
mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t'
fat.c: In function 'do_fat_read':
fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
cmd_sf.c: In function 'spi_flash_update_block':
cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
--->8---

Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
---
 arch/avr32/cpu/at32ap700x/mmu.c |    2 +-
 common/cmd_sf.c                 |    4 ++--
 fs/fat/fat.c                    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/avr32/cpu/at32ap700x/mmu.c b/arch/avr32/cpu/at32ap700x/mmu.c
index c3a1b93..fda06a9 100644
--- a/arch/avr32/cpu/at32ap700x/mmu.c
+++ b/arch/avr32/cpu/at32ap700x/mmu.c
@@ -22,7 +22,7 @@ void mmu_init_r(unsigned long dest_addr)
 	 */
 	vmr_table_addr = (uintptr_t)&mmu_vmr_table;
 	sysreg_write(PTBR, vmr_table_addr);
-	printf("VMR table @ 0x%08x\n", vmr_table_addr);
+	printf("VMR table @ %#lx\n", vmr_table_addr);
 
 	/* Enable paging */
 	sysreg_write(MMUCR, SYSREG_BF(DRP, 1) | SYSREG_BF(DLA, 1)
diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index 7225656..612fd18 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -127,12 +127,12 @@ static int do_spi_flash_probe(int argc, char * const argv[])
 static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset,
 		size_t len, const char *buf, char *cmp_buf, size_t *skipped)
 {
-	debug("offset=%#x, sector_size=%#x, len=%#x\n",
+	debug("offset=%#x, sector_size=%#x, len=%#zx\n",
 		offset, flash->sector_size, len);
 	if (spi_flash_read(flash, offset, len, cmp_buf))
 		return "read";
 	if (memcmp(cmp_buf, buf, len) == 0) {
-		debug("Skip region %x size %x: no change\n",
+		debug("Skip region %x size %zx: no change\n",
 			offset, len);
 		*skipped += len;
 		return NULL;
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 9a29458..dbb8db9 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -876,7 +876,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
 	while (1) {
 		int i;
 
-		debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%d\n",
+		debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n",
 			cursect, mydata->clust_size, DIRENTSPERBLOCK);
 
 		if (disk_read(cursect,
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-14 10:04 ` [U-Boot] [PATCH/RFC] fix several printf() modifiers Andreas Bießmann
@ 2011-12-15  2:22   ` Thomas Chou
  2011-12-15  2:39     ` Graeme Russ
  2011-12-15  5:35   ` Mike Frysinger
  2011-12-15  8:56   ` [U-Boot] [PATCH v2 0/3] fix several printf() length modifers Andreas Bießmann
  2 siblings, 1 reply; 19+ messages in thread
From: Thomas Chou @ 2011-12-15  2:22 UTC (permalink / raw)
  To: u-boot

On 12/14/2011 06:04 PM, Andreas Bie?mann wrote:
> From: Andreas Bie?mann<biessmann@corscience.de>
>
> Some architectures define size_t to unsigned long even though they are 32 bit
> architectures.
>
> This patch fixes several warnings when running MAKEALL for avr32 architecture:

Hi Andreas,

Thanks. I have tested cmd_sf and fat.

Tested-by: Thomas Chou <thomas@wytron.com.tw>

I would suggest splitting this patch into three, as they related to 
different custodians.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-15  2:22   ` Thomas Chou
@ 2011-12-15  2:39     ` Graeme Russ
  2011-12-15  5:36       ` Mike Frysinger
  0 siblings, 1 reply; 19+ messages in thread
From: Graeme Russ @ 2011-12-15  2:39 UTC (permalink / raw)
  To: u-boot

Hi Thomas,

On Dec 15, 2011 1:22 PM, "Thomas Chou" <thomas@wytron.com.tw> wrote:
>
> On 12/14/2011 06:04 PM, Andreas Bie?mann wrote:
>>
>> From: Andreas Bie?mann<biessmann@corscience.de>
>>
>> Some architectures define size_t to unsigned long even though they are
32 bit
>> architectures.
>>
>> This patch fixes several warnings when running MAKEALL for avr32
architecture:
>
>
> Hi Andreas,
>
> Thanks. I have tested cmd_sf and fat.
>
> Tested-by: Thomas Chou <thomas@wytron.com.tw>
>
> I would suggest splitting this patch into three, as they related to
different custodians.

No, that is not true - the patch is a single logical unit

The three maintainers can each provide an Ack

Regards,

Graeme

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-14 10:04 ` [U-Boot] [PATCH/RFC] fix several printf() modifiers Andreas Bießmann
  2011-12-15  2:22   ` Thomas Chou
@ 2011-12-15  5:35   ` Mike Frysinger
  2011-12-15  8:30     ` Andreas Bießmann
  2011-12-15  8:56   ` [U-Boot] [PATCH v2 0/3] fix several printf() length modifers Andreas Bießmann
  2 siblings, 1 reply; 19+ messages in thread
From: Mike Frysinger @ 2011-12-15  5:35 UTC (permalink / raw)
  To: u-boot

On Wednesday 14 December 2011 05:04:07 Andreas Bie?mann wrote:
> --- a/arch/avr32/cpu/at32ap700x/mmu.c
> +++ b/arch/avr32/cpu/at32ap700x/mmu.c
>
> -	printf("VMR table @ 0x%08x\n", vmr_table_addr);
> +	printf("VMR table @ %#lx\n", vmr_table_addr);

this isn't the same.  probably should be %08lx.

> --- a/common/cmd_sf.c
> +++ b/common/cmd_sf.c
>
> -	debug("offset=%#x, sector_size=%#x, len=%#x\n",
> +	debug("offset=%#x, sector_size=%#x, len=%#zx\n",
>
> -		debug("Skip region %x size %x: no change\n",
> +		debug("Skip region %x size %zx: no change\n",
>
> --- a/fs/fat/fat.c
> +++ b/fs/fat/fat.c
> 
> -		debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%d\n",
> +		debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n",

these look good.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111215/e0092fcb/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-15  2:39     ` Graeme Russ
@ 2011-12-15  5:36       ` Mike Frysinger
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2011-12-15  5:36 UTC (permalink / raw)
  To: u-boot

On Wednesday 14 December 2011 21:39:48 Graeme Russ wrote:
> On Dec 15, 2011 1:22 PM, "Thomas Chou" wrote:
> > I would suggest splitting this patch into three, as they related to
> > different custodians.
> 
> No, that is not true - the patch is a single logical unit

meh.  no need to keep them as one.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111215/d7176f13/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-15  5:35   ` Mike Frysinger
@ 2011-12-15  8:30     ` Andreas Bießmann
  2011-12-15 19:22       ` Mike Frysinger
  0 siblings, 1 reply; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-15  8:30 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

On 15.12.2011 06:35, Mike Frysinger wrote:
> On Wednesday 14 December 2011 05:04:07 Andreas Bie?mann wrote:
>> --- a/arch/avr32/cpu/at32ap700x/mmu.c
>> +++ b/arch/avr32/cpu/at32ap700x/mmu.c
>>
>> -	printf("VMR table @ 0x%08x\n", vmr_table_addr);
>> +	printf("VMR table @ %#lx\n", vmr_table_addr);
> 
> this isn't the same.  probably should be %08lx.

You are right, but as you may know the memory map for at32ap7000 has its
SDRAM physically at 0x10000000. Therefore the result will be the same
for 0x%08lx and %#lx (in all currently available boards).
But maybe one will locate the vmr_table sometimes in SRAM some day?

I will provide v2 which change this back, split off in three patches and
add the respective custodian in cc.

best regards

Andreas Bie?mann

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 0/3] fix several printf() length modifers
  2011-12-14 10:04 ` [U-Boot] [PATCH/RFC] fix several printf() modifiers Andreas Bießmann
  2011-12-15  2:22   ` Thomas Chou
  2011-12-15  5:35   ` Mike Frysinger
@ 2011-12-15  8:56   ` Andreas Bießmann
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier Andreas Bießmann
                       ` (2 more replies)
  2 siblings, 3 replies; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-15  8:56 UTC (permalink / raw)
  To: u-boot

From: Andreas Bie?mann <biessmann@corscience.de>

Andreas Bie?mann (3):
  cmd_sf.c: fix printf() length modifier
  fat.c: fix printf() length modifier
  avr32:mmu.c: fix printf() length modifier

 arch/avr32/cpu/at32ap700x/mmu.c |    2 +-
 common/cmd_sf.c                 |    4 ++--
 fs/fat/fat.c                    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

-- 
1.7.7.3

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier
  2011-12-15  8:56   ` [U-Boot] [PATCH v2 0/3] fix several printf() length modifers Andreas Bießmann
@ 2011-12-15  8:56     ` Andreas Bießmann
  2011-12-15 12:20       ` Mike Frysinger
  2011-12-17 22:56       ` Wolfgang Denk
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 2/3] fat.c: " Andreas Bießmann
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 3/3] avr32:mmu.c: " Andreas Bießmann
  2 siblings, 2 replies; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-15  8:56 UTC (permalink / raw)
  To: u-boot

From: Andreas Bie?mann <biessmann@corscience.de>

size_t is not always 'unsigned int', use corret length modifer.

This patch fixes following warning:

---8<---
cmd_sf.c: In function 'spi_flash_update_block':
cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
--->8---

Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
---
changes since v1: split off into single patches

total: 0 errors, 0 warnings, 14 lines checked

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE

0001-cmd_sf.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission.

 common/cmd_sf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index 7225656..612fd18 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -127,12 +127,12 @@ static int do_spi_flash_probe(int argc, char * const argv[])
 static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset,
 		size_t len, const char *buf, char *cmp_buf, size_t *skipped)
 {
-	debug("offset=%#x, sector_size=%#x, len=%#x\n",
+	debug("offset=%#x, sector_size=%#x, len=%#zx\n",
 		offset, flash->sector_size, len);
 	if (spi_flash_read(flash, offset, len, cmp_buf))
 		return "read";
 	if (memcmp(cmp_buf, buf, len) == 0) {
-		debug("Skip region %x size %x: no change\n",
+		debug("Skip region %x size %zx: no change\n",
 			offset, len);
 		*skipped += len;
 		return NULL;
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 2/3] fat.c: fix printf() length modifier
  2011-12-15  8:56   ` [U-Boot] [PATCH v2 0/3] fix several printf() length modifers Andreas Bießmann
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier Andreas Bießmann
@ 2011-12-15  8:56     ` Andreas Bießmann
  2011-12-15 12:21       ` Mike Frysinger
  2011-12-17 22:56       ` Wolfgang Denk
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 3/3] avr32:mmu.c: " Andreas Bießmann
  2 siblings, 2 replies; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-15  8:56 UTC (permalink / raw)
  To: u-boot

From: Andreas Bie?mann <biessmann@corscience.de>

The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no
fixed size. Therefor use correct length modifer for printf() statement to
prevent compiler warnings.

This patch fixes following warning:

---8<---
fat.c: In function 'do_fat_read':
fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
--->8---

Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
cc: rjones at nexus-tech.net
cc: kharris at nexus-tech.net
---
changes since v1: split off into single patches

total: 0 errors, 0 warnings, 8 lines checked

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE

0002-fat.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission.

 fs/fat/fat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 9a29458..dbb8db9 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -876,7 +876,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
 	while (1) {
 		int i;
 
-		debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%d\n",
+		debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n",
 			cursect, mydata->clust_size, DIRENTSPERBLOCK);
 
 		if (disk_read(cursect,
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 3/3] avr32:mmu.c: fix printf() length modifier
  2011-12-15  8:56   ` [U-Boot] [PATCH v2 0/3] fix several printf() length modifers Andreas Bießmann
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier Andreas Bießmann
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 2/3] fat.c: " Andreas Bießmann
@ 2011-12-15  8:56     ` Andreas Bießmann
  2011-12-15 12:21       ` Mike Frysinger
  2011-12-17 22:57       ` Wolfgang Denk
  2 siblings, 2 replies; 19+ messages in thread
From: Andreas Bießmann @ 2011-12-15  8:56 UTC (permalink / raw)
  To: u-boot

From: Andreas Bie?mann <biessmann@corscience.de>

avr32 uses unsigned long addresses, fix the printf() length modifier for that
fact.

Before this patch following warning occours:

---8<---
mmu.c: In function 'mmu_init_r':
mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t'
--->8---

Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
cc: Mike Frysinger <vapier@gentoo.org>
cc: Thomas Chou <thomas@wytron.com.tw>
cc: Reinhard Meyer <u-boot@emk-elektronik.de>
---
changes since v1: split off into single patches

total: 0 errors, 0 warnings, 8 lines checked

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE

0003-avr32-mmu.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission.

 arch/avr32/cpu/at32ap700x/mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/avr32/cpu/at32ap700x/mmu.c b/arch/avr32/cpu/at32ap700x/mmu.c
index c3a1b93..0e28b21 100644
--- a/arch/avr32/cpu/at32ap700x/mmu.c
+++ b/arch/avr32/cpu/at32ap700x/mmu.c
@@ -22,7 +22,7 @@ void mmu_init_r(unsigned long dest_addr)
 	 */
 	vmr_table_addr = (uintptr_t)&mmu_vmr_table;
 	sysreg_write(PTBR, vmr_table_addr);
-	printf("VMR table @ 0x%08x\n", vmr_table_addr);
+	printf("VMR table @ 0x%08lx\n", vmr_table_addr);
 
 	/* Enable paging */
 	sysreg_write(MMUCR, SYSREG_BF(DRP, 1) | SYSREG_BF(DLA, 1)
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier Andreas Bießmann
@ 2011-12-15 12:20       ` Mike Frysinger
  2011-12-17 22:56       ` Wolfgang Denk
  1 sibling, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2011-12-15 12:20 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>

if it doesn't get picked up by someone else, i'll push via my sf branch
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111215/11f2226f/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 2/3] fat.c: fix printf() length modifier
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 2/3] fat.c: " Andreas Bießmann
@ 2011-12-15 12:21       ` Mike Frysinger
  2011-12-17 22:56       ` Wolfgang Denk
  1 sibling, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2011-12-15 12:21 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111215/d14ee2ae/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 3/3] avr32:mmu.c: fix printf() length modifier
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 3/3] avr32:mmu.c: " Andreas Bießmann
@ 2011-12-15 12:21       ` Mike Frysinger
  2011-12-17 22:57       ` Wolfgang Denk
  1 sibling, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2011-12-15 12:21 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111215/59e66404/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH/RFC] fix several printf() modifiers
  2011-12-15  8:30     ` Andreas Bießmann
@ 2011-12-15 19:22       ` Mike Frysinger
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2011-12-15 19:22 UTC (permalink / raw)
  To: u-boot

On Thursday 15 December 2011 03:30:37 Andreas Bie?mann wrote:
> On 15.12.2011 06:35, Mike Frysinger wrote:
> > On Wednesday 14 December 2011 05:04:07 Andreas Bie?mann wrote:
> >> --- a/arch/avr32/cpu/at32ap700x/mmu.c
> >> +++ b/arch/avr32/cpu/at32ap700x/mmu.c
> >> 
> >> -	printf("VMR table @ 0x%08x\n", vmr_table_addr);
> >> +	printf("VMR table @ %#lx\n", vmr_table_addr);
> > 
> > this isn't the same.  probably should be %08lx.
> 
> You are right, but as you may know the memory map for at32ap7000 has its
> SDRAM physically at 0x10000000. Therefore the result will be the same
> for 0x%08lx and %#lx (in all currently available boards).

i don't know anything about AVR32 ;)

> But maybe one will locate the vmr_table sometimes in SRAM some day?

seems safer, although probably unlikely as i think the AVR32 is pretty much 
dead nowadays ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111215/6a4b7ec0/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier Andreas Bießmann
  2011-12-15 12:20       ` Mike Frysinger
@ 2011-12-17 22:56       ` Wolfgang Denk
  1 sibling, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2011-12-17 22:56 UTC (permalink / raw)
  To: u-boot

Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

In message <1323939415-21743-2-git-send-email-andreas.devel@googlemail.com> you wrote:
> From: Andreas Bie?mann <biessmann@corscience.de>
> 
> size_t is not always 'unsigned int', use corret length modifer.
> 
> This patch fixes following warning:
> 
> ---8<---
> cmd_sf.c: In function 'spi_flash_update_block':
> cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t'
> cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'
> --->8---
> 
> Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
> cc: Mike Frysinger <vapier@gentoo.org>
> cc: Thomas Chou <thomas@wytron.com.tw>
> ---
> changes since v1: split off into single patches
> 
> total: 0 errors, 0 warnings, 14 lines checked
> 
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
> 
> 0001-cmd_sf.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission.
> 
>  common/cmd_sf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anything that is worth doing at all is worth doing well.
                                       -- Philip Earl of Chesterfield

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 2/3] fat.c: fix printf() length modifier
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 2/3] fat.c: " Andreas Bießmann
  2011-12-15 12:21       ` Mike Frysinger
@ 2011-12-17 22:56       ` Wolfgang Denk
  1 sibling, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2011-12-17 22:56 UTC (permalink / raw)
  To: u-boot

Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

In message <1323939415-21743-3-git-send-email-andreas.devel@googlemail.com> you wrote:
> From: Andreas Bie?mann <biessmann@corscience.de>
> 
> The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no
> fixed size. Therefor use correct length modifer for printf() statement to
> prevent compiler warnings.
> 
> This patch fixes following warning:
> 
> ---8<---
> fat.c: In function 'do_fat_read':
> fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
> --->8---
> 
> Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
> cc: Mike Frysinger <vapier@gentoo.org>
> cc: Thomas Chou <thomas@wytron.com.tw>
> cc: rjones at nexus-tech.net
> cc: kharris at nexus-tech.net
> ---
> changes since v1: split off into single patches
> 
> total: 0 errors, 0 warnings, 8 lines checked
> 
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
> 
> 0002-fat.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission.
> 
>  fs/fat/fat.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Send lawyers, guns and money..."  - Lyrics from a Warren Zevon song

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 3/3] avr32:mmu.c: fix printf() length modifier
  2011-12-15  8:56     ` [U-Boot] [PATCH v2 3/3] avr32:mmu.c: " Andreas Bießmann
  2011-12-15 12:21       ` Mike Frysinger
@ 2011-12-17 22:57       ` Wolfgang Denk
  1 sibling, 0 replies; 19+ messages in thread
From: Wolfgang Denk @ 2011-12-17 22:57 UTC (permalink / raw)
  To: u-boot

Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

In message <1323939415-21743-4-git-send-email-andreas.devel@googlemail.com> you wrote:
> From: Andreas Bie?mann <biessmann@corscience.de>
> 
> avr32 uses unsigned long addresses, fix the printf() length modifier for that
> fact.
> 
> Before this patch following warning occours:
> 
> ---8<---
> mmu.c: In function 'mmu_init_r':
> mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t'
> --->8---
> 
> Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
> cc: Mike Frysinger <vapier@gentoo.org>
> cc: Thomas Chou <thomas@wytron.com.tw>
> cc: Reinhard Meyer <u-boot@emk-elektronik.de>
> ---
> changes since v1: split off into single patches
> 
> total: 0 errors, 0 warnings, 8 lines checked
> 
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
> 
> 0003-avr32-mmu.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission.
> 
>  arch/avr32/cpu/at32ap700x/mmu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Spock, did you see the looks on their faces?"
"Yes, Captain, a sort of vacant contentment."

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-12-17 22:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14  6:36 [U-Boot] cmd_sf warning on size_t Thomas Chou
2011-12-14  9:34 ` Andreas Bießmann
2011-12-14 10:04 ` [U-Boot] [PATCH/RFC] fix several printf() modifiers Andreas Bießmann
2011-12-15  2:22   ` Thomas Chou
2011-12-15  2:39     ` Graeme Russ
2011-12-15  5:36       ` Mike Frysinger
2011-12-15  5:35   ` Mike Frysinger
2011-12-15  8:30     ` Andreas Bießmann
2011-12-15 19:22       ` Mike Frysinger
2011-12-15  8:56   ` [U-Boot] [PATCH v2 0/3] fix several printf() length modifers Andreas Bießmann
2011-12-15  8:56     ` [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier Andreas Bießmann
2011-12-15 12:20       ` Mike Frysinger
2011-12-17 22:56       ` Wolfgang Denk
2011-12-15  8:56     ` [U-Boot] [PATCH v2 2/3] fat.c: " Andreas Bießmann
2011-12-15 12:21       ` Mike Frysinger
2011-12-17 22:56       ` Wolfgang Denk
2011-12-15  8:56     ` [U-Boot] [PATCH v2 3/3] avr32:mmu.c: " Andreas Bießmann
2011-12-15 12:21       ` Mike Frysinger
2011-12-17 22:57       ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.