rtl8188eu: Fix smatch warnings in os_dep/ioctl_linux.c

Smatch reports the following warnings:
  CHECK   /home/finger/rtl8188eu/os_dep/ioctl_linux.c
/home/finger/rtl8188eu/os_dep/ioctl_linux.c:991 rtw_wx_set_pmkid() warn: add some parenthesis here?
/home/finger/rtl8188eu/os_dep/ioctl_linux.c:1092 rtw_wx_get_range() warn: assigning (-78) to unsigned variable 'range->avg_qual.level'
/home/finger/rtl8188eu/os_dep/ioctl_linux.c:2742 rtw_get_ap_info() warn: add some parenthesis here?
/home/finger/rtl8188eu/os_dep/ioctl_linux.c:4225 rtw_rereg_nd_name() warn: add some parenthesis here?
/home/finger/rtl8188eu/os_dep/ioctl_linux.c:4234 rtw_rereg_nd_name() warn: add some parenthesis here?
/home/finger/rtl8188eu/os_dep/ioctl_linux.c:5072 set_group_key() warn: missing break? reassigning 'keylen'

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-09-05 17:36:23 -05:00
parent 43dd404762
commit 158597dcdd

View file

@ -988,7 +988,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
_rtw_memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); _rtw_memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
if (pPMK->cmd == IW_PMKSA_ADD) { if (pPMK->cmd == IW_PMKSA_ADD) {
DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == true) if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
return ret; return ret;
else else
ret = true; ret = true;
@ -1089,7 +1089,7 @@ static int rtw_wx_get_range(struct net_device *dev,
range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */ range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */
/* TODO: Find real 'good' to 'bad' threshol value for RSSI */ /* TODO: Find real 'good' to 'bad' threshol value for RSSI */
range->avg_qual.level = 20 + -98; range->avg_qual.level = 178; /* -78 dBm */
range->avg_qual.noise = 0; range->avg_qual.noise = 0;
range->avg_qual.updated = 7; /* Updated all three */ range->avg_qual.updated = 7; /* Updated all three */
@ -2739,7 +2739,7 @@ static int rtw_get_ap_info(struct net_device *dev,
return -EINVAL; return -EINVAL;
} }
if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == true) { if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
/* BSSID match, then check if supporting wpa/wpa2 */ /* BSSID match, then check if supporting wpa/wpa2 */
DBG_88E("BSSID:%pM\n", (bssid)); DBG_88E("BSSID:%pM\n", (bssid));
@ -4222,7 +4222,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
if (0 != ret) if (0 != ret)
goto exit; goto exit;
if (!memcmp(rereg_priv->old_ifname, "disable%d", 9) == true) { if (!memcmp(rereg_priv->old_ifname, "disable%d", 9)) {
padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed; padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed;
rtw_hal_sw_led_init(padapter); rtw_hal_sw_led_init(padapter);
rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode); rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode);
@ -4231,7 +4231,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
strncpy(rereg_priv->old_ifname, new_ifname, IFNAMSIZ); strncpy(rereg_priv->old_ifname, new_ifname, IFNAMSIZ);
rereg_priv->old_ifname[IFNAMSIZ-1] = 0; rereg_priv->old_ifname[IFNAMSIZ-1] = 0;
if (!memcmp(new_ifname, "disable%d", 9) == true) { if (!memcmp(new_ifname, "disable%d", 9)) {
DBG_88E("%s disable\n", __func__); DBG_88E("%s disable\n", __func__);
/* free network queue for Android's timming issue */ /* free network queue for Android's timming issue */
rtw_free_network_queue(padapter, true); rtw_free_network_queue(padapter, true);
@ -5067,7 +5067,6 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
case _TKIP_: case _TKIP_:
case _TKIP_WTMIC_: case _TKIP_WTMIC_:
case _AES_: case _AES_:
keylen = 16;
default: default:
keylen = 16; keylen = 16;
} }