* [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format
@ 2013-04-07 2:59 Chen Gang
2013-04-07 9:08 ` Bjørn Mork
0 siblings, 1 reply; 6+ messages in thread
From: Chen Gang @ 2013-04-07 2:59 UTC (permalink / raw)
To: Mark Brown; +Cc: Greg KH, linux-kernel
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 <gang.chen@asianux.com>
---
drivers/base/regmap/regcache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index d81f605..275a2d2 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -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;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format
2013-04-07 2:59 [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format Chen Gang
@ 2013-04-07 9:08 ` Bjørn Mork
2013-04-07 9:23 ` Chen Gang
0 siblings, 1 reply; 6+ messages in thread
From: Bjørn Mork @ 2013-04-07 9:08 UTC (permalink / raw)
To: Chen Gang; +Cc: Mark Brown, Greg KH, linux-kernel
Chen Gang <gang.chen@asianux.com> writes:
> 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 <gang.chen@asianux.com>
> ---
> drivers/base/regmap/regcache.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
> index d81f605..275a2d2 100644
> --- a/drivers/base/regmap/regcache.c
> +++ b/drivers/base/regmap/regcache.c
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format
2013-04-07 9:08 ` Bjørn Mork
@ 2013-04-07 9:23 ` Chen Gang
2013-04-07 9:32 ` [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu " Chen Gang
0 siblings, 1 reply; 6+ messages in thread
From: Chen Gang @ 2013-04-07 9:23 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Mark Brown, Greg KH, linux-kernel
On 2013年04月07日 17:08, Bjørn Mork wrote:
> Chen Gang <gang.chen@asianux.com> writes:
>
>> > 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 <gang.chen@asianux.com>
>> > ---
>> > drivers/base/regmap/regcache.c | 2 +-
>> > 1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
>> > index d81f605..275a2d2 100644
>> > --- a/drivers/base/regmap/regcache.c
>> > +++ b/drivers/base/regmap/regcache.c
>> > @@ -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.
>
thanks, I will send patch v2 (I should use "%zu" instead of "%lu")
:-)
>
> Bjørn
>
>
--
Chen Gang
Asianux Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format
2013-04-07 9:23 ` Chen Gang
@ 2013-04-07 9:32 ` Chen Gang
2013-04-07 11:33 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Chen Gang @ 2013-04-07 9:32 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Mark Brown, Greg KH, linux-kernel
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 <gang.chen@asianux.com>
---
drivers/base/regmap/regcache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index d81f605..a469748 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -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;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format
2013-04-07 9:32 ` [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu " Chen Gang
@ 2013-04-07 11:33 ` Mark Brown
2013-04-07 11:36 ` Chen Gang
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-04-07 11:33 UTC (permalink / raw)
To: Chen Gang; +Cc: Bjørn Mork, Greg KH, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
On Sun, Apr 07, 2013 at 05:32:39PM +0800, Chen Gang wrote:
>
> 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 <gang.chen@asianux.com>
I've already applied a patch for this from someone else.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format
2013-04-07 11:33 ` Mark Brown
@ 2013-04-07 11:36 ` Chen Gang
0 siblings, 0 replies; 6+ messages in thread
From: Chen Gang @ 2013-04-07 11:36 UTC (permalink / raw)
To: Mark Brown; +Cc: Bjørn Mork, Greg KH, linux-kernel
On 2013年04月07日 19:33, Mark Brown wrote:
> On Sun, Apr 07, 2013 at 05:32:39PM +0800, Chen Gang wrote:
>> >
>> > 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 <gang.chen@asianux.com>
> I've already applied a patch for this from someone else.
ok, thanks.
it seems, I am too late !!
:-)
--
Chen Gang
Asianux Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-07 11:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 2:59 [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format Chen Gang
2013-04-07 9:08 ` Bjørn Mork
2013-04-07 9:23 ` Chen Gang
2013-04-07 9:32 ` [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu " Chen Gang
2013-04-07 11:33 ` Mark Brown
2013-04-07 11:36 ` Chen Gang
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.