From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Cc: dcbw@redhat.com, "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] libertas: correct "limited range of data type" warning
Date: Mon, 15 Sep 2008 17:27:42 -0400 [thread overview]
Message-ID: <1221514062-30679-1-git-send-email-linville@tuxdriver.com> (raw)
In-Reply-To: <>
CC [M] drivers/net/wireless/libertas/wext.o
drivers/net/wireless/libertas/wext.c: In function =E2=80=98lbs_get_rts=E2=
=80=99:
drivers/net/wireless/libertas/wext.c:307: warning: comparison is always
false due to limited range of data type
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/libertas/wext.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireles=
s/libertas/wext.c
index 1156be5..11297dc 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -281,7 +281,7 @@ static int lbs_set_rts(struct net_device *dev, stru=
ct iw_request_info *info,
if (vwrq->disabled)
val =3D MRVDRV_RTS_MAX_VALUE;
=20
- if (val < MRVDRV_RTS_MIN_VALUE || val > MRVDRV_RTS_MAX_VALUE)
+ if (val > MRVDRV_RTS_MAX_VALUE) /* min rts value is 0 */
return -EINVAL;
=20
ret =3D lbs_set_snmp_mib(priv, SNMP_MIB_OID_RTS_THRESHOLD, (u16) val)=
;
@@ -304,8 +304,7 @@ static int lbs_get_rts(struct net_device *dev, stru=
ct iw_request_info *info,
goto out;
=20
vwrq->value =3D val;
- vwrq->disabled =3D ((val < MRVDRV_RTS_MIN_VALUE)
- || (val > MRVDRV_RTS_MAX_VALUE));
+ vwrq->disabled =3D val > MRVDRV_RTS_MAX_VALUE; /* min rts value is 0 =
*/
vwrq->fixed =3D 1;
=20
out:
--=20
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2008-09-15 21:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 21:27 John W. Linville [this message]
2008-09-17 4:11 ` [PATCH] libertas: correct "limited range of data type" 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=1221514062-30679-1-git-send-email-linville@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=dcbw@redhat.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