From: Prarit Bhargava <prarit@redhat.com>
To: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Cc: Prarit Bhargava <prarit@redhat.com>
Subject: [PATCH]: libertas_tf: Fix warning in lbtf_rx for stats struct
Date: Thu, 10 Jun 2010 08:08:42 -0400 [thread overview]
Message-ID: <20100610120209.27952.91383.sendpatchset@prarit.bos.redhat.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
Fixes linux-2.6 warning:
drivers/net/wireless/libertas_tf/main.c: In function ‘lbtf_rx’:
drivers/net/wireless/libertas_tf/main.c:578: warning: ‘stats.antenna’ is used uninitialized in this function
drivers/net/wireless/libertas_tf/main.c:578: warning: ‘stats.mactime’ is used uninitialized in this function
stats struct needs to be set to 0 before use.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 019431d..52d7c5c 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -488,7 +488,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
prxpd = (struct rxpd *) skb->data;
- stats.flag = 0;
+ memset(&stats, 0, sizeof(stats));
if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
stats.flag |= RX_FLAG_FAILED_FCS_CRC;
stats.freq = priv->cur_freq;
reply other threads:[~2010-06-10 12:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100610120209.27952.91383.sendpatchset@prarit.bos.redhat.com \
--to=prarit@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox