Commit d512a142 authored by Simon Horman's avatar Simon Horman Committed by Greg Kroah-Hartman

Staging: rtl8192su: Use z format qualifier for output of sizeof()

$ gcc --version
gcc (Debian 4.4.2-5) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBAReq’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:342: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBARsp’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:443: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_DELBA’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:573: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
...

Also some style fixes for these lines:
+ Fix excessively long lines
+ Remove leading space before struct
+ Remove unnecessary parentheses
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 784d3119
...@@ -339,7 +339,10 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb) ...@@ -339,7 +339,10 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb)
if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9)
{ {
IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BAREQ(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9)); IEEE80211_DEBUG(IEEE80211_DL_ERR,
" Invalid skb len in BAREQ(%d / %zd)\n",
skb->len,
sizeof(struct ieee80211_hdr_3addr) + 9);
return -1; return -1;
} }
...@@ -440,7 +443,10 @@ int ieee80211_rx_ADDBARsp( struct ieee80211_device* ieee, struct sk_buff *skb) ...@@ -440,7 +443,10 @@ int ieee80211_rx_ADDBARsp( struct ieee80211_device* ieee, struct sk_buff *skb)
if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9)
{ {
IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BARSP(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9)); IEEE80211_DEBUG(IEEE80211_DL_ERR,
" Invalid skb len in BARSP(%d / %zd)\n",
skb->len,
sizeof(struct ieee80211_hdr_3addr) + 9);
return -1; return -1;
} }
rsp = ( struct ieee80211_hdr_3addr*)skb->data; rsp = ( struct ieee80211_hdr_3addr*)skb->data;
...@@ -570,7 +576,10 @@ int ieee80211_rx_DELBA(struct ieee80211_device* ieee,struct sk_buff *skb) ...@@ -570,7 +576,10 @@ int ieee80211_rx_DELBA(struct ieee80211_device* ieee,struct sk_buff *skb)
if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 6) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 6)
{ {
IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in DELBA(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 6)); IEEE80211_DEBUG(IEEE80211_DL_ERR,
" Invalid skb len in DELBA(%d / %zd)\n",
skb->len,
sizeof(struct ieee80211_hdr_3addr) + 6);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment