* [PATCH] orinoco: fix printk format specifier for size_t arguments
@ 2009-07-02 19:26 David Kilroy
2009-07-02 19:36 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: David Kilroy @ 2009-07-02 19:26 UTC (permalink / raw)
To: linux-wireless; +Cc: David Kilroy
This addresses the following compile warnings on 64-bit platforms.
drivers/net/wireless/orinoco/scan.c: In function 'orinoco_add_hostscan_results':
drivers/net/wireless/orinoco/scan.c:194: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/net/wireless/orinoco/scan.c:211: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/net/wireless/orinoco/scan.c:211: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
---
Thanks to Johannes for pointing this out.
This was introduced in patch 21 of the cfg80211 switch series "orinoco:
convert scanning to cfg80211"
---
drivers/net/wireless/orinoco/scan.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c
index 522eb98..d2f10e9 100644
--- a/drivers/net/wireless/orinoco/scan.c
+++ b/drivers/net/wireless/orinoco/scan.c
@@ -190,7 +190,7 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv,
/* Sanity check for atom_len */
if (atom_len < sizeof(struct prism2_scan_apinfo)) {
printk(KERN_ERR "%s: Invalid atom_len in scan "
- "data: %d\n", priv->ndev->name,
+ "data: %zu\n", priv->ndev->name,
atom_len);
abort = true;
goto scan_abort;
@@ -206,8 +206,8 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv,
/* Check that we got an whole number of atoms */
if ((len - offset) % atom_len) {
- printk(KERN_ERR "%s: Unexpected scan data length %d, "
- "atom_len %d, offset %d\n", priv->ndev->name, len,
+ printk(KERN_ERR "%s: Unexpected scan data length %zu, "
+ "atom_len %zu, offset %d\n", priv->ndev->name, len,
atom_len, offset);
abort = true;
goto scan_abort;
--
1.6.0.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] orinoco: fix printk format specifier for size_t arguments
2009-07-02 19:26 [PATCH] orinoco: fix printk format specifier for size_t arguments David Kilroy
@ 2009-07-02 19:36 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-07-02 19:36 UTC (permalink / raw)
To: David Kilroy; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 719 bytes --]
On Thu, 2009-07-02 at 20:26 +0100, David Kilroy wrote:
> This addresses the following compile warnings on 64-bit platforms.
>
> drivers/net/wireless/orinoco/scan.c: In function 'orinoco_add_hostscan_results':
> drivers/net/wireless/orinoco/scan.c:194: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
> drivers/net/wireless/orinoco/scan.c:211: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
> drivers/net/wireless/orinoco/scan.c:211: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
>
> Signed-off-by: David Kilroy <kilroyd@googlemail.com>
> ---
>
> Thanks to Johannes for pointing this out.
Thanks for the fix!
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-02 19:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 19:26 [PATCH] orinoco: fix printk format specifier for size_t arguments David Kilroy
2009-07-02 19:36 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox