From: "Bjørn Mork" <bjorn@mork.no>
To: Chen Gang <gang.chen@asianux.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Greg KH <gregkh@linuxfoundation.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format
Date: Sun, 07 Apr 2013 11:08:27 +0200 [thread overview]
Message-ID: <8761zybtdg.fsf@nemi.mork.no> (raw)
In-Reply-To: <5160E113.9080502@asianux.com> (Chen Gang's message of "Sun, 07 Apr 2013 10:59:31 +0800")
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
next prev parent reply other threads:[~2013-04-07 9:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761zybtdg.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gang.chen@asianux.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox