Commit 87bf24f3 authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville

libertas: remove two libertas sparse warning

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: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 10d0bd56
...@@ -605,9 +605,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel, ...@@ -605,9 +605,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
if (ret == 0) { if (ret == 0) {
*curlevel = le16_to_cpu(cmd.curlevel); *curlevel = le16_to_cpu(cmd.curlevel);
if (minlevel) if (minlevel)
*minlevel = le16_to_cpu(cmd.minlevel); *minlevel = cmd.minlevel;
if (maxlevel) if (maxlevel)
*maxlevel = le16_to_cpu(cmd.maxlevel); *maxlevel = cmd.maxlevel;
} }
lbs_deb_leave(LBS_DEB_CMD); lbs_deb_leave(LBS_DEB_CMD);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment