* [PATCH] libertas: fix format warning
@ 2009-04-24 19:39 John W. Linville
2009-04-24 19:39 ` [PATCH] wireless: remove some (bogus?) 'may be used uninitialized' warnings John W. Linville
2009-04-28 14:48 ` [PATCH] libertas: fix format warning Dan Williams
0 siblings, 2 replies; 3+ messages in thread
From: John W. Linville @ 2009-04-24 19:39 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
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
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/libertas/if_spi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wirel=
ess/libertas/if_spi.c
index 97493e2..dccd01f 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] wireless: remove some (bogus?) 'may be used uninitialized' warnings
2009-04-24 19:39 [PATCH] libertas: fix format warning John W. Linville
@ 2009-04-24 19:39 ` John W. Linville
2009-04-28 14:48 ` [PATCH] libertas: fix format warning Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: John W. Linville @ 2009-04-24 19:39 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
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
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
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(-)
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless=
/ath/ath9k/rc.c
index a13668b..8f3cf10 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -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--) {
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wir=
eless/hostap/hostap_plx.c
index cbf15d7..0e5d510 100644
--- a/drivers/net/wireless/hostap/hostap_plx.c
+++ b/drivers/net/wireless/hostap/hostap_plx.c
@@ -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;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 9ab4982..1865622 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] libertas: fix format warning
2009-04-24 19:39 [PATCH] libertas: fix format warning John W. Linville
2009-04-24 19:39 ` [PATCH] wireless: remove some (bogus?) 'may be used uninitialized' warnings John W. Linville
@ 2009-04-28 14:48 ` Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2009-04-28 14:48 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless
On Fri, 2009-04-24 at 15:39 -0400, John W. Linville wrote:
> drivers/net/wireless/libertas/if_spi.c: In function =E2=80=98if_spi_c=
2h_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=
has type =E2=80=98long unsigned int=E2=80=99
>=20
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yup; since that define includes a sizeof() it'll be native pointer size=
,
not simply a uint.
Acked-by: Dan Williams <dcbw@redhat.com>
> ---
> drivers/net/wireless/libertas/if_spi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>=20
> diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wir=
eless/libertas/if_spi.c
> index 97493e2..dccd01f 100644
> --- a/drivers/net/wireless/libertas/if_spi.c
> +++ b/drivers/net/wireless/libertas/if_spi.c
> @@ -731,7 +731,7 @@ static int if_spi_c2h_data(struct if_spi_card *ca=
rd)
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-28 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-24 19:39 [PATCH] libertas: fix format warning John W. Linville
2009-04-24 19:39 ` [PATCH] wireless: remove some (bogus?) 'may be used uninitialized' warnings John W. Linville
2009-04-28 14:48 ` [PATCH] libertas: fix format warning Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox