From: Kalle Valo <kvalo@qca.qualcomm.com>
To: kvalo@qca.qualcomm.com
Cc: ath6kl-devel@qualcomm.com, linux-wireless@vger.kernel.org
Subject: [PATCH 3/3] ath6kl: fix uninitialized warning in ath6kl_process_uapsdq()
Date: Tue, 17 Jan 2012 15:05:46 +0200 [thread overview]
Message-ID: <20120117130546.22832.4319.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20120117130519.22832.29908.stgit@localhost6.localdomain6>
Before I commited patch c1762a3fe ("ath6kl: Add support for uAPSD") I
did a minor change how up variable is initialised in
ath6kl_process_uapsdq(). But I was sloppy and caused this compiler
warning:
txrx.c:88:5: warning: 'up' may be used uninitialized in this function
Revert my change to fix the warning.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 91bbc1f..dd63371 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -85,7 +85,7 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
struct ath6kl *ar = vif->ar;
bool is_apsdq_empty = false;
struct ethhdr *datap = (struct ethhdr *) skb->data;
- u8 up, traffic_class, *ip_hdr;
+ u8 up = 0, traffic_class, *ip_hdr;
u16 ether_type;
struct ath6kl_llc_snap_hdr *llc_hdr;
@@ -122,8 +122,6 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
if (ether_type == IP_ETHERTYPE)
up = ath6kl_wmi_determine_user_priority(
ip_hdr, 0);
- } else {
- up = 0;
}
traffic_class = ath6kl_wmi_get_traffic_class(up);
next prev parent reply other threads:[~2012-01-17 13:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 13:05 [PATCH 1/3] ath6kl: use netdev_features_t Kalle Valo
2012-01-17 13:05 ` [PATCH 2/3] ath6kl: remove -D__CHECK_ENDIAN__ from Makefile Kalle Valo
2012-01-17 13:05 ` Kalle Valo [this message]
2012-01-18 11:44 ` [PATCH 1/3] ath6kl: use netdev_features_t Kalle Valo
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=20120117130546.22832.4319.stgit@localhost6.localdomain6 \
--to=kvalo@qca.qualcomm.com \
--cc=ath6kl-devel@qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).