linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* wireless drivers sparse warnings
@ 2008-12-09 11:50 Johannes Berg
  2008-12-09 13:30 ` Johannes Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Johannes Berg @ 2008-12-09 11:50 UTC (permalink / raw)
  To: linux-wireless
  Cc: Dan Williams, simon, Bob Copeland, Luis R. Rodriguez,
	Sujith Manoharan, Pavel Roskin, David Gibson, Daniel Drake

[minus uninteresting ones like "should be static"]

drivers/net/wireless/airo.c:3804:8: warning: symbol 'i' shadows an earlier one
drivers/net/wireless/airo.c:3715:6: originally declared here
drivers/net/wireless/airo.c:3811:8: warning: symbol 'i' shadows an earlier one
drivers/net/wireless/airo.c:3715:6: originally declared here
drivers/net/wireless/airo.c:3825:7: warning: symbol 'i' shadows an earlier one
drivers/net/wireless/airo.c:3715:6: originally declared here
drivers/net/wireless/airo.c:2041:10: warning: incorrect type in assignment (different base types)
drivers/net/wireless/airo.c:2041:10:    expected restricted __le16 [usertype] status
drivers/net/wireless/airo.c:2041:10:    got unsigned short [unsigned] [usertype] status
drivers/net/wireless/airo.c:2093:14: warning: incorrect type in initializer (different signedness)
drivers/net/wireless/airo.c:2093:14:    expected unsigned int [usertype] *fids
drivers/net/wireless/airo.c:2093:14:    got int *<noident>
drivers/net/wireless/airo.c:2117:14: warning: incorrect type in initializer (different signedness)
drivers/net/wireless/airo.c:2117:14:    expected unsigned int [usertype] *fids
drivers/net/wireless/airo.c:2117:14:    got int *<noident>
drivers/net/wireless/airo.c:2158:14: warning: incorrect type in initializer (different signedness)
drivers/net/wireless/airo.c:2158:14:    expected unsigned int [usertype] *fids
drivers/net/wireless/airo.c:2158:14:    got int *<noident>
drivers/net/wireless/airo.c:2182:14: warning: incorrect type in initializer (different signedness)
drivers/net/wireless/airo.c:2182:14:    expected unsigned int [usertype] *fids
drivers/net/wireless/airo.c:2182:14:    got int *<noident>

drivers/net/wireless/atmel.c:3639:23: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3640:24: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3641:23: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3642:25: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3643:23: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3644:24: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3645:23: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3646:25: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3647:25: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3648:23: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3649:25: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3650:25: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3651:21: warning: cast to restricted __le16
drivers/net/wireless/atmel.c:3652:22: warning: cast to restricted __le16

drivers/net/wireless/ath5k/pcu.c:1102:21: warning: restricted __le32 degrades to integer
drivers/net/wireless/ath5k/pcu.c:1102:13: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath5k/pcu.c:1102:13:    expected restricted __le32 <noident>
drivers/net/wireless/ath5k/pcu.c:1102:13:    got unsigned int
drivers/net/wireless/ath5k/pcu.c:1104:20: warning: restricted __le32 degrades to integer
drivers/net/wireless/ath5k/pcu.c:1104:13: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath5k/pcu.c:1104:13:    expected restricted __le32 <noident>
drivers/net/wireless/ath5k/pcu.c:1104:13:    got unsigned int

drivers/net/wireless/ath9k/hw.c:1922:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:1785:6: originally declared here
drivers/net/wireless/ath9k/hw.c:2123:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:2033:6: originally declared here
drivers/net/wireless/ath9k/main.c:2657:28: warning: incorrect type in argument 2 (different base types)
drivers/net/wireless/ath9k/main.c:2657:28:    expected restricted pci_power_t [usertype] state
drivers/net/wireless/ath9k/main.c:2657:28:    got int

drivers/net/wireless/orinoco/airport.c:282:2: warning: returning void-valued expression

drivers/net/wireless/zd1211rw/zd_usb.c:361:17: warning: implicit cast from nocast type



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

* Re: wireless drivers sparse warnings
  2008-12-09 11:50 wireless drivers sparse warnings Johannes Berg
@ 2008-12-09 13:30 ` Johannes Berg
  2008-12-10  9:13   ` Elmer Joandi
  2008-12-09 14:51 ` Bob Copeland
  2008-12-09 17:34 ` Pavel Roskin
  2 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2008-12-09 13:30 UTC (permalink / raw)
  To: linux-wireless; +Cc: elmer, Luis R. Rodriguez

And some from older drivers:

drivers/net/wireless/prism54/isl_ioctl.c:2053:20: warning: incorrect type in assignment (different address spaces)
drivers/net/wireless/prism54/isl_ioctl.c:2053:20:    expected void [noderef] <asn:1>*pointer
drivers/net/wireless/prism54/isl_ioctl.c:2053:20:    got char *[assigned] memptr
drivers/net/wireless/prism54/isl_ioctl.c:2072:20: warning: incorrect type in assignment (different address spaces)
drivers/net/wireless/prism54/isl_ioctl.c:2072:20:    expected void [noderef] <asn:1>*pointer
drivers/net/wireless/prism54/isl_ioctl.c:2072:20:    got char *[assigned] memptr
drivers/net/wireless/prism54/isl_ioctl.c:3001:25: warning: incorrect type in argument 2 (different signedness)
drivers/net/wireless/prism54/isl_ioctl.c:3001:25:    expected int enum oid_num_t *<noident>
drivers/net/wireless/prism54/isl_ioctl.c:3001:25:    got unsigned int *<noident>
drivers/net/wireless/prism54/oid_mgt.c:712:35: warning: incorrect type in argument 2 (different signedness)
drivers/net/wireless/prism54/oid_mgt.c:712:35:    expected int enum oid_num_t *l
drivers/net/wireless/prism54/oid_mgt.c:712:35:    got unsigned int *<noident>

drivers/net/wireless/arlan-main.c:969:48: warning: incorrect type in initializer (different address spaces)
drivers/net/wireless/arlan-main.c:969:48:    expected struct arlan_shmem volatile [noderef] <asn:2>*arlan
drivers/net/wireless/arlan-main.c:969:48:    got struct arlan_shmem *<noident>
drivers/net/wireless/arlan-main.c:1088:11: warning: incorrect type in assignment (different address spaces)
drivers/net/wireless/arlan-main.c:1088:11:    expected struct arlan_shmem [noderef] <asn:2>*card
drivers/net/wireless/arlan-main.c:1088:11:    got void *<noident>
drivers/net/wireless/arlan-main.c:1776:19: warning: symbol 'arlan_probe' was not declared. Should it be static?



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

* Re: wireless drivers sparse warnings
  2008-12-09 11:50 wireless drivers sparse warnings Johannes Berg
  2008-12-09 13:30 ` Johannes Berg
@ 2008-12-09 14:51 ` Bob Copeland
  2008-12-09 17:34 ` Pavel Roskin
  2 siblings, 0 replies; 6+ messages in thread
From: Bob Copeland @ 2008-12-09 14:51 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless
  Cc: Dan Williams, simon, Luis R. Rodriguez, Sujith Manoharan,
	Pavel Roskin, David Gibson, Daniel Drake

On Tue, 09 Dec 2008 12:50:35 +0100, Johannes Berg wrote
> drivers/net/wireless/ath5k/pcu.c:1102:21: warning: restricted __le32
> degrades to integer

Oops, thanks for the heads up.  I'll do a patch for that tonight.

-- 
Bob Copeland %% www.bobcopeland.com



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

* Re: wireless drivers sparse warnings
  2008-12-09 11:50 wireless drivers sparse warnings Johannes Berg
  2008-12-09 13:30 ` Johannes Berg
  2008-12-09 14:51 ` Bob Copeland
@ 2008-12-09 17:34 ` Pavel Roskin
  2 siblings, 0 replies; 6+ messages in thread
From: Pavel Roskin @ 2008-12-09 17:34 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, 2008-12-09 at 12:50 +0100, Johannes Berg wrote:
> [minus uninteresting ones like "should be static"]

Please don't omit them next time.  Some functions may turn out to be
useless.

> drivers/net/wireless/orinoco/airport.c:282:2: warning: returning void-valued expression

I've just sent a fix for that.  Thanks!

-- 
Regards,
Pavel Roskin

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

* Re: wireless drivers sparse warnings
  2008-12-09 13:30 ` Johannes Berg
@ 2008-12-10  9:13   ` Elmer Joandi
  2008-12-10  9:23     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Elmer Joandi @ 2008-12-10  9:13 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Well, about arlan driver - I am sorry, but :
1. I lack the device and I even lack an installed 32-bit linux to compile it.
2. The card has been out of production for 10 years
3. I can not imagine anybody using it for anything sensible anymore.



To get rid of warnings the seems a need for a correct typecast to be
used in 2 places and a "static" added to a declaration.

However, as use of this driver seems to be so rare, I would suggest
marking it experimental or something like that, i.e. retire it at slow
rate.




-- 
Elmer Joandi
+3725185428

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

* Re: wireless drivers sparse warnings
  2008-12-10  9:13   ` Elmer Joandi
@ 2008-12-10  9:23     ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2008-12-10  9:23 UTC (permalink / raw)
  To: Elmer Joandi; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Wed, 2008-12-10 at 11:13 +0200, Elmer Joandi wrote:
> Well, about arlan driver - I am sorry, but :
> 1. I lack the device and I even lack an installed 32-bit linux to compile it.
> 2. The card has been out of production for 10 years
> 3. I can not imagine anybody using it for anything sensible anymore.
> 
> 
> 
> To get rid of warnings the seems a need for a correct typecast to be
> used in 2 places and a "static" added to a declaration.

Indeed, on closer look this is harmless. Wasn't sure about the address
space warnings.

> However, as use of this driver seems to be so rare, I would suggest
> marking it experimental or something like that, i.e. retire it at slow
> rate.

Wow yes, I had to really dig in to figure out whether or not the code
was correct. This driver uses netdev_boot_setup_check() and is listed in
drivers/net/Space.c and other things I hadn't even _heard_ about until
now...

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2008-12-10  9:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 11:50 wireless drivers sparse warnings Johannes Berg
2008-12-09 13:30 ` Johannes Berg
2008-12-10  9:13   ` Elmer Joandi
2008-12-10  9:23     ` Johannes Berg
2008-12-09 14:51 ` Bob Copeland
2008-12-09 17:34 ` Pavel Roskin

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