diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2008-09-25 15:54:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-30 14:07:22 -0400 |
commit | 1f1c0e33a0ab1379272da68fe58abf586c8e96e5 (patch) | |
tree | 1c219832042d52808b117ef56efd4fe4fcbfe5ab /drivers/net/wireless/p54/p54common.h | |
parent | 3bb91bff8165223aa14f015a6c9150a536b40d9b (diff) |
p54: Fix sparse warnings
The command
make C=2 CF="-D__CHECK_ENDIAN__" drivers/net/wireless/p54/
generates the following warnings:
.../p54common.c:152:38: warning: incorrect type in argument 1 (different base types)
.../p54common.c:152:38: expected restricted __be32 const [usertype] *p
.../p54common.c:152:38: got unsigned int *<noident>
.../p54common.c:184:15: warning: restricted __le32 degrades to integer
.../p54common.c:185:29: warning: cast to restricted __le16
.../p54common.c:309:11: warning: symbol 'p54_rf_chips' was not declared.
Should it be static?
.../p54common.c:313:5: warning: symbol 'p54_parse_eeprom' was not declared.
Should it be static?
.../p54common.c:620:43: warning: incorrect type in argument 3 (different base types)
.../p54common.c:620:43: expected unsigned long [unsigned] [usertype] len
.../p54common.c:620:43: got restricted __le16 [usertype] len
.../p54common.c:780:41: warning: restricted __le16 degrades to integer
.../p54common.c:781:32: warning: restricted __le16 degrades to integer
.../p54common.c:1250:28: warning: incorrect type in argument 2 (different base types)
.../p54common.c:1250:28: expected unsigned short [unsigned] [usertype] filter_type
.../p54common.c:1250:28: got restricted __le16 [usertype] filter_type
.../p54common.c:1252:28: warning: incorrect type in argument 2 (different base types)
.../p54common.c:1252:28: expected unsigned short [unsigned] [usertype] filter_type
.../p54common.c:1252:28: got restricted __le16 [usertype] filter_type
.../p54common.c:1257:42: warning: incorrect type in argument 2 (different base types)
.../p54common.c:1257:42: expected unsigned short [unsigned] [usertype] filter_type
.../p54common.c:1257:42: got restricted __le16
.../p54common.c:1260:42: warning: incorrect type in argument 2 (different base types)
.../p54common.c:1260:42: expected unsigned short [unsigned] [usertype] filter_type
.../p54common.c:1260:42: got restricted __le16
.../p54usb.c:228:10: warning: restricted __le32 degrades to integer
.../p54usb.c:228:23: warning: restricted __le32 degrades to integer
.../p54usb.c:228:7: warning: incorrect type in assignment (different base types)
.../p54usb.c:228:7: expected restricted __le32 [assigned] [usertype] chk
.../p54usb.c:228:7: got unsigned int
.../p54usb.c:221:8: warning: symbol 'p54u_lm87_chksum' was not declared.
Should it be static?
All of the above have been fixed. One question, however, remains: In struct
bootrec, the array "data" is treated in many places as native CPU order, but
it may be little-endian everywhere. As far as I can tell, this driver has only
been used with little-endian hardware.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.h')
-rw-r--r-- | drivers/net/wireless/p54/p54common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h index 4da736c789ac..2fa994cfcfed 100644 --- a/drivers/net/wireless/p54/p54common.h +++ b/drivers/net/wireless/p54/p54common.h | |||
@@ -18,7 +18,8 @@ | |||
18 | struct bootrec { | 18 | struct bootrec { |
19 | __le32 code; | 19 | __le32 code; |
20 | __le32 len; | 20 | __le32 len; |
21 | u32 data[0]; | 21 | u32 data[10]; |
22 | __le16 rx_mtu; | ||
22 | } __attribute__((packed)); | 23 | } __attribute__((packed)); |
23 | 24 | ||
24 | struct bootrec_exp_if { | 25 | struct bootrec_exp_if { |