From: Larry Finger <Larry.Finger@lwfinger.net>
To: Christian Lamparter <chunkeey@web.de>
Cc: linux-wireless@vger.kernel.org, Pavel Roskin <proski@gnu.org>,
Johannes Berg <johannes@sipsolutions.net>,
John W Linville <linville@tuxdriver.com>
Subject: Re: [PATCH 6/6] p54: integrate parts of lmac_longbow.h and other parts of stlc45xx
Date: Thu, 16 Oct 2008 08:46:18 -0700 [thread overview]
Message-ID: <48F761CA.5040102@lwfinger.net> (raw)
In-Reply-To: <200810150408.44363.chunkeey@web.de>
Christian Lamparter wrote:
> This patch removes most/all? of the "magic" numbers and unknown structure
> variables inside the code and replaces them with meaningful prototypes.
>
> Signed-off-by: Christian Lamparter <chunkeey@web.de>
> ---
The following change of ack_rssi from __le16 to u8 generates the sparse warning
"drivers/net/wireless/p54/p54common.c:660:5: warning: cast to restricted __le16":
> +struct p54_frame_sent {
> u8 status;
> - u8 retries;
> - __le16 ack_rssi;
> + u8 tries;
> + u8 ack_rssi;
> + u8 quality;
The statement in question is:
info->status.ack_signal = p54_rssi_to_dbm(dev,
le16_to_cpu(payload->ack_rssi));
The following patch fixes the warning:
Index: wireless-testing/drivers/net/wireless/p54/p54common.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/p54/p54common.c
+++ wireless-testing/drivers/net/wireless/p54/p54common.c
@@ -657,7 +657,7 @@ static void p54_rx_frame_sent(struct iee
if (payload->status & 0x02)
info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
info->status.ack_signal = p54_rssi_to_dbm(dev,
- le16_to_cpu(payload->ack_rssi));
+ (int)payload->ack_rssi);
skb_pull(entry, sizeof(*hdr) + pad + sizeof(*entry_data));
ieee80211_tx_status_irqsafe(dev, entry);
goto out;
Larry
next prev parent reply other threads:[~2008-10-16 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 2:08 [PATCH 6/6] p54: integrate parts of lmac_longbow.h and other parts of stlc45xx Christian Lamparter
2008-10-16 15:46 ` Larry Finger [this message]
2008-10-16 21:20 ` [PATCH 7/6] " Christian Lamparter
2008-10-16 22:30 ` Harvey Harrison
2008-10-17 1:17 ` Christian Lamparter
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=48F761CA.5040102@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=chunkeey@web.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=proski@gnu.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).