* [PATCH] wimax: fix printk format warnings
@ 2012-07-21 20:54 Randy Dunlap
2012-07-21 21:02 ` Geert Uytterhoeven
2012-07-22 19:18 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2012-07-21 20:54 UTC (permalink / raw)
To: netdev, David Miller
Cc: Andrew Morton, Geert Uytterhoeven, wimax, Inaky Perez-Gonzalez,
linux-wimax
From: Randy Dunlap <rdunlap@xenotime.net>
Fix printk format warnings in drivers/net/wimax/i2400m:
drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'ssize_t' [-Wformat]
drivers/net/wimax/i2400m/usb-fw.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
I don't see these warnings on x86. The warnings that are quoted above
are from Geert's kernel build reports.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Cc: linux-wimax@intel.com
Cc: wimax@linuxwimax.org
---
drivers/net/wimax/i2400m/control.c | 4 ++--
drivers/net/wimax/i2400m/usb-fw.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- lnx-35-rc7.orig/drivers/net/wimax/i2400m/control.c
+++ lnx-35-rc7/drivers/net/wimax/i2400m/control.c
@@ -130,7 +130,7 @@ ssize_t i2400m_tlv_match(const struct i2
&& le16_to_cpu(tlv->length) + sizeof(*tlv) != tlv_size) {
size_t size = le16_to_cpu(tlv->length) + sizeof(*tlv);
printk(KERN_WARNING "W: tlv type 0x%x mismatched because of "
- "size (got %zu vs %zu expected)\n",
+ "size (got %zu vs %zd expected)\n",
tlv_type, size, tlv_size);
return size;
}
@@ -235,7 +235,7 @@ const struct i2400m_tlv_hdr *i2400m_tlv_
break;
if (match > 0)
dev_warn(dev, "TLV type 0x%04x found with size "
- "mismatch (%zu vs %zu needed)\n",
+ "mismatch (%zu vs %zd needed)\n",
tlv_type, match, tlv_size);
}
return tlv;
--- lnx-35-rc7.orig/drivers/net/wimax/i2400m/usb-fw.c
+++ lnx-35-rc7/drivers/net/wimax/i2400m/usb-fw.c
@@ -212,7 +212,7 @@ ssize_t i2400mu_bus_bm_cmd_send(struct i
}
if (result != cmd_size) { /* all was transferred? */
dev_err(dev, "boot-mode cmd %d: incomplete transfer "
- "(%zu vs %zu submitted)\n", opcode, result, cmd_size);
+ "(%zd vs %zu submitted)\n", opcode, result, cmd_size);
result = -EIO;
goto error_cmd_size;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wimax: fix printk format warnings
2012-07-21 20:54 [PATCH] wimax: fix printk format warnings Randy Dunlap
@ 2012-07-21 21:02 ` Geert Uytterhoeven
2012-07-22 19:18 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2012-07-21 21:02 UTC (permalink / raw)
To: Randy Dunlap
Cc: wimax, netdev, Inaky Perez-Gonzalez, linux-wimax, Andrew Morton,
David Miller
On Sat, Jul 21, 2012 at 10:54 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> Fix printk format warnings in drivers/net/wimax/i2400m:
>
> drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
> drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'ssize_t' [-Wformat]
> drivers/net/wimax/i2400m/usb-fw.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
>
> I don't see these warnings on x86. The warnings that are quoted above
> are from Geert's kernel build reports.
Yeah, while technically they are correct (size_t and ssize_t differ in
signedness),
they only happen for cris, which has different base types for (s)size_t
(size_t = unsigned int, ssize_t = long), which is actually incorrect. Still
on my list of things to fix...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wimax: fix printk format warnings
2012-07-21 20:54 [PATCH] wimax: fix printk format warnings Randy Dunlap
2012-07-21 21:02 ` Geert Uytterhoeven
@ 2012-07-22 19:18 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-22 19:18 UTC (permalink / raw)
To: rdunlap; +Cc: netdev, geert, inaky.perez-gonzalez, linux-wimax, wimax, akpm
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Sat, 21 Jul 2012 13:54:35 -0700
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Fix printk format warnings in drivers/net/wimax/i2400m:
>
> drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
> drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'ssize_t' [-Wformat]
> drivers/net/wimax/i2400m/usb-fw.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
>
> I don't see these warnings on x86. The warnings that are quoted above
> are from Geert's kernel build reports.
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Applied, thanks Randy.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-22 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21 20:54 [PATCH] wimax: fix printk format warnings Randy Dunlap
2012-07-21 21:02 ` Geert Uytterhoeven
2012-07-22 19:18 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).