From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
noralf@tronnes.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: [PATCH V2] staging: fbtft: fix all print warnings reported by sparse
Date: Fri, 10 Apr 2015 15:45:50 +0200 [thread overview]
Message-ID: <1428673550-5890-2-git-send-email-marcus.folkesson@gmail.com> (raw)
In-Reply-To: <1428673550-5890-1-git-send-email-marcus.folkesson@gmail.com>
Warnings reported by sparse:
drivers/staging/fbtft/fbtft-core.c:1004:4: warning: format ‘%d’ expects
argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat=]
par->txbuf.len >> 10, par->txbuf.dma ? "DMA " : "");
drivers/staging/fbtft/fbtft-io.c:63:4: warning: format ‘%d’ expects
argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
__func__, len);
drivers/staging/fbtft/fbtft-io.c:110:5: warning: format ‘%d’ expects
argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat=]
__func__, len);
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
drivers/staging/fbtft/fbtft-core.c | 2 +-
drivers/staging/fbtft/fbtft-io.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 37dcf7e..b82870b 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1000,7 +1000,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
fbtft_sysfs_init(par);
if (par->txbuf.buf)
- sprintf(text1, ", %d KiB %sbuffer memory",
+ sprintf(text1, ", %zu KiB %sbuffer memory",
par->txbuf.len >> 10, par->txbuf.dma ? "DMA " : "");
if (spi)
sprintf(text2, ", spi%d.%d at %d MHz", spi->master->bus_num,
diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c
index 32155a7..9b2f8cf 100644
--- a/drivers/staging/fbtft/fbtft-io.c
+++ b/drivers/staging/fbtft/fbtft-io.c
@@ -59,7 +59,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len)
}
if ((len % 8) != 0) {
dev_err(par->info->device,
- "%s: error: len=%d must be divisible by 8\n",
+ "%s: error: len=%zu must be divisible by 8\n",
__func__, len);
return -EINVAL;
}
@@ -106,7 +106,7 @@ int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len)
if (par->startbyte) {
if (len > 32) {
dev_err(par->info->device,
- "%s: len=%d can't be larger than 32 when using 'startbyte'\n",
+ "%s: len=%zu can't be larger than 32 when using 'startbyte'\n",
__func__, len);
return -EINVAL;
}
--
1.9.1
next prev parent reply other threads:[~2015-04-10 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 19:31 [PATCH] staging: fbtft: fix all print warnings reported by sparse Marcus Folkesson
2015-04-10 13:21 ` Greg Kroah-Hartman
2015-04-10 13:45 ` Changelog: " Marcus Folkesson
2015-04-10 13:45 ` Marcus Folkesson [this message]
2015-04-30 14:40 ` [PATCH V2] " Greg Kroah-Hartman
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=1428673550-5890-2-git-send-email-marcus.folkesson@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=thomas.petazzoni@free-electrons.com \
/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