[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51613B16.3030406@asianux.com>
Date: Sun, 07 Apr 2013 17:23:34 +0800
From: Chen Gang <gang.chen@...anux.com>
To: Bjørn Mork <bjorn@...k.no>
CC: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Greg KH <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead
of %d for printf format
On 2013年04月07日 17:08, Bjørn Mork wrote:
> Chen Gang <gang.chen@...anux.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@...anux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists