linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c'
@ 2008-01-04 22:05 Miguel Botón
  2008-01-04 22:13 ` Roland Dreier
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Miguel Botón @ 2008-01-04 22:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-wireless, yi.zhu, linville

This patch fixes a compilation warning in 'iwl-4965.c'.

Signed-off-by: Miguel Bot=C3=B3n <mboton@gmail.com>

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wire=
less/iwlwifi/iwl-4965.c
index 74999af..92237cd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3616,7 +3616,7 @@ static void iwl4965_add_radiotap(struct iwl4965_p=
riv *priv,
 	if (skb_headroom(skb) < sizeof(*iwl4965_rt)) {
 		if (net_ratelimit())
 			printk(KERN_ERR "not enough headroom [%d] for "
-			       "radiotap head [%d]\n",
+			       "radiotap head [%ld]\n",
 			       skb_headroom(skb), sizeof(*iwl4965_rt));
 		return;
 	}

--=20
	Miguel Bot=C3=B3n
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c'
  2008-01-04 22:05 [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c' Miguel Botón
@ 2008-01-04 22:13 ` Roland Dreier
  2008-01-04 22:31   ` David Miller
  2008-01-04 22:15 ` Randy Dunlap
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2008-01-04 22:13 UTC (permalink / raw)
  To: Miguel Botón; +Cc: linux-kernel, linux-wireless, yi.zhu, linville

 > -			       "radiotap head [%d]\n",
 > +			       "radiotap head [%ld]\n",
 >  			       skb_headroom(skb), sizeof(*iwl4965_rt));

Actually I think the correct printf format for printing a size_t
(coming here from sizeof foo) is "%zd".  Otherwise you'll fix the
warning on 64-bit targets but add a new warning on 32-bit targets.

 - R.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c'
  2008-01-04 22:05 [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c' Miguel Botón
  2008-01-04 22:13 ` Roland Dreier
@ 2008-01-04 22:15 ` Randy Dunlap
  2008-01-04 22:15 ` Michael Buesch
  2008-01-04 22:34 ` Miguel Botón
  3 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2008-01-04 22:15 UTC (permalink / raw)
  To: Miguel Botón; +Cc: linux-kernel, linux-wireless, yi.zhu, linville

On Fri, 4 Jan 2008 23:05:54 +0100 Miguel Bot=F3n wrote:

> This patch fixes a compilation warning in 'iwl-4965.c'.

It would be helpful to have the warning message right here.<---

> Signed-off-by: Miguel Bot=F3n <mboton@gmail.com>
>=20
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wi=
reless/iwlwifi/iwl-4965.c
> index 74999af..92237cd 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -3616,7 +3616,7 @@ static void iwl4965_add_radiotap(struct iwl4965=
_priv *priv,
>  	if (skb_headroom(skb) < sizeof(*iwl4965_rt)) {
>  		if (net_ratelimit())
>  			printk(KERN_ERR "not enough headroom [%d] for "
> -			       "radiotap head [%d]\n",
> +			       "radiotap head [%ld]\n",
>  			       skb_headroom(skb), sizeof(*iwl4965_rt));
>  		return;
>  	}

sizeof() (or size_t) normally needs %zd.

---
~Randy
desserts:  http://www.xenotime.net/linux/recipes/
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c'
  2008-01-04 22:05 [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c' Miguel Botón
  2008-01-04 22:13 ` Roland Dreier
  2008-01-04 22:15 ` Randy Dunlap
@ 2008-01-04 22:15 ` Michael Buesch
  2008-01-04 22:34 ` Miguel Botón
  3 siblings, 0 replies; 6+ messages in thread
From: Michael Buesch @ 2008-01-04 22:15 UTC (permalink / raw)
  To: Miguel Botón; +Cc: linux-kernel, linux-wireless, yi.zhu, linville

On Friday 04 January 2008 23:05:54 Miguel Bot=C3=B3n wrote:
> This patch fixes a compilation warning in 'iwl-4965.c'.
>=20
> Signed-off-by: Miguel Bot=C3=B3n <mboton@gmail.com>
>=20
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wi=
reless/iwlwifi/iwl-4965.c
> index 74999af..92237cd 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -3616,7 +3616,7 @@ static void iwl4965_add_radiotap(struct iwl4965=
_priv *priv,
>  	if (skb_headroom(skb) < sizeof(*iwl4965_rt)) {
>  		if (net_ratelimit())
>  			printk(KERN_ERR "not enough headroom [%d] for "
> -			       "radiotap head [%d]\n",
> +			       "radiotap head [%ld]\n",
>  			       skb_headroom(skb), sizeof(*iwl4965_rt));

I think %zu is the correct and portable integer conversion for a size_t=
 type.
The kernel implementation seems to support it.

--=20
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c'
  2008-01-04 22:13 ` Roland Dreier
@ 2008-01-04 22:31   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2008-01-04 22:31 UTC (permalink / raw)
  To: rdreier; +Cc: mboton.lkml, linux-kernel, linux-wireless, yi.zhu, linville

From: Roland Dreier <rdreier@cisco.com>
Date: Fri, 04 Jan 2008 14:13:12 -0800

>  > -			       "radiotap head [%d]\n",
>  > +			       "radiotap head [%ld]\n",
>  >  			       skb_headroom(skb), sizeof(*iwl4965_rt));
> 
> Actually I think the correct printf format for printing a size_t
> (coming here from sizeof foo) is "%zd".  Otherwise you'll fix the
> warning on 64-bit targets but add a new warning on 32-bit targets.

Right.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c'
  2008-01-04 22:05 [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c' Miguel Botón
                   ` (2 preceding siblings ...)
  2008-01-04 22:15 ` Michael Buesch
@ 2008-01-04 22:34 ` Miguel Botón
  3 siblings, 0 replies; 6+ messages in thread
From: Miguel Botón @ 2008-01-04 22:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-wireless, yi.zhu, linville

Ok, there's a new patch.

This patch fixes a compilation warning in 'iwl-4965.c'.

"warning: format =E2=80=98%d=E2=80=99 expects type =E2=80=98int=E2=80=99=
, but argument 3 has type =E2=80=98long unsigned int=E2=80=99"

Signed-off-by: Miguel Bot=C3=B3n <mboton@gmail.com

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wire=
less/iwlwifi/iwl-4965.c
index 74999af..92237cd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3616,7 +3616,7 @@ static void iwl4965_add_radiotap(struct iwl4965_p=
riv *priv,
 	if (skb_headroom(skb) < sizeof(*iwl4965_rt)) {
 		if (net_ratelimit())
 			printk(KERN_ERR "not enough headroom [%d] for "
-			       "radiotap head [%d]\n",
+			       "radiotap head [%zd]\n",
 			       skb_headroom(skb), sizeof(*iwl4965_rt));
 		return;
 	}

--=20
	Miguel Bot=C3=B3n
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-04 22:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 22:05 [PATCH] iwlwifi: fix compilation warning in 'iwl-4965.c' Miguel Botón
2008-01-04 22:13 ` Roland Dreier
2008-01-04 22:31   ` David Miller
2008-01-04 22:15 ` Randy Dunlap
2008-01-04 22:15 ` Michael Buesch
2008-01-04 22:34 ` Miguel Botón

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).