Skip to content

Commit

Permalink
libertas: correct "limited range of data type" warning
Browse files Browse the repository at this point in the history
  CC [M]  drivers/net/wireless/libertas/wext.o
drivers/net/wireless/libertas/wext.c: In function ‘lbs_get_rts’:
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>
  • Loading branch information
John W. Linville committed Sep 15, 2008
1 parent 75d31cf commit 375da53
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/libertas/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info,
if (vwrq->disabled)
val = MRVDRV_RTS_MAX_VALUE;

if (val < MRVDRV_RTS_MIN_VALUE || val > MRVDRV_RTS_MAX_VALUE)
if (val > MRVDRV_RTS_MAX_VALUE) /* min rts value is 0 */
return -EINVAL;

ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_RTS_THRESHOLD, (u16) val);
Expand All @@ -304,8 +304,7 @@ static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info,
goto out;

vwrq->value = val;
vwrq->disabled = ((val < MRVDRV_RTS_MIN_VALUE)
|| (val > MRVDRV_RTS_MAX_VALUE));
vwrq->disabled = val > MRVDRV_RTS_MAX_VALUE; /* min rts value is 0 */
vwrq->fixed = 1;

out:
Expand Down

0 comments on commit 375da53

Please sign in to comment.