Commit 1770ae9d authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: rename return value identifier

Driver uses multiple identifier names for the same task (retval, ret,
rc). It would be easier to read the code if a single task is
identified with a single name. 'ret' is the most common return value
identifier name found in the kernel tree, following the principle of
least surprise using 'ret' is a decent choice.

Rename rc -> ret
Rename retval -> ret
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e765f31
This diff is collapsed.
......@@ -402,7 +402,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
unsigned short eth_proto;
struct ieee802_1x_hdr *aa1x_hdr;
struct wpa_eapol_key *eap_key;
int rc;
int ret;
DPRINTK(3, "\n");
......@@ -434,8 +434,8 @@ void hostif_data_indication(struct ks_wlan_private *priv)
/* for WPA */
if (auth_type != TYPE_DATA && priv->wpa.rsn_enabled) {
rc = hostif_data_indication_wpa(priv, auth_type);
if (rc)
ret = hostif_data_indication_wpa(priv, auth_type);
if (ret)
return;
}
......@@ -1124,12 +1124,12 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
struct ieee802_1x_hdr *aa1x_hdr;
struct wpa_eapol_key *eap_key;
struct ethhdr *eth;
int rc;
int ret;
packet_len = packet->len;
if (packet_len > ETH_FRAME_LEN) {
DPRINTK(1, "bad length packet_len=%d\n", packet_len);
rc = -EOVERFLOW;
ret = -EOVERFLOW;
goto err_kfree_skb;
}
......@@ -1157,7 +1157,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
if (!pp) {
DPRINTK(3, "allocate memory failed..\n");
rc = -ENOMEM;
ret = -ENOMEM;
goto err_kfree_skb;
}
......@@ -1171,7 +1171,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
if (memcmp(&priv->eth_addr[0], eth->h_source, ETH_ALEN)) {
DPRINTK(1, "invalid mac address !!\n");
DPRINTK(1, "ethernet->h_source=%pM\n", eth->h_source);
rc = -ENXIO;
ret = -ENXIO;
goto err_kfree;
}
......@@ -1281,7 +1281,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
err_kfree_skb:
dev_kfree_skb(packet);
return rc;
return ret;
}
#define ps_confirm_wait_inc(priv) do { \
......
......@@ -2842,20 +2842,20 @@ static const struct iw_handler_def ks_wlan_handler_def = {
static int ks_wlan_netdev_ioctl(struct net_device *dev, struct ifreq *rq,
int cmd)
{
int rc = 0;
int ret;
struct iwreq *wrq = (struct iwreq *)rq;
switch (cmd) {
case SIOCIWFIRSTPRIV + 20: /* KS_WLAN_SET_STOP_REQ */
rc = ks_wlan_set_stop_request(dev, NULL, &wrq->u.mode, NULL);
ret = ks_wlan_set_stop_request(dev, NULL, &wrq->u.mode, NULL);
break;
// All other calls are currently unsupported
default:
rc = -EOPNOTSUPP;
ret = -EOPNOTSUPP;
}
DPRINTK(5, "return=%d\n", rc);
return rc;
DPRINTK(5, "return=%d\n", ret);
return ret;
}
static
......
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