* [PATCH] staging: fbtft: fix all print warnings reported by sparse
@ 2015-04-07 19:31 Marcus Folkesson
2015-04-10 13:21 ` Greg Kroah-Hartman
2015-04-10 13:45 ` Changelog: " Marcus Folkesson
0 siblings, 2 replies; 5+ messages in thread
From: Marcus Folkesson @ 2015-04-07 19:31 UTC (permalink / raw)
To: Thomas Petazzoni, noralf, Greg Kroah-Hartman
Cc: devel, linux-kernel, Marcus Folkesson
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: fix all print warnings reported by sparse
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
1 sibling, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2015-04-10 13:21 UTC (permalink / raw)
To: Marcus Folkesson; +Cc: Thomas Petazzoni, noralf, devel, linux-kernel
On Tue, Apr 07, 2015 at 09:31:49PM +0200, Marcus Folkesson wrote:
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Please include the exact warning that sparse gives you for this, it's
not obvious to me what is wrong with the original code.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Changelog: staging: fbtft: fix all print warnings reported by sparse
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 ` Marcus Folkesson
2015-04-10 13:45 ` [PATCH V2] " Marcus Folkesson
1 sibling, 1 reply; 5+ messages in thread
From: Marcus Folkesson @ 2015-04-10 13:45 UTC (permalink / raw)
To: Thomas Petazzoni, noralf, Greg Kroah-Hartman; +Cc: devel, linux-kernel
Include sparse-warnings in commit-log according to Gregs comments.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V2] staging: fbtft: fix all print warnings reported by sparse
2015-04-10 13:45 ` Changelog: " Marcus Folkesson
@ 2015-04-10 13:45 ` Marcus Folkesson
2015-04-30 14:40 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Marcus Folkesson @ 2015-04-10 13:45 UTC (permalink / raw)
To: Thomas Petazzoni, noralf, Greg Kroah-Hartman
Cc: devel, linux-kernel, Marcus Folkesson
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V2] staging: fbtft: fix all print warnings reported by sparse
2015-04-10 13:45 ` [PATCH V2] " Marcus Folkesson
@ 2015-04-30 14:40 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2015-04-30 14:40 UTC (permalink / raw)
To: Marcus Folkesson; +Cc: Thomas Petazzoni, noralf, devel, linux-kernel
On Fri, Apr 10, 2015 at 03:45:50PM +0200, Marcus Folkesson wrote:
> 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(-)
Doesn't apply to my tree :(
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-30 14:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH V2] " Marcus Folkesson
2015-04-30 14:40 ` Greg Kroah-Hartman
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.