All of lore.kernel.org
 help / color / mirror / Atom feed
* Sparse warnings
@ 2008-06-27 19:52 Larry Finger
  2008-06-27 19:53 ` Pavel Roskin
  0 siblings, 1 reply; 9+ messages in thread
From: Larry Finger @ 2008-06-27 19:52 UTC (permalink / raw)
  To: wireless, Jouni Malinen

While checking the rtl8187 driver for sparse warnings, I discovered these:

   CHECK   drivers/net/wireless/hostap/hostap_80211_rx.c
drivers/net/wireless/hostap/hostap_80211_rx.c:128:34: warning: symbol 
'hdr' shadows an earlier one
drivers/net/wireless/hostap/hostap_80211_rx.c:67:29: originally 
declared here
drivers/net/wireless/hostap/hostap_80211_rx.c:150:32: warning: symbol 
'hdr' shadows an earlier one
drivers/net/wireless/hostap/hostap_80211_rx.c:67:29: originally 
declared here
   CHECK   drivers/net/wireless/hostap/hostap_ap.c
drivers/net/wireless/hostap/hostap_ap.c:1933:18: warning: cast 
truncates bits from constant value (ffffffffffff3fff becomes 3fff)
   CHECK   drivers/net/wireless/hostap/hostap_main.c
drivers/net/wireless/hostap/hostap_main.c:597:5: warning: symbol 
'hostap_80211_header_parse' was not declared. Should it be static?

Obviously, none of these cause any problems, but I'm reporting them 
just in case.

Larry

^ permalink raw reply	[flat|nested] 9+ messages in thread
* sparse warnings
@ 2008-09-11 10:46 Johannes Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2008-09-11 10:46 UTC (permalink / raw)
  To: linux-wireless
  Cc: Michael Buesch, Chr, Daniel Drake, Luis R. Rodriguez,
	Sujith Manoharan, Tomas Winkler

Please fix at your leisure:

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

drivers/net/wireless/iwlwifi/iwl3945-base.c:4886:18: warning: invalid assignment: |=
drivers/net/wireless/iwlwifi/iwl3945-base.c:4886:18:    left side has type unsigned char
drivers/net/wireless/iwlwifi/iwl3945-base.c:4886:18:    right side has type restricted __le32
[and some more I have ignored because they seem to be bogus]

drivers/net/wireless/b43/phy_g.c:57:10: warning: symbol 'b43_radio_channel_codes_bg' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:218:6: warning: symbol 'b43_set_txpower_g' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:386:6: warning: symbol 'b43_nrssi_hw_write' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:393:5: warning: symbol 'b43_nrssi_hw_read' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:404:6: warning: symbol 'b43_nrssi_hw_update' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:418:6: warning: symbol 'b43_nrssi_mem_update' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:592:6: warning: symbol 'b43_calc_nrssi_slope' was not declared. Should it be static?
drivers/net/wireless/b43/phy_g.c:1357:5: warning: symbol 'b43_radio_init2050' was not declared. Should it be static?
drivers/net/wireless/b43/phy_a.c:80:6: warning: symbol 'b43_radio_set_tx_iq' was not declared. Should it be static?
drivers/net/wireless/b43/phy_a.c:150:6: warning: symbol 'b43_radio_init2060' was not declared. Should it be static?
drivers/net/wireless/b43/phy_n.c:33:6: warning: symbol 'b43_nphy_set_rxantenna' was not declared. Should it be static?
drivers/net/wireless/b43/phy_n.c:188:6: warning: symbol 'b43_nphy_radio_turn_on' was not declared. Should it be static?
drivers/net/wireless/b43/phy_n.c:193:6: warning: symbol 'b43_nphy_radio_turn_off' was not declared. Should it be static?
drivers/net/wireless/b43/phy_n.c:419:5: warning: symbol 'b43_phy_initn' was not declared. Should it be static?

drivers/net/wireless/p54/p54common.c:152:38: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/p54/p54common.c:152:38:    expected restricted __be32 const [usertype] *p
drivers/net/wireless/p54/p54common.c:152:38:    got unsigned int *<noident>
drivers/net/wireless/p54/p54common.c:184:15: warning: restricted __le32 degrades to integer
drivers/net/wireless/p54/p54common.c:185:29: warning: cast to restricted __le16
drivers/net/wireless/p54/p54common.c:185:29: warning: cast to restricted __le16
drivers/net/wireless/p54/p54common.c:185:29: warning: cast to restricted __le16
drivers/net/wireless/p54/p54common.c:185:29: warning: cast to restricted __le16
drivers/net/wireless/p54/p54common.c:309:11: warning: symbol 'p54_rf_chips' was not declared. Should it be static?
drivers/net/wireless/p54/p54common.c:313:5: warning: symbol 'p54_parse_eeprom' was not declared. Should it be static?
drivers/net/wireless/p54/p54common.c:620:43: warning: incorrect type in argument 3 (different base types)
drivers/net/wireless/p54/p54common.c:620:43:    expected unsigned int [unsigned] [usertype] <noident>
drivers/net/wireless/p54/p54common.c:620:43:    got restricted __le16 [usertype] len
drivers/net/wireless/p54/p54common.c:780:41: warning: restricted __le16 degrades to integer
drivers/net/wireless/p54/p54common.c:781:32: warning: restricted __le16 degrades to integer
drivers/net/wireless/p54/p54common.c:1250:28: warning: incorrect type in argument 2 (different base types)
drivers/net/wireless/p54/p54common.c:1250:28:    expected unsigned short [unsigned] [usertype] filter_type
drivers/net/wireless/p54/p54common.c:1250:28:    got restricted __le16 [usertype] filter_type
drivers/net/wireless/p54/p54common.c:1252:28: warning: incorrect type in argument 2 (different base types)
drivers/net/wireless/p54/p54common.c:1252:28:    expected unsigned short [unsigned] [usertype] filter_type
drivers/net/wireless/p54/p54common.c:1252:28:    got restricted __le16 [usertype] filter_type
drivers/net/wireless/p54/p54common.c:1257:42: warning: incorrect type in argument 2 (different base types)
drivers/net/wireless/p54/p54common.c:1257:42:    expected unsigned short [unsigned] [usertype] filter_type
drivers/net/wireless/p54/p54common.c:1257:42:    got restricted __le16
drivers/net/wireless/p54/p54common.c:1260:42: warning: incorrect type in argument 2 (different base types)
drivers/net/wireless/p54/p54common.c:1260:42:    expected unsigned short [unsigned] [usertype] filter_type
drivers/net/wireless/p54/p54common.c:1260:42:    got restricted __le16
drivers/net/wireless/p54/p54usb.c:228:10: warning: restricted __le32 degrades to integer
drivers/net/wireless/p54/p54usb.c:228:23: warning: restricted __le32 degrades to integer
drivers/net/wireless/p54/p54usb.c:228:7: warning: incorrect type in assignment (different base types)
drivers/net/wireless/p54/p54usb.c:228:7:    expected restricted __le32 [assigned] [usertype] chk
drivers/net/wireless/p54/p54usb.c:228:7:    got unsigned int
drivers/net/wireless/p54/p54usb.c:221:8: warning: symbol 'p54u_lm87_chksum' was not declared. Should it be static?

drivers/net/wireless/zd1211rw/zd_mac.c:756:6: warning: symbol 'zd_process_intr' was not declared. Should it be static?
drivers/net/wireless/zd1211rw/zd_usb.c:358:17: warning: implicit cast from nocast type
drivers/net/wireless/zd1211rw/zd_usb.c:358:17: warning: implicit cast from nocast type

johannes


^ permalink raw reply	[flat|nested] 9+ messages in thread
* sparse warnings
@ 2008-10-28 15:57 Johannes Berg
  2008-10-29  8:06 ` Holger Schurig
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2008-10-28 15:57 UTC (permalink / raw)
  To: linux-wireless
  Cc: Tomas Winkler, Dan Williams, Daniel Drake, Luis R. Rodriguez

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

These look like bugs:

drivers/net/wireless/iwlwifi/iwl3945-base.c:4848:18: warning: invalid assignment: |=
drivers/net/wireless/iwlwifi/iwl3945-base.c:4848:18:    left side has type unsigned char
drivers/net/wireless/iwlwifi/iwl3945-base.c:4848:18:    right side has type restricted __le32

drivers/net/wireless/libertas/cmd.c:609:16: warning: cast to restricted __le16
drivers/net/wireless/libertas/cmd.c:611:16: warning: cast to restricted __le16


These seem harmless:

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

drivers/net/wireless/ath9k/main.c:1836:28: warning: incorrect type in argument 2 (different base types)
drivers/net/wireless/ath9k/main.c:1836:28:    expected restricted pci_power_t [usertype] state
drivers/net/wireless/ath9k/main.c:1836:28:    got int
drivers/net/wireless/ath9k/hw.c: In function ‘ath9k_hw_eeprom_set_board_values’:
drivers/net/wireless/ath9k/hw.c:544: warning: ‘ant_config’ may be used uninitialized in this function
drivers/net/wireless/ath9k/hw.c:4818:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:4681:6: originally declared here
drivers/net/wireless/ath9k/hw.c:5020:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:4930:6: originally declared here

[and a whole bunch in b43]

johannes

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* sparse warnings
@ 2020-07-29 19:48 Bjorn Helgaas
  2020-09-30 22:39 ` Bjorn Helgaas
  0 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2020-07-29 19:48 UTC (permalink / raw)
  To: Jingoo Han, Gustavo Pimentel, Kishon Vijay Abraham I; +Cc: linux-pci

Just FYI, I see the following sparse warnings (among others):

  $ make C=2 drivers/pci/

  drivers/pci/endpoint/functions/pci-epf-test.c:288:24: warning: incorrect type in argument 1 (different address spaces)
  drivers/pci/endpoint/functions/pci-epf-test.c:288:24:    expected void *to
  drivers/pci/endpoint/functions/pci-epf-test.c:288:24:    got void [noderef] <asn:2> *[assigned] dst_addr
  drivers/pci/endpoint/functions/pci-epf-test.c:288:34: warning: incorrect type in argument 2 (different address spaces)
  drivers/pci/endpoint/functions/pci-epf-test.c:288:34:    expected void const *from
  drivers/pci/endpoint/functions/pci-epf-test.c:288:34:    got void [noderef] <asn:2> *[assigned] src_addr

  drivers/pci/controller/dwc/pcie-designware.c:447:52: warning: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

It'd be nice to fix these if it's practical.

There are a bunch more sparse warnings about pci_power_t in the
generic code.  Not sure what those would involve, so they're a problem
for another day.

Bjorn

^ permalink raw reply	[flat|nested] 9+ messages in thread
* sparse warnings
@ 2020-08-04 21:36 Michael S. Tsirkin
  0 siblings, 0 replies; 9+ messages in thread
From: Michael S. Tsirkin @ 2020-08-04 21:36 UTC (permalink / raw)
  To: pbonzini, kvm

noticed these hen building with C=1:


arch/x86/kvm/x86.c:2669:38: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kvm/x86.c:2669:38:    expected void const [noderef] __user *
arch/x86/kvm/x86.c:2669:38:    got unsigned char [usertype] *
arch/x86/kvm/x86.c:7636:15: error: incompatible types in comparison expression (different address spaces):
arch/x86/kvm/x86.c:7636:15:    struct kvm_apic_map [noderef] __rcu *
arch/x86/kvm/x86.c:7636:15:    struct kvm_apic_map *
arch/x86/kvm/x86.c:10010:16: error: incompatible types in comparison expression (different address spaces):
arch/x86/kvm/x86.c:10010:16:    struct kvm_apic_map [noderef] __rcu *
arch/x86/kvm/x86.c:10010:16:    struct kvm_apic_map *
arch/x86/kvm/x86.c:10011:15: error: incompatible types in comparison expression (different address spaces):
arch/x86/kvm/x86.c:10011:15:    struct kvm_pmu_event_filter [noderef] __rcu *
arch/x86/kvm/x86.c:10011:15:    struct kvm_pmu_event_filter *
arch/x86/kvm/x86.c: note: in included file (through include/linux/notifier.h, arch/x86/include/asm/uprobes.h, include/linux/uprobes.h, include/linux/mm_types.h, include/asm-generic/fixmap.h, arch/x86/include/asm/fixmap.h, ...):
./include/linux/srcu.h:179:9: warning: context imbalance in 'vcpu_enter_guest' - unexpected unlock


HTH,
-- 
MST


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

end of thread, other threads:[~2020-10-01  6:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27 19:52 Sparse warnings Larry Finger
2008-06-27 19:53 ` Pavel Roskin
2008-09-11 10:46 sparse warnings Johannes Berg
2008-10-28 15:57 Johannes Berg
2008-10-29  8:06 ` Holger Schurig
2020-07-29 19:48 Bjorn Helgaas
2020-09-30 22:39 ` Bjorn Helgaas
2020-10-01  6:29   ` Kishon Vijay Abraham I
2020-08-04 21:36 Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.