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

staging: ks7010: change static function return type

Function has return type 'int'. Function has internal linkage. Function
returns 0 on all execution paths. Function is called only once in the
driver and the return value is not checked. Removal of this return
value does not change the program logic. The 'int' return type is not
adding any information thus it is better to remove it.

Change return type of function with internal linkage from 'int' to
'void'.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 638a75b6
...@@ -169,23 +169,23 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv) ...@@ -169,23 +169,23 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
} }
} }
static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv) static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
{ {
unsigned char rw_data; unsigned char rw_data;
int ret; int ret;
if (priv->reg.powermgt == POWMGT_ACTIVE_MODE) if (priv->reg.powermgt == POWMGT_ACTIVE_MODE)
return 0; return;
if (priv->reg.operation_mode != MODE_INFRASTRUCTURE || if (priv->reg.operation_mode != MODE_INFRASTRUCTURE ||
(priv->connect_status & CONNECT_STATUS_MASK) != CONNECT_STATUS) (priv->connect_status & CONNECT_STATUS_MASK) != CONNECT_STATUS)
return 0; return;
if (priv->dev_state != DEVICE_STATE_SLEEP) if (priv->dev_state != DEVICE_STATE_SLEEP)
return 0; return;
if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) if (atomic_read(&priv->psstatus.status) == PS_SNOOZE)
return 0; return;
DPRINTK(5, "\npsstatus.status=%d\npsstatus.confirm_wait=%d\npsstatus.snooze_guard=%d\ncnt_txqbody=%d\n", DPRINTK(5, "\npsstatus.status=%d\npsstatus.confirm_wait=%d\npsstatus.snooze_guard=%d\ncnt_txqbody=%d\n",
atomic_read(&priv->psstatus.status), atomic_read(&priv->psstatus.status),
...@@ -193,40 +193,40 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv) ...@@ -193,40 +193,40 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
atomic_read(&priv->psstatus.snooze_guard), atomic_read(&priv->psstatus.snooze_guard),
cnt_txqbody(priv)); cnt_txqbody(priv));
if (!atomic_read(&priv->psstatus.confirm_wait) && if (atomic_read(&priv->psstatus.confirm_wait) ||
!atomic_read(&priv->psstatus.snooze_guard) && atomic_read(&priv->psstatus.snooze_guard) ||
!cnt_txqbody(priv)) { cnt_txqbody(priv)) {
ret = ks7010_sdio_read(priv, INT_PENDING, &rw_data, queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
sizeof(rw_data)); &priv->ks_wlan_hw.rw_wq, 0);
return;
}
ret = ks7010_sdio_read(priv, INT_PENDING, &rw_data, sizeof(rw_data));
if (ret) {
DPRINTK(1, " error : INT_PENDING=%02X\n", rw_data);
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1);
return;
}
if (!rw_data) {
rw_data = GCR_B_DOZE;
ret = ks7010_sdio_write(priv, GCR_B, &rw_data, sizeof(rw_data));
if (ret) { if (ret) {
DPRINTK(1, " error : INT_PENDING=%02X\n", rw_data); DPRINTK(1, " error : GCR_B=%02X\n", rw_data);
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1);
return 0;
}
if (!rw_data) {
rw_data = GCR_B_DOZE;
ret = ks7010_sdio_write(priv, GCR_B, &rw_data,
sizeof(rw_data));
if (ret) {
DPRINTK(1, " error : GCR_B=%02X\n", rw_data);
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1);
return 0;
}
DPRINTK(4, "PMG SET!! : GCR_B=%02X\n", rw_data);
atomic_set(&priv->psstatus.status, PS_SNOOZE);
DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
} else {
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq, queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 1); &priv->ks_wlan_hw.rw_wq, 1);
return;
} }
DPRINTK(4, "PMG SET!! : GCR_B=%02X\n", rw_data);
atomic_set(&priv->psstatus.status, PS_SNOOZE);
DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
} else { } else {
queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq, queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
&priv->ks_wlan_hw.rw_wq, 0); &priv->ks_wlan_hw.rw_wq, 1);
} }
return 0; return;
} }
int ks_wlan_hw_power_save(struct ks_wlan_private *priv) int ks_wlan_hw_power_save(struct ks_wlan_private *priv)
......
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