Skip to contentSkip to conversation

libertas: fix format warning

PATCH In review John W. Linville 2 participants 3 messages Apr 24, 2009 – Apr 28, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libertas: fix format warning

drivers/net/wireless/libertas/if_spi.c: In function =E2=80=98if_spi_c2h= _data=E2=80=99:
drivers/net/wireless/libertas/if_spi.c:733: warning: format =E2=80=98%u= =E2=80=99 expects type =E2=80=98unsigned int=E2=80=99, but argument 4 h= as type =E2=80=98long unsigned int=E2=80=99

---
 drivers/net/wireless/libertas/if_spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wirel= renamed from drivers/net/wireless/libertas/if_spi.c +0 -0

ess/libertas/if_spi.c
index 97493e2..dccd01f 100644

drivers/net/wireless/libertas/if_spi.c +0 -0
@@ -731,7 +731,7 @@ static int if_spi_c2h_data(struct if_spi_card *card=

)
goto out;
} else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
lbs_pr_err("%s: error: card has %d bytes of data, but "
- "our maximum skb size is %u\n",
+ "our maximum skb size is %lu\n",
__func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
err =3D -EINVAL;
goto out;
--=20
1.6.0.6

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

#1 lore raw

PATCH 1/1 wireless: remove some (bogus?) 'may be used uninitialized' warnings

net/mac80211/tx.c: In function =E2=80=98ieee80211_tx_h_select_key=E2=80= =99:
net/mac80211/tx.c:448: warning: =E2=80=98key=E2=80=99 may be used unini= tialized in this function

drivers/net/wireless/ath/ath9k/rc.c: In function =E2=80=98ath_rc_rate_g= etidx=E2=80=99:
drivers/net/wireless/ath/ath9k/rc.c:815: warning: =E2=80=98nextindex=E2= =80=99 may be used uninitialized in this function

drivers/net/wireless/hostap/hostap_plx.c: In function =E2=80=98prism2_p= lx_probe=E2=80=99:
drivers/net/wireless/hostap/hostap_plx.c:438: warning: =E2=80=98cor_ind= ex=E2=80=99 may be used uninitialized in this function drivers/net/wireless/hostap/hostap_plx.c:438: warning: =E2=80=98cor_off= set=E2=80=99 may be used uninitialized in this function

---
 drivers/net/wireless/ath/ath9k/rc.c      |    2 +-
 drivers/net/wireless/hostap/hostap_plx.c |    2 +-
 net/mac80211/tx.c                        |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless= renamed from drivers/net/wireless/ath/ath9k/rc.c +0 -0

/ath/ath9k/rc.c
index a13668b..8f3cf10 100644

drivers/net/wireless/ath/ath9k/rc.c +1 -1
@@ -812,7 +812,7 @@ static u8 ath_rc_rate_getidx(struct ath_softc *sc,
 			     u16 min_rate)
 {
 	u32 j;
-	u8 nextindex;
+	u8 nextindex =3D 0;

=20
if (min_rate) {
for (j =3D RATE_TABLE_SIZE; j > 0; j--) {

drivers/net/wir= renamed from drivers/net/wireless/hostap/hostap_plx.c +0 -0

eless/hostap/hostap_plx.c
index cbf15d7..0e5d510 100644

drivers/net/wireless/hostap/hostap_plx.c +1 -1
@@ -435,7 +435,7 @@ static int prism2_plx_probe(struct pci_dev *pdev,
 	unsigned long pccard_attr_mem;
 	unsigned int pccard_attr_len;
 	void __iomem *attr_mem =3D NULL;
-	unsigned int cor_offset, cor_index;
+	unsigned int cor_offset =3D 0, cor_index =3D 0;
 	u32 reg;
 	local_info_t *local =3D NULL;
 	struct net_device *dev =3D NULL;
net/mac80211/tx.c +1 -1
index 9ab4982..1865622 100644
@@ -445,7 +445,7 @@ ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
 static ieee80211_tx_result debug_noinline
 ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
 {
-	struct ieee80211_key *key;
+	struct ieee80211_key *key =3D NULL;
 	struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(tx->skb);
 	struct ieee80211_hdr *hdr =3D (struct ieee80211_hdr *)tx->skb->data;

=20
--=20
1.6.0.6

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

Acked-by on v1 1/1
#2 lore raw
In reply to John W. Linville
Quoted 1 line · John W. Linville

drivers/net/wireless/libertas/if_spi.c: In function =E2=80=98if_spi_c=

2h_data=E2=80=99:

Quoted 1 line

drivers/net/wireless/libertas/if_spi.c:733: warning: format =E2=80=98=

%u=E2=80=99 expects type =E2=80=98unsigned int=E2=80=99, but argument 4=
has type =E2=80=98long unsigned int=E2=80=99

Quoted 2 lines

=20

Yup; since that define includes a sizeof() it'll be native pointer size= ,
not simply a uint.

drivers/net/wir=

Quoted 5 lines
---
 drivers/net/wireless/libertas/if_spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

=20

drivers/net/wir= renamed from drivers/net/wireless/libertas/if_spi.c +0 -0

eless/libertas/if_spi.c

drivers/net/wireless/libertas/if_spi.c static int if_spi_c2h_data(struct if_spi_card *ca=

Quoted 4 lines

index 97493e2..dccd01f 100644

drivers/net/wireless/libertas/if_spi.c +0 -0
@@ -731,7 +731,7 @@ static int if_spi_c2h_data(struct if_spi_card *ca=

rd)

drivers/net/wireless/libertas/if_spi.c static int if_spi_c2h_data(struct if_spi_card *ca= · line 737

Quoted 8 lines
drivers/net/wireless/libertas/if_spi.c +1 -1
 		goto out;
 	} else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
 		lbs_pr_err("%s: error: card has %d bytes of data, but "
-			   "our maximum skb size is %u\n",
+			   "our maximum skb size is %lu\n",
 			   __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
 		err =3D -EINVAL;
 		goto out;

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