[PATCH V2 30/31] staging: ks7010: drop counting sd errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

They were counted but never really used anywhere. Also change the printk
to a debug print, since it mostly shows on the expected -ENOMEDIUM on
card removal.

Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/ks7010/ks7010_sdio.c | 20 ++++++--------------
 drivers/staging/ks7010/ks_wlan.h     |  2 --
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index a8a14f928d421b..c166022b652e3a 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -234,8 +234,8 @@ int ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address,
 			    unsigned char *buffer, int length)
 {
-	int rc = -1;
 	struct ks_sdio_card *card;
+	int rc;
 
 	card = priv->ks_wlan_hw.sdio_card;
 
@@ -244,12 +244,8 @@ static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address,
 	else	/* CMD53 multi-block transfer */
 		rc = sdio_memcpy_fromio(card->func, buffer, address, length);
 
-	if (rc != 0) {
-		printk("sdio error erorr=%d size=%d\n", rc, length);
-		++priv->sdio_error_count;
-	} else {
-		priv->sdio_error_count = 0;
-	}
+	if (rc != 0)
+		DPRINTK(1, "sdio error=%d size=%d\n", rc, length);
 
 	return rc;
 }
@@ -257,8 +253,8 @@ static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address,
 static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address,
 			     unsigned char *buffer, int length)
 {
-	int rc = -1;
 	struct ks_sdio_card *card;
+	int rc;
 
 	card = priv->ks_wlan_hw.sdio_card;
 
@@ -268,12 +264,8 @@ static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address,
 		rc = sdio_memcpy_toio(card->func, (unsigned int)address, buffer,
 				      length);
 
-	if (rc != 0) {
-		printk("sdio error erorr=%d size=%d\n", rc, length);
-		++priv->sdio_error_count;
-	} else {
-		priv->sdio_error_count = 0;
-	}
+	if (rc != 0)
+		DPRINTK(1, "sdio error=%d size=%d\n", rc, length);
 
 	return rc;
 }
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index f0f9f8ef7d6185..a2126c2e728d2d 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -500,9 +500,7 @@ struct ks_wlan_private {
 	unsigned long last_doze;
 	unsigned long last_wakeup;
 
-	uint sdio_error_count;	/* SDIO error */
 	uint wakeup_count;	/* for detect wakeup loop */
-
 };
 
 #endif /* _KS_WLAN_H */
-- 
2.8.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux