From: Holger Schurig <hs4233@mail.mn-solutions.de>
To: linux-wireless@vger.kernel.org
Subject: [PATCH] libertas: remove two libertas sparse warning
Date: Wed, 29 Oct 2008 10:35:02 +0100 [thread overview]
Message-ID: <200810291035.02763.hs4233@mail.mn-solutions.de> (raw)
Johannes Berg detected this two sparse warnings:
drivers/net/wireless/libertas/cmd.c:609:16: warning: cast to restricted __le16
drivers/net/wireless/libertas/cmd.c:611:16: warning: cast to restricted __le16
... but cmd.minlevel is "s8", so we can access it directly and hope
for the sign-extension-code in the compiler to convert that to the
"s16" type.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
---
Sent this to Linville, johill and Dan, but forgot the mailing list ;-/
Index: linux-wl/drivers/net/wireless/libertas/cmd.c
===================================================================
--- linux-wl.orig/drivers/net/wireless/libertas/cmd.c 2008-10-29 08:22:28.000000000 +0100
+++ linux-wl/drivers/net/wireless/libertas/cmd.c 2008-10-29 08:22:36.000000000 +0100
@@ -606,9 +606,9 @@ int lbs_get_tx_power(struct lbs_private
if (ret == 0) {
*curlevel = le16_to_cpu(cmd.curlevel);
if (minlevel)
- *minlevel = le16_to_cpu(cmd.minlevel);
+ *minlevel = cmd.minlevel;
if (maxlevel)
- *maxlevel = le16_to_cpu(cmd.maxlevel);
+ *maxlevel = cmd.maxlevel;
}
lbs_deb_leave(LBS_DEB_CMD);
next reply other threads:[~2008-10-29 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 9:35 Holger Schurig [this message]
2008-10-29 10:17 ` [PATCH] libertas: remove two libertas sparse warning Dan Williams
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=200810291035.02763.hs4233@mail.mn-solutions.de \
--to=hs4233@mail.mn-solutions.de \
--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