Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format
Subsystems (2)
PATCH 1/1 Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format
fix warnings (with EXTRA_CFLAGS=-W):
format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]
--- drivers/base/regmap/regcache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/base/regmap/regcache.c +1 -1
@@ -590,7 +590,7 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, count = cur - base; -dev_dbg (map->dev,"Writing %d bytes for %d registers from 0x%x-0x%x\n" , +dev_dbg (map->dev,"Writing %lu bytes for %d registers from 0x%x-0x%x\n" , count * val_bytes, count, base, cur -1 ); map->cache_bypass =1 ;
Signature · 1 line
1.7.7.6
Quoted 14 lines · Chen Gang
fix warnings (with EXTRA_CFLAGS=-W):
format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]Signed-off-by Chen Gang <[email protected]>--- drivers/base/regmap/regcache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/base/regmap/regcache.c +0
-0
drivers/base/regmap/regcache.c static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, · line 596
Quoted 8 lines
drivers/base/regmap/regcache.c +1
-1@@ -590,7 +590,7 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, count = cur - base; -dev_dbg (map->dev,"Writing %d bytes for %d registers from 0x%x-0x%x\n" , +dev_dbg (map->dev,"Writing %lu bytes for %d registers from 0x%x-0x%x\n" , count * val_bytes, count, base, cur -1 ); map->cache_bypass =1 ;
Please read Documentation/printk-formats.txt. Thanks.
Bjørn
Quoted 19 lines · Bjørn Mork
Quoted 17 lines · Chen Gang
Quoted 17 lines
fix warnings (with EXTRA_CFLAGS=-W):
format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]Signed-off-by Chen Gang <[email protected]>--- drivers/base/regmap/regcache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/base/regmap/regcache.c +0
-0@@ -590,7 +590,7 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, count = cur - base;
Quoted 8 lines
Quoted 5 lines
drivers/base/regmap/regcache.c static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, · line 596
Quoted 5 lines
drivers/base/regmap/regcache.c +1
-1-dev_dbg (map->dev,"Writing %d bytes for %d registers from 0x%x-0x%x\n" , +dev_dbg (map->dev,"Writing %lu bytes for %d registers from 0x%x-0x%x\n" , count * val_bytes, count, base, cur -1 ); map->cache_bypass =1 ;Please read
Documentation/printk-formats.txt. Thanks.
thanks, I will send patch v2 (I should use "%zu" instead of "%lu")
:-)
Quoted 4 lines
Bjørn
Signature · 3 lines
Chen Gang Asianux Corporation
PATCH v2 1/1 Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format
fix warnings (with EXTRA_CFLAGS=-W):
format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]
--- drivers/base/regmap/regcache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/base/regmap/regcache.c +1 -1
@@ -590,7 +590,7 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, count = cur - base; -dev_dbg (map->dev,"Writing %d bytes for %d registers from 0x%x-0x%x\n" , +dev_dbg (map->dev,"Writing %zu bytes for %d registers from 0x%x-0x%x\n" , count * val_bytes, count, base, cur -1 ); map->cache_bypass =1 ;
Signature · 1 line
1.7.7.6
Re: [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format
Quoted 6 lines · Chen Gang
fix warnings (with EXTRA_CFLAGS=-W):
format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]Signed-off-by Chen Gang <[email protected]>
I've already applied a patch for this from someone else.
Re: [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format
Quoted 8 lines · Mark Brown
Quoted 6 lines · Chen Gang
Quoted 6 lines
fix warnings (with EXTRA_CFLAGS=-W):
format ‘%d’ expects argument of type ‘int’,
but argument 4 has type ‘size_t’ [-Wformat]Signed-off-by Chen Gang <[email protected]>I've already applied a patch for this from someone else.
ok, thanks.
it seems, I am too late !!
:-)
Signature · 3 lines
Chen Gang Asianux Corporation