Commit 156f2703 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: ks7010: review debug and error messages in ks7010_sdio source

This commit reviews debug and error messages in code located
in ks7010_sdio source file avoiding to use 'error' or 'ks7010'
because this file is using netdev_* functions and has non
sense to repeat information in log messages.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 004e43c2
...@@ -204,7 +204,7 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv) ...@@ -204,7 +204,7 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
if (atomic_read(&priv->sleepstatus.status) == 0) { if (atomic_read(&priv->sleepstatus.status) == 0) {
ret = ks7010_sdio_writeb(priv, GCR_B_REG, GCR_B_DOZE); ret = ks7010_sdio_writeb(priv, GCR_B_REG, GCR_B_DOZE);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : GCR_B_REG\n"); netdev_err(priv->net_dev, "write GCR_B_REG\n");
goto set_sleep_mode; goto set_sleep_mode;
} }
atomic_set(&priv->sleepstatus.status, 1); atomic_set(&priv->sleepstatus.status, 1);
...@@ -225,7 +225,7 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv) ...@@ -225,7 +225,7 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
if (atomic_read(&priv->sleepstatus.status) == 1) { if (atomic_read(&priv->sleepstatus.status) == 1) {
ret = ks7010_sdio_writeb(priv, WAKEUP_REG, WAKEUP_REQ); ret = ks7010_sdio_writeb(priv, WAKEUP_REG, WAKEUP_REQ);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : WAKEUP_REG\n"); netdev_err(priv->net_dev, "write WAKEUP_REG\n");
goto set_sleep_mode; goto set_sleep_mode;
} }
atomic_set(&priv->sleepstatus.status, 0); atomic_set(&priv->sleepstatus.status, 0);
...@@ -244,7 +244,7 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv) ...@@ -244,7 +244,7 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) { if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
ret = ks7010_sdio_writeb(priv, WAKEUP_REG, WAKEUP_REQ); ret = ks7010_sdio_writeb(priv, WAKEUP_REG, WAKEUP_REQ);
if (ret) if (ret)
netdev_err(priv->net_dev, " error : WAKEUP_REG\n"); netdev_err(priv->net_dev, "write WAKEUP_REG\n");
priv->last_wakeup = jiffies; priv->last_wakeup = jiffies;
++priv->wakeup_count; ++priv->wakeup_count;
...@@ -286,7 +286,7 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv) ...@@ -286,7 +286,7 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
ret = ks7010_sdio_readb(priv, INT_PENDING_REG, &byte); ret = ks7010_sdio_readb(priv, INT_PENDING_REG, &byte);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : INT_PENDING_REG\n"); netdev_err(priv->net_dev, "read INT_PENDING_REG\n");
goto queue_delayed_work; goto queue_delayed_work;
} }
if (byte) if (byte)
...@@ -294,7 +294,7 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv) ...@@ -294,7 +294,7 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
ret = ks7010_sdio_writeb(priv, GCR_B_REG, GCR_B_DOZE); ret = ks7010_sdio_writeb(priv, GCR_B_REG, GCR_B_DOZE);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : GCR_B_REG\n"); netdev_err(priv->net_dev, "write GCR_B_REG\n");
goto queue_delayed_work; goto queue_delayed_work;
} }
atomic_set(&priv->psstatus.status, PS_SNOOZE); atomic_set(&priv->psstatus.status, PS_SNOOZE);
...@@ -365,13 +365,13 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer, ...@@ -365,13 +365,13 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
ret = ks7010_sdio_write(priv, DATA_WINDOW, buffer, size); ret = ks7010_sdio_write(priv, DATA_WINDOW, buffer, size);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " write error : retval=%d\n", ret); netdev_err(priv->net_dev, "write DATA_WINDOW\n");
return ret; return ret;
} }
ret = ks7010_sdio_writeb(priv, WRITE_STATUS_REG, REG_STATUS_BUSY); ret = ks7010_sdio_writeb(priv, WRITE_STATUS_REG, REG_STATUS_BUSY);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : WRITE_STATUS_REG\n"); netdev_err(priv->net_dev, "write WRITE_STATUS_REG\n");
return ret; return ret;
} }
...@@ -479,7 +479,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size) ...@@ -479,7 +479,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
#endif #endif
ret = ks7010_sdio_writeb(priv, READ_STATUS_REG, REG_STATUS_IDLE); ret = ks7010_sdio_writeb(priv, READ_STATUS_REG, REG_STATUS_IDLE);
if (ret) if (ret)
netdev_err(priv->net_dev, " error : READ_STATUS_REG\n"); netdev_err(priv->net_dev, "write READ_STATUS_REG\n");
/* length check fail */ /* length check fail */
return; return;
...@@ -492,7 +492,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size) ...@@ -492,7 +492,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
ret = ks7010_sdio_writeb(priv, READ_STATUS_REG, REG_STATUS_IDLE); ret = ks7010_sdio_writeb(priv, READ_STATUS_REG, REG_STATUS_IDLE);
if (ret) if (ret)
netdev_err(priv->net_dev, " error : READ_STATUS_REG\n"); netdev_err(priv->net_dev, "write READ_STATUS_REG\n");
if (atomic_read(&priv->psstatus.confirm_wait)) { if (atomic_read(&priv->psstatus.confirm_wait)) {
if (is_hif_conf(event)) { if (is_hif_conf(event)) {
...@@ -553,7 +553,7 @@ static void ks7010_rw_function(struct work_struct *work) ...@@ -553,7 +553,7 @@ static void ks7010_rw_function(struct work_struct *work)
/* read (WriteStatus/ReadDataSize FN1:00_0014) */ /* read (WriteStatus/ReadDataSize FN1:00_0014) */
ret = ks7010_sdio_readb(priv, WSTATUS_RSIZE_REG, &byte); ret = ks7010_sdio_readb(priv, WSTATUS_RSIZE_REG, &byte);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : WSTATUS_RSIZE_REG psstatus=%d\n", netdev_err(priv->net_dev, "read WSTATUS_RSIZE_REG psstatus=%d\n",
atomic_read(&priv->psstatus.status)); atomic_read(&priv->psstatus.status));
goto release_host; goto release_host;
} }
...@@ -585,7 +585,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) ...@@ -585,7 +585,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
ret = ks7010_sdio_readb(priv, INT_PENDING_REG, &status); ret = ks7010_sdio_readb(priv, INT_PENDING_REG, &status);
if (ret) { if (ret) {
netdev_err(priv->net_dev, "error : INT_PENDING_REG\n"); netdev_err(priv->net_dev, "read INT_PENDING_REG\n");
goto queue_delayed_work; goto queue_delayed_work;
} }
...@@ -598,7 +598,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) ...@@ -598,7 +598,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
atomic_read(&priv->psstatus.status) == PS_SNOOZE) { atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
ret = ks7010_sdio_readb(priv, GCR_B_REG, &byte); ret = ks7010_sdio_readb(priv, GCR_B_REG, &byte);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : GCR_B_REG\n"); netdev_err(priv->net_dev, "read GCR_B_REG\n");
goto queue_delayed_work; goto queue_delayed_work;
} }
if (byte == GCR_B_ACTIVE) { if (byte == GCR_B_ACTIVE) {
...@@ -614,7 +614,7 @@ static void ks_sdio_interrupt(struct sdio_func *func) ...@@ -614,7 +614,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
/* read (WriteStatus/ReadDataSize FN1:00_0014) */ /* read (WriteStatus/ReadDataSize FN1:00_0014) */
ret = ks7010_sdio_readb(priv, WSTATUS_RSIZE_REG, &byte); ret = ks7010_sdio_readb(priv, WSTATUS_RSIZE_REG, &byte);
if (ret) { if (ret) {
netdev_err(priv->net_dev, " error : WSTATUS_RSIZE_REG\n"); netdev_err(priv->net_dev, "read WSTATUS_RSIZE_REG\n");
goto queue_delayed_work; goto queue_delayed_work;
} }
rsize = byte & RSIZE_MASK; rsize = byte & RSIZE_MASK;
...@@ -948,7 +948,7 @@ static void ks7010_sdio_init_irqs(struct sdio_func *func, ...@@ -948,7 +948,7 @@ static void ks7010_sdio_init_irqs(struct sdio_func *func,
ret = ks7010_sdio_writeb(priv, INT_PENDING_REG, 0xff); ret = ks7010_sdio_writeb(priv, INT_PENDING_REG, 0xff);
sdio_release_host(func); sdio_release_host(func);
if (ret) if (ret)
netdev_err(priv->net_dev, " error : INT_PENDING_REG\n"); netdev_err(priv->net_dev, "write INT_PENDING_REG\n");
/* enable ks7010sdio interrupt */ /* enable ks7010sdio interrupt */
byte = (INT_GCR_B | INT_READ_STATUS | INT_WRITE_STATUS); byte = (INT_GCR_B | INT_READ_STATUS | INT_WRITE_STATUS);
...@@ -956,7 +956,7 @@ static void ks7010_sdio_init_irqs(struct sdio_func *func, ...@@ -956,7 +956,7 @@ static void ks7010_sdio_init_irqs(struct sdio_func *func,
ret = ks7010_sdio_writeb(priv, INT_ENABLE_REG, byte); ret = ks7010_sdio_writeb(priv, INT_ENABLE_REG, byte);
sdio_release_host(func); sdio_release_host(func);
if (ret) if (ret)
netdev_err(priv->net_dev, " err : INT_ENABLE_REG\n"); netdev_err(priv->net_dev, "write INT_ENABLE_REG\n");
} }
static void ks7010_private_init(struct ks_wlan_private *priv, static void ks7010_private_init(struct ks_wlan_private *priv,
...@@ -1024,12 +1024,11 @@ static int ks7010_sdio_probe(struct sdio_func *func, ...@@ -1024,12 +1024,11 @@ static int ks7010_sdio_probe(struct sdio_func *func,
/* private memory allocate */ /* private memory allocate */
netdev = alloc_etherdev(sizeof(*priv)); netdev = alloc_etherdev(sizeof(*priv));
if (!netdev) { if (!netdev) {
dev_err(&card->func->dev, "ks7010 : Unable to alloc new net device\n"); dev_err(&card->func->dev, "Unable to alloc new net device\n");
goto err_release_irq; goto err_release_irq;
} }
if (dev_alloc_name(netdev, "wlan%d") < 0) { if (dev_alloc_name(netdev, "wlan%d") < 0) {
dev_err(&card->func->dev, dev_err(&card->func->dev, "Couldn't get name!\n");
"ks7010 : Couldn't get name!\n");
goto err_free_netdev; goto err_free_netdev;
} }
...@@ -1043,8 +1042,7 @@ static int ks7010_sdio_probe(struct sdio_func *func, ...@@ -1043,8 +1042,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
ret = ks7010_upload_firmware(card); ret = ks7010_upload_firmware(card);
if (ret) { if (ret) {
netdev_err(priv->net_dev, netdev_err(priv->net_dev,
"ks7010: firmware load failed !! return code = %d\n", "firmware load failed !! ret = %d\n", ret);
ret);
goto err_free_netdev; goto err_free_netdev;
} }
......
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