All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ks7010: replace DPRINTK traces in favour of preferred netdev_*
@ 2018-03-13  6:42 Sergio Paracuellos
  2018-03-13 10:04 ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Sergio Paracuellos @ 2018-03-13  6:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

This patch removes custom defined DPRINTK macro and replaces all the
associated debug and other traces for preferred ones netdev_*.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/Makefile      |   1 -
 drivers/staging/ks7010/ks7010_sdio.c | 146 +++++++++++------------
 drivers/staging/ks7010/ks_hostif.c   | 222 ++++++++++++++---------------------
 drivers/staging/ks7010/ks_wlan.h     |  10 --
 drivers/staging/ks7010/ks_wlan_net.c |  81 +++++--------
 5 files changed, 180 insertions(+), 280 deletions(-)

diff --git a/drivers/staging/ks7010/Makefile b/drivers/staging/ks7010/Makefile
index 69fcf8d..07dc16c 100644
--- a/drivers/staging/ks7010/Makefile
+++ b/drivers/staging/ks7010/Makefile
@@ -1,4 +1,3 @@
 obj-$(CONFIG_KS7010) += ks7010.o
 
-ccflags-y 	     += -DKS_WLAN_DEBUG=0
 ks7010-y	     := michael_mic.o ks_hostif.o ks_wlan_net.o ks7010_sdio.o
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 7de78d1..5451c04 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -112,22 +112,20 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
 {
 	int ret;
 
-	DPRINTK(4, "\n");
-
 	/* clear request */
 	atomic_set(&priv->sleepstatus.doze_request, 0);
 
 	if (atomic_read(&priv->sleepstatus.status) == 0) {
 		ret = ks7010_sdio_writeb(priv, GCR_B, GCR_B_DOZE);
 		if (ret) {
-			DPRINTK(1, " error : GCR_B\n");
+			netdev_err(priv->net_dev, " error : GCR_B\n");
 			goto set_sleep_mode;
 		}
-		DPRINTK(3, "sleep_mode=SLP_SLEEP\n");
+		netdev_dbg(priv->net_dev, "sleep_mode=SLP_SLEEP\n");
 		atomic_set(&priv->sleepstatus.status, 1);
 		priv->last_doze = jiffies;
 	} else {
-		DPRINTK(1, "sleep_mode=%d\n", priv->sleep_mode);
+		netdev_dbg(priv->net_dev, "sleep_mode=%d\n", priv->sleep_mode);
 	}
 
 set_sleep_mode:
@@ -138,23 +136,21 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
 {
 	int ret;
 
-	DPRINTK(4, "\n");
-
 	/* clear request */
 	atomic_set(&priv->sleepstatus.wakeup_request, 0);
 
 	if (atomic_read(&priv->sleepstatus.status) == 1) {
 		ret = ks7010_sdio_writeb(priv, WAKEUP, WAKEUP_REQ);
 		if (ret) {
-			DPRINTK(1, " error : WAKEUP\n");
+			netdev_err(priv->net_dev, " error : WAKEUP\n");
 			goto set_sleep_mode;
 		}
-		DPRINTK(4, "wake up : WAKEUP\n");
+		netdev_dbg(priv->net_dev, "wake up : WAKEUP\n");
 		atomic_set(&priv->sleepstatus.status, 0);
 		priv->last_wakeup = jiffies;
 		++priv->wakeup_count;
 	} else {
-		DPRINTK(1, "sleep_mode=%d\n", priv->sleep_mode);
+		netdev_dbg(priv->net_dev, "sleep_mode=%d\n", priv->sleep_mode);
 	}
 
 set_sleep_mode:
@@ -165,18 +161,17 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
 {
 	int ret;
 
-	DPRINTK(4, "\n");
 	if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
 		ret = ks7010_sdio_writeb(priv, WAKEUP, WAKEUP_REQ);
 		if (ret)
-			DPRINTK(1, " error : WAKEUP\n");
+			netdev_err(priv->net_dev, " error : WAKEUP\n");
 		else
-			DPRINTK(4, "wake up : WAKEUP\n");
+			netdev_dbg(priv->net_dev, "wake up : WAKEUP\n");
 
 		priv->last_wakeup = jiffies;
 		++priv->wakeup_count;
 	} else {
-		DPRINTK(1, "psstatus=%d\n",
+		netdev_dbg(priv->net_dev, "psstatus=%d\n",
 			atomic_read(&priv->psstatus.status));
 	}
 }
@@ -201,7 +196,7 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 	if (atomic_read(&priv->psstatus.status) == PS_SNOOZE)
 		return;
 
-	DPRINTK(5, "\npsstatus.status=%d\npsstatus.confirm_wait=%d\npsstatus.snooze_guard=%d\ncnt_txqbody=%d\n",
+	netdev_dbg(priv->net_dev, "\npsstatus.status=%d\npsstatus.confirm_wait=%d\npsstatus.snooze_guard=%d\ncnt_txqbody=%d\n",
 		atomic_read(&priv->psstatus.status),
 		atomic_read(&priv->psstatus.confirm_wait),
 		atomic_read(&priv->psstatus.snooze_guard),
@@ -216,7 +211,7 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 
 	ret = ks7010_sdio_readb(priv, INT_PENDING, &byte);
 	if (ret) {
-		DPRINTK(1, " error : INT_PENDING\n");
+		netdev_err(priv->net_dev, " error : INT_PENDING\n");
 		goto queue_delayed_work;
 	}
 	if (byte)
@@ -224,11 +219,11 @@ static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 
 	ret = ks7010_sdio_writeb(priv, GCR_B, GCR_B_DOZE);
 	if (ret) {
-		DPRINTK(1, " error : GCR_B\n");
+		netdev_err(priv->net_dev, " error : GCR_B\n");
 		goto queue_delayed_work;
 	}
 	atomic_set(&priv->psstatus.status, PS_SNOOZE);
-	DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
+	netdev_dbg(priv->net_dev, "psstatus.status=PS_SNOOZE\n");
 
 	return;
 
@@ -257,7 +252,7 @@ static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p,
 	}
 
 	if ((TX_DEVICE_BUFF_SIZE - 1) <= cnt_txqbody(priv)) {
-		DPRINTK(1, "tx buffer overflow\n");
+		netdev_err(priv->net_dev, "tx buffer overflow\n");
 		ret = -EOVERFLOW;
 		goto err_complete;
 	}
@@ -288,22 +283,22 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
 
 	hdr = (struct hostif_hdr *)buffer;
 
-	DPRINTK(4, "size=%d\n", hdr->size);
+	netdev_dbg(priv->net_dev, "size=%d\n", hdr->size);
 	if (le16_to_cpu(hdr->event) < HIF_DATA_REQ ||
 	    le16_to_cpu(hdr->event) > HIF_REQ_MAX) {
-		DPRINTK(1, "unknown event=%04X\n", hdr->event);
+		netdev_err(priv->net_dev, "unknown event=%04X\n", hdr->event);
 		return 0;
 	}
 
 	ret = ks7010_sdio_write(priv, DATA_WINDOW, buffer, size);
 	if (ret) {
-		DPRINTK(1, " write error : retval=%d\n", ret);
+		netdev_err(priv->net_dev, " write error : retval=%d\n", ret);
 		return ret;
 	}
 
 	ret = ks7010_sdio_writeb(priv, WRITE_STATUS, REG_STATUS_BUSY);
 	if (ret) {
-		DPRINTK(1, " error : WRITE_STATUS\n");
+		netdev_err(priv->net_dev, " error : WRITE_STATUS\n");
 		return ret;
 	}
 
@@ -315,7 +310,6 @@ static void tx_device_task(struct ks_wlan_private *priv)
 	struct tx_device_buffer *sp;
 	int ret;
 
-	DPRINTK(4, "\n");
 	if (cnt_txqbody(priv) <= 0 ||
 	    atomic_read(&priv->psstatus.status) == PS_SNOOZE)
 		return;
@@ -324,7 +318,7 @@ static void tx_device_task(struct ks_wlan_private *priv)
 	if (priv->dev_state >= DEVICE_STATE_BOOT) {
 		ret = write_to_device(priv, sp->sendp, sp->size);
 		if (ret) {
-			DPRINTK(1, "write_to_device error !!(%d)\n", ret);
+			netdev_err(priv->net_dev, "write_to_device error !!(%d)\n", ret);
 			queue_delayed_work(priv->wq, &priv->rw_dwork, 1);
 			return;
 		}
@@ -350,7 +344,7 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
 
 	if (le16_to_cpu(hdr->event) < HIF_DATA_REQ ||
 	    le16_to_cpu(hdr->event) > HIF_REQ_MAX) {
-		DPRINTK(1, "unknown event=%04X\n", hdr->event);
+		netdev_err(priv->net_dev, "unknown event=%04X\n", hdr->event);
 		return 0;
 	}
 
@@ -358,7 +352,7 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
 	priv->hostt.buff[priv->hostt.qtail] = le16_to_cpu(hdr->event);
 	priv->hostt.qtail = (priv->hostt.qtail + 1) % SME_EVENT_BUFF_SIZE;
 
-	DPRINTK(4, "event=%04X\n", hdr->event);
+	netdev_dbg(priv->net_dev, "event=%04X\n", hdr->event);
 	spin_lock(&priv->tx_dev.tx_dev_lock);
 	result = enqueue_txdev(priv, p, size, complete_handler, skb);
 	spin_unlock(&priv->tx_dev.tx_dev_lock);
@@ -374,8 +368,6 @@ static void rx_event_task(unsigned long dev)
 	struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
 	struct rx_device_buffer *rp;
 
-	DPRINTK(4, "\n");
-
 	if (cnt_rxqbody(priv) > 0 && priv->dev_state >= DEVICE_STATE_BOOT) {
 		rp = &priv->rx_dev.rx_dev_buff[priv->rx_dev.qhead];
 		hostif_receive(priv, rp->data, rp->size);
@@ -393,11 +385,9 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
 	struct hostif_hdr *hdr;
 	unsigned short event = 0;
 
-	DPRINTK(4, "\n");
-
 	/* receive data */
 	if (cnt_rxqbody(priv) >= (RX_DEVICE_BUFF_SIZE - 1)) {
-		DPRINTK(1, "rx buffer overflow\n");
+		netdev_err(priv->net_dev, "rx buffer overflow\n");
 		return;
 	}
 	rx_buffer = &priv->rx_dev.rx_dev_buff[priv->rx_dev.qtail];
@@ -409,15 +399,14 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
 
 	/* length check */
 	if (size > 2046 || size == 0) {
-#ifdef KS_WLAN_DEBUG
-		if (KS_WLAN_DEBUG > 5)
+#ifdef DEBUG
 			print_hex_dump_bytes("INVALID DATA dump: ",
 					     DUMP_PREFIX_OFFSET,
 					     rx_buffer->data, 32);
 #endif
 		ret = ks7010_sdio_writeb(priv, READ_STATUS, REG_STATUS_IDLE);
 		if (ret)
-			DPRINTK(1, " error : READ_STATUS\n");
+			netdev_err(priv->net_dev, " error : READ_STATUS\n");
 
 		/* length check fail */
 		return;
@@ -430,11 +419,11 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
 
 	ret = ks7010_sdio_writeb(priv, READ_STATUS, REG_STATUS_IDLE);
 	if (ret)
-		DPRINTK(1, " error : READ_STATUS\n");
+		netdev_err(priv->net_dev, " error : READ_STATUS\n");
 
 	if (atomic_read(&priv->psstatus.confirm_wait)) {
 		if (IS_HIF_CONF(event)) {
-			DPRINTK(4, "IS_HIF_CONF true !!\n");
+			netdev_dbg(priv->net_dev, "IS_HIF_CONF true !!\n");
 			atomic_dec(&priv->psstatus.confirm_wait);
 		}
 	}
@@ -450,18 +439,16 @@ static void ks7010_rw_function(struct work_struct *work)
 
 	priv = container_of(work, struct ks_wlan_private, rw_dwork.work);
 
-	DPRINTK(4, "\n");
-
 	/* wait after DOZE */
 	if (time_after(priv->last_doze + ((30 * HZ) / 1000), jiffies)) {
-		DPRINTK(4, "wait after DOZE\n");
+		netdev_dbg(priv->net_dev, "wait after DOZE\n");
 		queue_delayed_work(priv->wq, &priv->rw_dwork, 1);
 		return;
 	}
 
 	/* wait after WAKEUP */
 	while (time_after(priv->last_wakeup + ((30 * HZ) / 1000), jiffies)) {
-		DPRINTK(4, "wait after WAKEUP\n");
+		netdev_dbg(priv->net_dev, "wait after WAKEUP\n");
 		dev_info(&priv->ks_sdio_card->func->dev,
 			 "wake: %lu %lu\n",
 			 priv->last_wakeup + (30 * HZ) / 1000,
@@ -494,11 +481,11 @@ static void ks7010_rw_function(struct work_struct *work)
 	/* read (WriteStatus/ReadDataSize FN1:00_0014) */
 	ret = ks7010_sdio_readb(priv, WSTATUS_RSIZE, &byte);
 	if (ret) {
-		DPRINTK(1, " error : WSTATUS_RSIZE psstatus=%d\n",
+		netdev_err(priv->net_dev, " error : WSTATUS_RSIZE psstatus=%d\n",
 			atomic_read(&priv->psstatus.status));
 		goto release_host;
 	}
-	DPRINTK(4, "WSTATUS_RSIZE=%02X\n", byte);
+	netdev_dbg(priv->net_dev, "WSTATUS_RSIZE=%02X\n", byte);
 
 	if (byte & RSIZE_MASK) {	/* Read schedule */
 		ks_wlan_hw_rx(priv, (uint16_t)((byte & RSIZE_MASK) << 4));
@@ -521,17 +508,16 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 
 	card = sdio_get_drvdata(func);
 	priv = card->priv;
-	DPRINTK(4, "\n");
 
 	if (priv->dev_state < DEVICE_STATE_BOOT)
 		goto queue_delayed_work;
 
 	ret = ks7010_sdio_readb(priv, INT_PENDING, &status);
 	if (ret) {
-		DPRINTK(1, "error : INT_PENDING\n");
+		netdev_err(priv->net_dev, "error : INT_PENDING\n");
 		goto queue_delayed_work;
 	}
-	DPRINTK(4, "INT_PENDING=%02X\n", status);
+	netdev_dbg(priv->net_dev, "INT_PENDING=%02X\n", status);
 
 	/* schedule task for interrupt status */
 	/* bit7 -> Write General Communication B register */
@@ -542,7 +528,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 	    atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
 		ret = ks7010_sdio_readb(priv, GCR_B, &byte);
 		if (ret) {
-			DPRINTK(1, " error : GCR_B\n");
+			netdev_err(priv->net_dev, " error : GCR_B\n");
 			goto queue_delayed_work;
 		}
 		if (byte == GCR_B_ACTIVE) {
@@ -558,10 +544,10 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 		/* read (WriteStatus/ReadDataSize FN1:00_0014) */
 		ret = ks7010_sdio_readb(priv, WSTATUS_RSIZE, &byte);
 		if (ret) {
-			DPRINTK(1, " error : WSTATUS_RSIZE\n");
+			netdev_err(priv->net_dev, " error : WSTATUS_RSIZE\n");
 			goto queue_delayed_work;
 		}
-		DPRINTK(4, "WSTATUS_RSIZE=%02X\n", byte);
+		netdev_dbg(priv->net_dev, "WSTATUS_RSIZE=%02X\n", byte);
 		rsize = byte & RSIZE_MASK;
 		if (rsize != 0)		/* Read schedule */
 			ks_wlan_hw_rx(priv, (uint16_t)(rsize << 4));
@@ -658,7 +644,7 @@ static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address,
 
 	if (memcmp(data, read_buf, size) != 0) {
 		ret = -EIO;
-		DPRINTK(0, "data compare error (%d)\n", ret);
+		netdev_err(priv->net_dev, "data compare error (%d)\n", ret);
 		goto err_free_read_buf;
 	}
 
@@ -689,7 +675,7 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 	/* Firmware running ? */
 	ret = ks7010_sdio_readb(priv, GCR_A, &byte);
 	if (byte == GCR_A_RUN) {
-		DPRINTK(0, "MAC firmware running ...\n");
+		netdev_dbg(priv->net_dev, "MAC firmware running ...\n");
 		goto release_host_and_free;
 	}
 
@@ -709,7 +695,7 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 			size = length;
 			length = 0;
 		}
-		DPRINTK(4, "size = %d\n", size);
+		netdev_dbg(priv->net_dev, "size = %d\n", size);
 		if (size == 0)
 			break;
 		memcpy(rom_buf, fw_entry->data + n, size);
@@ -735,7 +721,7 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 	if (ret)
 		goto release_firmware;
 
-	DPRINTK(4, " REMAP Request : GCR_A\n");
+	netdev_dbg(priv->net_dev, " REMAP Request : GCR_A\n");
 
 	/* Firmware running check */
 	for (n = 0; n < 50; ++n) {
@@ -747,9 +733,9 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 		if (byte == GCR_A_RUN)
 			break;
 	}
-	DPRINTK(4, "firmware wakeup (%d)!!!!\n", n);
+	netdev_dbg(priv->net_dev, "firmware wakeup (%d)!!!!\n", n);
 	if ((50) <= n) {
-		DPRINTK(1, "firmware can't start\n");
+		netdev_err(priv->net_dev, "firmware can't start\n");
 		ret = -EIO;
 		goto release_firmware;
 	}
@@ -767,20 +753,20 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 
 static void ks7010_card_init(struct ks_wlan_private *priv)
 {
-	DPRINTK(5, "\ncard_init_task()\n");
+	netdev_dbg(priv->net_dev, "\ncard_init_task()\n");
 
 	init_completion(&priv->confirm_wait);
 
-	DPRINTK(5, "init_completion()\n");
+	netdev_dbg(priv->net_dev, "init_completion()\n");
 
 	/* get mac address & firmware version */
 	hostif_sme_enqueue(priv, SME_START);
 
-	DPRINTK(5, "hostif_sme_enqueu()\n");
+	netdev_dbg(priv->net_dev, "hostif_sme_enqueu()\n");
 
 	if (!wait_for_completion_interruptible_timeout
 	    (&priv->confirm_wait, 5 * HZ)) {
-		DPRINTK(1, "wait time out!! SME_START\n");
+		netdev_dbg(priv->net_dev, "wait time out!! SME_START\n");
 	}
 
 	if (priv->mac_address_valid && priv->version_size != 0)
@@ -807,14 +793,14 @@ static void ks7010_card_init(struct ks_wlan_private *priv)
 
 	if (!wait_for_completion_interruptible_timeout
 	    (&priv->confirm_wait, 5 * HZ)) {
-		DPRINTK(1, "wait time out!! wireless parameter set\n");
+		netdev_dbg(priv->net_dev, "wait time out!! wireless parameter set\n");
 	}
 
 	if (priv->dev_state >= DEVICE_STATE_PREINIT) {
-		DPRINTK(1, "DEVICE READY!!\n");
+		netdev_dbg(priv->net_dev, "DEVICE READY!!\n");
 		priv->dev_state = DEVICE_STATE_READY;
 	} else {
-		DPRINTK(1, "dev_state=%d\n", priv->dev_state);
+		netdev_dbg(priv->net_dev, "dev_state=%d\n", priv->dev_state);
 	}
 }
 
@@ -866,11 +852,11 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	sdio_claim_host(func);
 
 	ret = sdio_set_block_size(func, KS7010_IO_BLOCK_SIZE);
-	DPRINTK(5, "multi_block=%d sdio_set_block_size()=%d %d\n",
+	netdev_dbg(priv->net_dev, "multi_block=%d sdio_set_block_size()=%d %d\n",
 		func->card->cccr.multi_block, func->cur_blksize, ret);
 
 	ret = sdio_enable_func(func);
-	DPRINTK(5, "sdio_enable_func() %d\n", ret);
+	netdev_dbg(priv->net_dev, "sdio_enable_func() %d\n", ret);
 	if (ret)
 		goto err_free_card;
 
@@ -891,7 +877,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 
 	sdio_set_drvdata(func, card);
 
-	DPRINTK(5, "class = 0x%X, vendor = 0x%X, device = 0x%X\n",
+	netdev_dbg(priv->net_dev, "class = 0x%X, vendor = 0x%X, device = 0x%X\n",
 		func->class, func->vendor, func->device);
 
 	/* private memory allocate */
@@ -948,7 +934,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	ret = ks7010_sdio_writeb(priv, INT_PENDING, 0xff);
 	sdio_release_host(func);
 	if (ret)
-		DPRINTK(1, " error : INT_PENDING\n");
+		netdev_err(priv->net_dev, " error : INT_PENDING\n");
 
 	/* enable ks7010sdio interrupt */
 	byte = (INT_GCR_B | INT_READ_STATUS | INT_WRITE_STATUS);
@@ -956,14 +942,14 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	ret = ks7010_sdio_writeb(priv, INT_ENABLE, byte);
 	sdio_release_host(func);
 	if (ret)
-		DPRINTK(1, " err : INT_ENABLE\n");
+		netdev_err(priv->net_dev, " err : INT_ENABLE\n");
 
-	DPRINTK(4, " enable Interrupt : INT_ENABLE=%02X\n", byte);
+	netdev_dbg(priv->net_dev, " enable Interrupt : INT_ENABLE=%02X\n", byte);
 	priv->dev_state = DEVICE_STATE_BOOT;
 
 	priv->wq = create_workqueue("wq");
 	if (!priv->wq) {
-		DPRINTK(1, "create_workqueue failed !!\n");
+		netdev_err(priv->net_dev, "create_workqueue failed !!\n");
 		goto err_free_netdev;
 	}
 
@@ -1003,7 +989,7 @@ static int send_stop_request(struct sdio_func *func)
 
 	pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
 	if (!pp) {
-		DPRINTK(3, "allocate memory failed..\n");
+		netdev_err(card->priv->net_dev, "allocate memory failed..\n");
 		return -ENOMEM;
 	}
 
@@ -1031,35 +1017,35 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 	if (!card)
 		return;
 
-	DPRINTK(1, "priv = card->priv\n");
 	priv = card->priv;
+	netdev_dbg(priv->net_dev, "priv = card->priv\n");
 	if (priv) {
 		struct net_device *netdev = priv->net_dev;
 
 		ks_wlan_net_stop(netdev);
-		DPRINTK(1, "ks_wlan_net_stop\n");
+		netdev_dbg(priv->net_dev, "ks_wlan_net_stop\n");
 
 		/* interrupt disable */
 		sdio_claim_host(func);
 		sdio_writeb(func, 0, INT_ENABLE, &ret);
 		sdio_writeb(func, 0xff, INT_PENDING, &ret);
 		sdio_release_host(func);
-		DPRINTK(1, "interrupt disable\n");
+		netdev_dbg(priv->net_dev, "interrupt disable\n");
 
 		ret = send_stop_request(func);
 		if (ret)	/* memory allocation failure */
 			return;
 
-		DPRINTK(1, "STOP Req\n");
+		netdev_dbg(priv->net_dev, "STOP Req\n");
 
 		if (priv->wq) {
 			flush_workqueue(priv->wq);
 			destroy_workqueue(priv->wq);
 		}
-		DPRINTK(1, "destroy_workqueue(priv->wq);\n");
+		netdev_dbg(priv->net_dev, "destroy_workqueue(priv->wq);\n");
 
 		hostif_exit(priv);
-		DPRINTK(1, "hostif_exit\n");
+		netdev_dbg(priv->net_dev, "hostif_exit\n");
 
 		unregister_netdev(netdev);
 
@@ -1070,17 +1056,17 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 
 	sdio_claim_host(func);
 	sdio_release_irq(func);
-	DPRINTK(1, "sdio_release_irq()\n");
+	netdev_dbg(priv->net_dev, "sdio_release_irq()\n");
 	sdio_disable_func(func);
-	DPRINTK(1, "sdio_disable_func()\n");
+	netdev_dbg(priv->net_dev, "sdio_disable_func()\n");
 	sdio_release_host(func);
 
 	sdio_set_drvdata(func, NULL);
 
 	kfree(card);
-	DPRINTK(1, "kfree()\n");
+	netdev_dbg(priv->net_dev, "kfree()\n");
 
-	DPRINTK(5, " Bye !!\n");
+	netdev_dbg(priv->net_dev, " Bye !!\n");
 }
 
 static struct sdio_driver ks7010_sdio_driver = {
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 05f7be4..63b1cab 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -88,17 +88,17 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work)
 				&priv->psstatus.wakeup_wait,
 				msecs_to_jiffies(20));
 		if (time_left <= 0) {
-			DPRINTK(1, "wake up timeout or interrupted !!!\n");
+			netdev_dbg(priv->net_dev, "wake up timeout or interrupted !!!\n");
 			schedule_work(&priv->wakeup_work);
 			return;
 		}
 	} else {
-		DPRINTK(1, "ps_status=%d\n", ps_status);
+		netdev_dbg(priv->net_dev, "ps_status=%d\n", ps_status);
 	}
 
 	/* power save */
 	if (atomic_read(&priv->sme_task.count) > 0) {
-		DPRINTK(4, "sme task enable.\n");
+		netdev_dbg(priv->net_dev, "sme task enable.\n");
 		tasklet_enable(&priv->sme_task);
 	}
 }
@@ -106,7 +106,7 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work)
 static
 int ks_wlan_do_power_save(struct ks_wlan_private *priv)
 {
-	DPRINTK(4, "psstatus.status=%d\n", atomic_read(&priv->psstatus.status));
+	netdev_dbg(priv->net_dev, "psstatus.status=%d\n", atomic_read(&priv->psstatus.status));
 
 	if (is_connect_status(priv->connect_status))
 		hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST);
@@ -122,7 +122,6 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
 	union iwreq_data wrqu;
 	struct net_device *netdev = priv->net_dev;
 
-	DPRINTK(3, "\n");
 	ap = &priv->current_ap;
 
 	if (is_disconnect_status(priv->connect_status)) {
@@ -195,12 +194,12 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
 	if (is_connect_status(priv->connect_status)) {
 		memcpy(wrqu.ap_addr.sa_data,
 		       priv->current_ap.bssid, ETH_ALEN);
-		DPRINTK(3,
+		netdev_dbg(priv->net_dev,
 			"IWEVENT: connect bssid=%pM\n", wrqu.ap_addr.sa_data);
 		wireless_send_event(netdev, SIOCGIWAP, &wrqu, NULL);
 	}
-	DPRINTK(4, "\n    Link AP\n");
-	DPRINTK(4, "    bssid=%02X:%02X:%02X:%02X:%02X:%02X\n"
+	netdev_dbg(priv->net_dev, "\n    Link AP\n");
+	netdev_dbg(priv->net_dev, "    bssid=%02X:%02X:%02X:%02X:%02X:%02X\n"
 		   "    essid=%s\n"
 		   "    rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n"
 		   "    channel=%d\n"
@@ -215,9 +214,9 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
 		ap->rate_set.body[4], ap->rate_set.body[5],
 		ap->rate_set.body[6], ap->rate_set.body[7],
 		ap->channel, ap->rssi, ap->sq, ap->capability);
-	DPRINTK(4, "\n    Link AP\n    rsn.mode=%d\n    rsn.size=%d\n",
+	netdev_dbg(priv->net_dev, "\n    Link AP\n    rsn.mode=%d\n    rsn.size=%d\n",
 		ap_info->rsn_mode, ap_info->rsn.size);
-	DPRINTK(4, "\n    ext_rate_set_size=%d\n    rate_set_size=%d\n",
+	netdev_dbg(priv->net_dev, "\n    ext_rate_set_size=%d\n    rate_set_size=%d\n",
 		ap_info->ext_rate_set.size, ap_info->rate_set.size);
 
 	return 0;
@@ -230,7 +229,6 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
 	unsigned char *bp;
 	int bsize, offset;
 
-	DPRINTK(3, "\n");
 	memset(ap, 0, sizeof(struct local_ap_t));
 
 	/* bssid */
@@ -256,7 +254,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
 			if (*(bp + 1) <= IEEE80211_MAX_SSID_LEN) {
 				ap->ssid.size = *(bp + 1);
 			} else {
-				DPRINTK(1, "size over :: ssid size=%d\n",
+				netdev_dbg(priv->net_dev, "size over :: ssid size=%d\n",
 					*(bp + 1));
 				ap->ssid.size = IEEE80211_MAX_SSID_LEN;
 			}
@@ -270,7 +268,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
 				       bp + 2, *(bp + 1));
 				ap->rate_set.size += *(bp + 1);
 			} else {
-				DPRINTK(1, "size over :: rate size=%d\n",
+				netdev_dbg(priv->net_dev, "size over :: rate size=%d\n",
 					(*(bp + 1) + ap->rate_set.size));
 				memcpy(&ap->rate_set.body[ap->rate_set.size],
 				       bp + 2,
@@ -286,7 +284,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
 			if (*(bp + 1) <= RSN_IE_BODY_MAX) {
 				ap->rsn_ie.size = *(bp + 1);
 			} else {
-				DPRINTK(1, "size over :: rsn size=%d\n",
+				netdev_dbg(priv->net_dev, "size over :: rsn size=%d\n",
 					*(bp + 1));
 				ap->rsn_ie.size = RSN_IE_BODY_MAX;
 			}
@@ -298,7 +296,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
 				if (*(bp + 1) <= RSN_IE_BODY_MAX) {
 					ap->wpa_ie.size = *(bp + 1);
 				} else {
-					DPRINTK(1,
+					netdev_dbg(priv->net_dev,
 						"size over :: wpa size=%d\n",
 						*(bp + 1));
 					ap->wpa_ie.size = RSN_IE_BODY_MAX;
@@ -316,7 +314,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
 		case WLAN_EID_ERP_INFO:
 			break;
 		default:
-			DPRINTK(4, "unknown Element ID=%d\n", *bp);
+			netdev_err(priv->net_dev, "unknown Element ID=%d\n", *bp);
 			break;
 		}
 
@@ -347,7 +345,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
 	eth_proto = ntohs(eth_hdr->h_proto);
 
 	if (eth_hdr->h_dest_snap != eth_hdr->h_source_snap) {
-		DPRINTK(1, "invalid data format\n");
+		netdev_err(priv->net_dev, "invalid data format\n");
 		priv->nstats.rx_errors++;
 		return -EINVAL;
 	}
@@ -358,7 +356,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
 	     (auth_type == TYPE_GMK2 &&
 	      priv->wpa.group_suite == IW_AUTH_CIPHER_TKIP)) &&
 	    key->key_len) {
-		DPRINTK(4, "TKIP: protocol=%04X: size=%u\n",
+		netdev_dbg(priv->net_dev, "TKIP: protocol=%04X: size=%u\n",
 			eth_proto, priv->rx_size);
 		/* MIC save */
 		memcpy(&recv_mic[0], (priv->rxp) + ((priv->rx_size) - 8), 8);
@@ -379,7 +377,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
 			    (now - mic_failure->last_failure_time) / HZ >= 60) {
 				mic_failure->failure = 0;
 			}
-			DPRINTK(4, "MIC FAILURE\n");
+			netdev_err(priv->net_dev, "MIC FAILURE\n");
 			if (mic_failure->failure == 0) {
 				mic_failure->failure = 1;
 				mic_failure->counter = 0;
@@ -400,7 +398,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
 				eth_hdr->h_source);
 			memset(&wrqu, 0, sizeof(wrqu));
 			wrqu.data.length = strlen(buf);
-			DPRINTK(4, "IWEVENT:MICHAELMICFAILURE\n");
+			netdev_dbg(priv->net_dev, "IWEVENT:MICHAELMICFAILURE\n");
 			wireless_send_event(priv->net_dev, IWEVCUSTOM, &wrqu,
 					    buf);
 			return -EINVAL;
@@ -422,11 +420,10 @@ void hostif_data_indication(struct ks_wlan_private *priv)
 	size_t size;
 	int ret;
 
-	DPRINTK(3, "\n");
 
 	/* min length check */
 	if (priv->rx_size <= ETH_HLEN) {
-		DPRINTK(3, "rx_size = %d\n", priv->rx_size);
+		netdev_dbg(priv->net_dev, "rx_size = %d\n", priv->rx_size);
 		priv->nstats.rx_errors++;
 		return;
 	}
@@ -436,12 +433,12 @@ void hostif_data_indication(struct ks_wlan_private *priv)
 
 	eth_hdr = (struct ether_hdr *)(priv->rxp);
 	eth_proto = ntohs(eth_hdr->h_proto);
-	DPRINTK(3, "ether protocol = %04X\n", eth_proto);
+	netdev_dbg(priv->net_dev, "ether protocol = %04X\n", eth_proto);
 
 	/* source address check */
 	if (memcmp(&priv->eth_addr[0], eth_hdr->h_source, ETH_ALEN) == 0) {
-		DPRINTK(1, "invalid : source is own mac address !!\n");
-		DPRINTK(1,
+		netdev_err(priv->net_dev, "invalid : source is own mac address !!\n");
+		netdev_err(priv->net_dev,
 			"eth_hdrernet->h_dest=%02X:%02X:%02X:%02X:%02X:%02X\n",
 			eth_hdr->h_source[0], eth_hdr->h_source[1],
 			eth_hdr->h_source[2], eth_hdr->h_source[3],
@@ -471,7 +468,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
 			priv->nstats.rx_dropped++;
 			return;
 		}
-		DPRINTK(4, "SNAP, rx_ind_size = %d\n", rx_ind_size);
+		netdev_dbg(priv->net_dev, "SNAP, rx_ind_size = %d\n", rx_ind_size);
 
 		size = ETH_ALEN * 2;
 		skb_put_data(skb, priv->rxp, size);
@@ -490,7 +487,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
 			priv->nstats.rx_dropped++;
 			return;
 		}
-		DPRINTK(3, "NETBEUI/NetBIOS rx_ind_size=%d\n", rx_ind_size);
+		netdev_dbg(priv->net_dev, "NETBEUI/NetBIOS rx_ind_size=%d\n", rx_ind_size);
 
 		skb_put_data(skb, priv->rxp, 12);	/* 8802/FDDI MAC copy */
 
@@ -503,7 +500,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
 		aa1x_hdr = (struct ieee802_1x_hdr *)(priv->rxp + 14);
 		break;
 	default:	/* other rx data */
-		DPRINTK(2, "invalid data format\n");
+		netdev_err(priv->net_dev, "invalid data format\n");
 		priv->nstats.rx_errors++;
 		return;
 	}
@@ -529,8 +526,6 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 	u16 mib_val_size;
 	u16 mib_val_type;
 
-	DPRINTK(3, "\n");
-
 	mib_status = get_DWORD(priv);	/* MIB status */
 	mib_attribute = get_DWORD(priv);	/* MIB atttibute */
 	mib_val_size = get_WORD(priv);	/* MIB value size */
@@ -538,7 +533,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 
 	if (mib_status) {
 		/* in case of error */
-		DPRINTK(1, "attribute=%08X, status=%08X\n", mib_attribute,
+		netdev_dbg(priv->net_dev, "attribute=%08X, status=%08X\n", mib_attribute,
 			mib_status);
 		return;
 	}
@@ -546,7 +541,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 	switch (mib_attribute) {
 	case DOT11_MAC_ADDRESS:
 		/* MAC address */
-		DPRINTK(3, " mib_attribute=DOT11_MAC_ADDRESS\n");
+		netdev_dbg(priv->net_dev, " mib_attribute=DOT11_MAC_ADDRESS\n");
 		hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS);
 		memcpy(priv->eth_addr, priv->rxp, ETH_ALEN);
 		priv->mac_address_valid = 1;
@@ -562,7 +557,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 		break;
 	case DOT11_PRODUCT_VERSION:
 		/* firmware version */
-		DPRINTK(3, " mib_attribute=DOT11_PRODUCT_VERSION\n");
+		netdev_dbg(priv->net_dev, " mib_attribute=DOT11_PRODUCT_VERSION\n");
 		priv->version_size = priv->rx_size;
 		memcpy(priv->firmware_version, priv->rxp, priv->rx_size);
 		priv->firmware_version[priv->rx_size] = '\0';
@@ -574,13 +569,13 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 		break;
 	case LOCAL_GAIN:
 		memcpy(&priv->gain, priv->rxp, sizeof(priv->gain));
-		DPRINTK(3, "tx_mode=%d, rx_mode=%d, tx_gain=%d, rx_gain=%d\n",
+		netdev_dbg(priv->net_dev, "tx_mode=%d, rx_mode=%d, tx_gain=%d, rx_gain=%d\n",
 			priv->gain.tx_mode, priv->gain.rx_mode,
 			priv->gain.tx_gain, priv->gain.rx_gain);
 		break;
 	case LOCAL_EEPROM_SUM:
 		memcpy(&priv->eeprom_sum, priv->rxp, sizeof(priv->eeprom_sum));
-		DPRINTK(1, "eeprom_sum.type=%x, eeprom_sum.result=%x\n",
+		netdev_dbg(priv->net_dev, "eeprom_sum.type=%x, eeprom_sum.result=%x\n",
 			priv->eeprom_sum.type, priv->eeprom_sum.result);
 		if (priv->eeprom_sum.type == 0) {
 			priv->eeprom_checksum = EEPROM_CHECKSUM_NONE;
@@ -596,7 +591,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
 		}
 		break;
 	default:
-		DPRINTK(1, "mib_attribute=%08x\n", (unsigned int)mib_attribute);
+		netdev_dbg(priv->net_dev, "mib_attribute=%08x\n", (unsigned int)mib_attribute);
 		break;
 	}
 }
@@ -607,14 +602,12 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 	u32 mib_status;	/* +04 MIB Status */
 	u32 mib_attribute;	/* +08 MIB attribute */
 
-	DPRINTK(3, "\n");
-
 	mib_status = get_DWORD(priv);	/* MIB Status */
 	mib_attribute = get_DWORD(priv);	/* MIB attribute */
 
 	if (mib_status) {
 		/* in case of error */
-		DPRINTK(1, "error :: attribute=%08X, status=%08X\n",
+		netdev_err(priv->net_dev, "error :: attribute=%08X, status=%08X\n",
 			mib_attribute, mib_status);
 	}
 
@@ -630,7 +623,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 			hostif_sme_enqueue(priv, SME_WEP_INDEX_CONFIRM);
 		break;
 	case DOT11_WEP_DEFAULT_KEY_VALUE1:
-		DPRINTK(2, "DOT11_WEP_DEFAULT_KEY_VALUE1:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_WEP_DEFAULT_KEY_VALUE1:mib_status=%d\n",
 			(int)mib_status);
 		if (priv->wpa.rsn_enabled)
 			hostif_sme_enqueue(priv, SME_SET_PMK_TSC);
@@ -638,7 +631,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 			hostif_sme_enqueue(priv, SME_WEP_KEY1_CONFIRM);
 		break;
 	case DOT11_WEP_DEFAULT_KEY_VALUE2:
-		DPRINTK(2, "DOT11_WEP_DEFAULT_KEY_VALUE2:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_WEP_DEFAULT_KEY_VALUE2:mib_status=%d\n",
 			(int)mib_status);
 		if (priv->wpa.rsn_enabled)
 			hostif_sme_enqueue(priv, SME_SET_GMK1_TSC);
@@ -646,7 +639,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 			hostif_sme_enqueue(priv, SME_WEP_KEY2_CONFIRM);
 		break;
 	case DOT11_WEP_DEFAULT_KEY_VALUE3:
-		DPRINTK(2, "DOT11_WEP_DEFAULT_KEY_VALUE3:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_WEP_DEFAULT_KEY_VALUE3:mib_status=%d\n",
 			(int)mib_status);
 		if (priv->wpa.rsn_enabled)
 			hostif_sme_enqueue(priv, SME_SET_GMK2_TSC);
@@ -654,7 +647,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 			hostif_sme_enqueue(priv, SME_WEP_KEY3_CONFIRM);
 		break;
 	case DOT11_WEP_DEFAULT_KEY_VALUE4:
-		DPRINTK(2, "DOT11_WEP_DEFAULT_KEY_VALUE4:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_WEP_DEFAULT_KEY_VALUE4:mib_status=%d\n",
 			(int)mib_status);
 		if (!priv->wpa.rsn_enabled)
 			hostif_sme_enqueue(priv, SME_WEP_KEY4_CONFIRM);
@@ -664,7 +657,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 			hostif_sme_enqueue(priv, SME_WEP_FLAG_CONFIRM);
 		break;
 	case DOT11_RSN_ENABLED:
-		DPRINTK(2, "DOT11_RSN_ENABLED:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_RSN_ENABLED:mib_status=%d\n",
 			(int)mib_status);
 		hostif_sme_enqueue(priv, SME_RSN_ENABLED_CONFIRM);
 		break;
@@ -681,50 +674,50 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 		priv->mac_address_valid = 1;
 		break;
 	case DOT11_RSN_CONFIG_MULTICAST_CIPHER:
-		DPRINTK(2, "DOT11_RSN_CONFIG_MULTICAST_CIPHER:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_RSN_CONFIG_MULTICAST_CIPHER:mib_status=%d\n",
 			(int)mib_status);
 		hostif_sme_enqueue(priv, SME_RSN_MCAST_CONFIRM);
 		break;
 	case DOT11_RSN_CONFIG_UNICAST_CIPHER:
-		DPRINTK(2, "DOT11_RSN_CONFIG_UNICAST_CIPHER:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_RSN_CONFIG_UNICAST_CIPHER:mib_status=%d\n",
 			(int)mib_status);
 		hostif_sme_enqueue(priv, SME_RSN_UCAST_CONFIRM);
 		break;
 	case DOT11_RSN_CONFIG_AUTH_SUITE:
-		DPRINTK(2, "DOT11_RSN_CONFIG_AUTH_SUITE:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "DOT11_RSN_CONFIG_AUTH_SUITE:mib_status=%d\n",
 			(int)mib_status);
 		hostif_sme_enqueue(priv, SME_RSN_AUTH_CONFIRM);
 		break;
 	case DOT11_PMK_TSC:
-		DPRINTK(2, "DOT11_PMK_TSC:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "DOT11_PMK_TSC:mib_status=%d\n", (int)mib_status);
 		break;
 	case DOT11_GMK1_TSC:
-		DPRINTK(2, "DOT11_GMK1_TSC:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "DOT11_GMK1_TSC:mib_status=%d\n", (int)mib_status);
 		if (atomic_read(&priv->psstatus.snooze_guard))
 			atomic_set(&priv->psstatus.snooze_guard, 0);
 		break;
 	case DOT11_GMK2_TSC:
-		DPRINTK(2, "DOT11_GMK2_TSC:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "DOT11_GMK2_TSC:mib_status=%d\n", (int)mib_status);
 		if (atomic_read(&priv->psstatus.snooze_guard))
 			atomic_set(&priv->psstatus.snooze_guard, 0);
 		break;
 	case LOCAL_PMK:
-		DPRINTK(2, "LOCAL_PMK:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "LOCAL_PMK:mib_status=%d\n", (int)mib_status);
 		break;
 	case LOCAL_GAIN:
-		DPRINTK(2, "LOCAL_GAIN:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "LOCAL_GAIN:mib_status=%d\n", (int)mib_status);
 		break;
 #ifdef WPS
 	case LOCAL_WPS_ENABLE:
-		DPRINTK(2, "LOCAL_WPS_ENABLE:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "LOCAL_WPS_ENABLE:mib_status=%d\n", (int)mib_status);
 		break;
 	case LOCAL_WPS_PROBE_REQ:
-		DPRINTK(2, "LOCAL_WPS_PROBE_REQ:mib_status=%d\n",
+		netdev_dbg(priv->net_dev, "LOCAL_WPS_PROBE_REQ:mib_status=%d\n",
 			(int)mib_status);
 		break;
 #endif /* WPS */
 	case LOCAL_REGION:
-		DPRINTK(2, "LOCAL_REGION:mib_status=%d\n", (int)mib_status);
+		netdev_dbg(priv->net_dev, "LOCAL_REGION:mib_status=%d\n", (int)mib_status);
 	default:
 		break;
 	}
@@ -733,8 +726,6 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 static
 void hostif_power_mgmt_confirm(struct ks_wlan_private *priv)
 {
-	DPRINTK(3, "\n");
-
 	if (priv->reg.power_mgmt > POWER_MGMT_ACTIVE &&
 	    priv->reg.operation_mode == MODE_INFRASTRUCTURE) {
 		atomic_set(&priv->psstatus.confirm_wait, 0);
@@ -748,8 +739,6 @@ void hostif_power_mgmt_confirm(struct ks_wlan_private *priv)
 static
 void hostif_sleep_confirm(struct ks_wlan_private *priv)
 {
-	DPRINTK(3, "\n");
-
 	atomic_set(&priv->sleepstatus.doze_request, 1);
 	queue_delayed_work(priv->wq, &priv->rw_dwork, 1);
 }
@@ -765,11 +754,11 @@ void hostif_start_confirm(struct ks_wlan_private *priv)
 	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
 	if (is_connect_status(priv->connect_status)) {
 		eth_zero_addr(wrqu.ap_addr.sa_data);
-		DPRINTK(3, "IWEVENT: disconnect\n");
+		netdev_dbg(priv->net_dev, "IWEVENT: disconnect\n");
 		wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL);
 	}
 #endif
-	DPRINTK(3, " scan_ind_count=%d\n", priv->scan_ind_count);
+	netdev_dbg(priv->net_dev, " scan_ind_count=%d\n", priv->scan_ind_count);
 	hostif_sme_enqueue(priv, SME_START_CONFIRM);
 }
 
@@ -786,7 +775,7 @@ void hostif_connect_indication(struct ks_wlan_private *priv)
 
 	switch (connect_code) {
 	case RESULT_CONNECT:	/* connect */
-		DPRINTK(3, "connect :: scan_ind_count=%d\n",
+		netdev_dbg(priv->net_dev, "connect :: scan_ind_count=%d\n",
 			priv->scan_ind_count);
 		if (!(priv->connect_status & FORCE_DISCONNECT))
 			netif_carrier_on(netdev);
@@ -794,14 +783,14 @@ void hostif_connect_indication(struct ks_wlan_private *priv)
 		priv->connect_status = tmp + CONNECT_STATUS;
 		break;
 	case RESULT_DISCONNECT:	/* disconnect */
-		DPRINTK(3, "disconnect :: scan_ind_count=%d\n",
+		netdev_dbg(priv->net_dev, "disconnect :: scan_ind_count=%d\n",
 			priv->scan_ind_count);
 		netif_carrier_off(netdev);
 		tmp = FORCE_DISCONNECT & priv->connect_status;
 		priv->connect_status = tmp + DISCONNECT_STATUS;
 		break;
 	default:
-		DPRINTK(1, "unknown connect_code=%d :: scan_ind_count=%d\n",
+		netdev_err(priv->net_dev, "unknown connect_code=%d :: scan_ind_count=%d\n",
 			connect_code, priv->scan_ind_count);
 		netif_carrier_off(netdev);
 		tmp = FORCE_DISCONNECT & priv->connect_status;
@@ -824,8 +813,8 @@ void hostif_connect_indication(struct ks_wlan_private *priv)
 	if (is_disconnect_status(priv->connect_status) &&
 	    is_connect_status(old_status)) {
 		eth_zero_addr(wrqu0.ap_addr.sa_data);
-		DPRINTK(3, "IWEVENT: disconnect\n");
-		DPRINTK(3, "disconnect :: scan_ind_count=%d\n",
+		netdev_dbg(priv->net_dev, "IWEVENT: disconnect\n");
+		netdev_dbg(priv->net_dev, "disconnect :: scan_ind_count=%d\n",
 			priv->scan_ind_count);
 		wireless_send_event(netdev, SIOCGIWAP, &wrqu0, NULL);
 	}
@@ -838,7 +827,7 @@ void hostif_scan_indication(struct ks_wlan_private *priv)
 	int i;
 	struct ap_info_t *ap_info;
 
-	DPRINTK(3, "scan_ind_count = %d\n", priv->scan_ind_count);
+	netdev_dbg(priv->net_dev, "scan_ind_count = %d\n", priv->scan_ind_count);
 	ap_info = (struct ap_info_t *)(priv->rxp);
 
 	if (priv->scan_ind_count) {
@@ -855,13 +844,13 @@ void hostif_scan_indication(struct ks_wlan_private *priv)
 	}
 	priv->scan_ind_count++;
 	if (priv->scan_ind_count < LOCAL_APLIST_MAX + 1) {
-		DPRINTK(4, " scan_ind_count=%d :: aplist.size=%d\n",
+		netdev_dbg(priv->net_dev, " scan_ind_count=%d :: aplist.size=%d\n",
 			priv->scan_ind_count, priv->aplist.size);
 		get_ap_information(priv, (struct ap_info_t *)(priv->rxp),
 				   &(priv->aplist.ap[priv->scan_ind_count - 1]));
 		priv->aplist.size = priv->scan_ind_count;
 	} else {
-		DPRINTK(4, " count over :: scan_ind_count=%d\n",
+		netdev_dbg(priv->net_dev, " count over :: scan_ind_count=%d\n",
 			priv->scan_ind_count);
 	}
 }
@@ -874,7 +863,6 @@ void hostif_stop_confirm(struct ks_wlan_private *priv)
 	struct net_device *netdev = priv->net_dev;
 	union iwreq_data wrqu0;
 
-	DPRINTK(3, "\n");
 	if (priv->dev_state == DEVICE_STATE_SLEEP)
 		priv->dev_state = DEVICE_STATE_READY;
 
@@ -891,9 +879,9 @@ void hostif_stop_confirm(struct ks_wlan_private *priv)
 		if (is_disconnect_status(priv->connect_status) &&
 		    is_connect_status(old_status)) {
 			eth_zero_addr(wrqu0.ap_addr.sa_data);
-			DPRINTK(3, "IWEVENT: disconnect\n");
+			netdev_dbg(priv->net_dev, "IWEVENT: disconnect\n");
 			netdev_info(netdev, "IWEVENT: disconnect\n");
-			DPRINTK(3, "disconnect :: scan_ind_count=%d\n",
+			netdev_dbg(priv->net_dev, "disconnect :: scan_ind_count=%d\n",
 				priv->scan_ind_count);
 			wireless_send_event(netdev, SIOCGIWAP, &wrqu0, NULL);
 		}
@@ -906,7 +894,6 @@ void hostif_stop_confirm(struct ks_wlan_private *priv)
 static
 void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
 {
-	DPRINTK(3, "\n");
 	priv->infra_status = 0;	/* infrastructure mode cancel */
 	hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
 }
@@ -916,9 +903,8 @@ void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
 {
 	u16 result_code;
 
-	DPRINTK(3, "\n");
 	result_code = get_WORD(priv);
-	DPRINTK(3, "result code = %d\n", result_code);
+	netdev_dbg(priv->net_dev, "result code = %d\n", result_code);
 	priv->infra_status = 1;	/* infrastructure mode set */
 	hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
 }
@@ -926,7 +912,6 @@ void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
 static
 void hostif_adhoc_set_confirm(struct ks_wlan_private *priv)
 {
-	DPRINTK(3, "\n");
 	priv->infra_status = 1;	/* infrastructure mode set */
 	hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
 }
@@ -945,7 +930,6 @@ void hostif_associate_indication(struct ks_wlan_private *priv)
 	static const char associnfo_leader0[] = "ASSOCINFO(ReqIEs=";
 	static const char associnfo_leader1[] = " RespIEs=";
 
-	DPRINTK(3, "\n");
 	assoc_req = (struct association_request_t *)(priv->rxp);
 	assoc_resp = (struct association_response_t *)(assoc_req + 1);
 	pb = (unsigned char *)(assoc_resp + 1);
@@ -971,7 +955,7 @@ void hostif_associate_indication(struct ks_wlan_private *priv)
 	pbuf += sprintf(pbuf, ")");
 	wrqu.data.length += 1;
 
-	DPRINTK(3, "IWEVENT:ASSOCINFO\n");
+	netdev_dbg(priv->net_dev, "IWEVENT:ASSOCINFO\n");
 	wireless_send_event(priv->net_dev, IWEVCUSTOM, &wrqu, buf);
 }
 
@@ -983,7 +967,7 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
 	union iwreq_data wrqu;
 
 	result_code = get_DWORD(priv);
-	DPRINTK(2, "result=%d :: scan_ind_count=%d\n", result_code,
+	netdev_dbg(priv->net_dev, "result=%d :: scan_ind_count=%d\n", result_code,
 		priv->scan_ind_count);
 
 	priv->sme_i.sme_flag &= ~SME_AP_SCAN;
@@ -991,7 +975,7 @@ void hostif_bss_scan_confirm(struct ks_wlan_private *priv)
 
 	wrqu.data.length = 0;
 	wrqu.data.flags = 0;
-	DPRINTK(3, "IWEVENT: SCAN CONFIRM\n");
+	netdev_dbg(priv->net_dev, "IWEVENT: SCAN CONFIRM\n");
 	wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL);
 	priv->scan_ind_count = 0;
 }
@@ -1005,7 +989,6 @@ void hostif_phy_information_confirm(struct ks_wlan_private *priv)
 	unsigned int transmitted_frame_count, received_fragment_count;
 	unsigned int failed_count, fcs_error_count;
 
-	DPRINTK(3, "\n");
 	rssi = get_BYTE(priv);
 	signal = get_BYTE(priv);
 	noise = get_BYTE(priv);
@@ -1015,14 +998,14 @@ void hostif_phy_information_confirm(struct ks_wlan_private *priv)
 	failed_count = get_DWORD(priv);
 	fcs_error_count = get_DWORD(priv);
 
-	DPRINTK(4, "phyinfo confirm rssi=%d signal=%d\n", rssi, signal);
+	netdev_dbg(priv->net_dev, "phyinfo confirm rssi=%d signal=%d\n", rssi, signal);
 	priv->current_rate = (link_speed & RATE_MASK);
 	wstats->qual.qual = signal;
 	wstats->qual.level = 256 - rssi;
 	wstats->qual.noise = 0;	/* invalid noise value */
 	wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
 
-	DPRINTK(3, "\n    rssi=%u\n"
+	netdev_dbg(priv->net_dev, "\n    rssi=%u\n"
 		   "    signal=%u\n"
 		   "    link_speed=%ux500Kbps\n"
 		   "    transmitted_frame_count=%u\n"
@@ -1038,7 +1021,7 @@ void hostif_phy_information_confirm(struct ks_wlan_private *priv)
 static
 void hostif_mic_failure_confirm(struct ks_wlan_private *priv)
 {
-	DPRINTK(3, "mic_failure=%u\n", priv->wpa.mic_failure.failure);
+	netdev_dbg(priv->net_dev, "mic_failure=%u\n", priv->wpa.mic_failure.failure);
 	hostif_sme_enqueue(priv, SME_MIC_FAILURE_CONFIRM);
 }
 
@@ -1047,7 +1030,6 @@ void hostif_event_check(struct ks_wlan_private *priv)
 {
 	unsigned short event;
 
-	DPRINTK(4, "\n");
 	event = get_WORD(priv);	/* get event */
 	switch (event) {
 	case HIF_DATA_IND:
@@ -1103,7 +1085,7 @@ void hostif_event_check(struct ks_wlan_private *priv)
 		break;
 	case HIF_AP_SET_CONF:
 	default:
-		//DPRINTK(1, "undefined event[%04X]\n", event);
+		//netdev_err(priv->net_dev, "undefined event[%04X]\n", event);
 		netdev_err(priv->net_dev, "undefined event[%04X]\n", event);
 		/* wake_up_all(&priv->confirm_wait); */
 		complete(&priv->confirm_wait);
@@ -1151,7 +1133,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 
 	skb_len = skb->len;
 	if (skb_len > ETH_FRAME_LEN) {
-		DPRINTK(1, "bad length skb_len=%d\n", skb_len);
+		netdev_dbg(priv->net_dev, "bad length skb_len=%d\n", skb_len);
 		ret = -EOVERFLOW;
 		goto err_kfree_skb;
 	}
@@ -1159,7 +1141,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 	if (is_disconnect_status(priv->connect_status) ||
 	    (priv->connect_status & FORCE_DISCONNECT) ||
 	    priv->wpa.mic_failure.stop) {
-		DPRINTK(3, " DISCONNECT\n");
+		netdev_dbg(priv->net_dev, " DISCONNECT\n");
 		if (netif_queue_stopped(priv->net_dev))
 			netif_wake_queue(priv->net_dev);
 		if (skb)
@@ -1189,8 +1171,8 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 	/* skb check */
 	eth = (struct ethhdr *)skb->data;
 	if (memcmp(&priv->eth_addr[0], eth->h_source, ETH_ALEN) != 0) {
-		DPRINTK(1, "invalid mac address !!\n");
-		DPRINTK(1, "ethernet->h_source=%pM\n", eth->h_source);
+		netdev_err(priv->net_dev, "invalid mac address !!\n");
+		netdev_err(priv->net_dev, "ethernet->h_source=%pM\n", eth->h_source);
 		ret = -ENXIO;
 		goto err_kfree;
 	}
@@ -1205,7 +1187,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 	/* EtherType/Length check */
 	if (*(buffer + 1) + (*buffer << 8) > 1500) {
 		/* ProtocolEAP = *(buffer+1) + (*buffer << 8); */
-		/* DPRINTK(2, "Send [SNAP]Type %x\n",ProtocolEAP); */
+		/* netdev_dbg(priv->net_dev, "Send [SNAP]Type %x\n",ProtocolEAP); */
 		/* SAP/CTL/OUI(6 byte) add */
 		*p++ = 0xAA;	/* DSAP */
 		*p++ = 0xAA;	/* SSAP */
@@ -1215,7 +1197,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 		*p++ = 0x00;	/* OUI ("000000") */
 		skb_len += 6;
 	} else {
-		DPRINTK(4, "DIX\n");
+		netdev_dbg(priv->net_dev, "DIX\n");
 		/* Length(2 byte) delete */
 		buffer += 2;
 		length -= 2;
@@ -1290,7 +1272,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 	    priv->wpa.mic_failure.failure > 0) {
 		if (keyinfo & WPA_KEY_INFO_ERROR &&
 		    keyinfo & WPA_KEY_INFO_REQUEST) {
-			DPRINTK(3, " MIC ERROR Report SET : %04X\n", keyinfo);
+			netdev_err(priv->net_dev, " MIC ERROR Report SET : %04X\n", keyinfo);
 			hostif_sme_enqueue(priv, SME_MIC_FAILURE_REQUEST);
 		}
 		if (priv->wpa.mic_failure.failure == 2)
@@ -1319,8 +1301,6 @@ void hostif_mib_get_request(struct ks_wlan_private *priv,
 {
 	struct hostif_mib_get_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_MIB_GET_REQ);
 	if (!pp)
 		return;
@@ -1339,10 +1319,8 @@ void hostif_mib_set_request(struct ks_wlan_private *priv,
 {
 	struct hostif_mib_set_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	if (priv->dev_state < DEVICE_STATE_BOOT) {
-		DPRINTK(3, "DeviceRemove\n");
+		netdev_dbg(priv->net_dev, "DeviceRemove\n");
 		return;
 	}
 
@@ -1365,8 +1343,6 @@ void hostif_start_request(struct ks_wlan_private *priv, unsigned char mode)
 {
 	struct hostif_start_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_START_REQ);
 	if (!pp)
 		return;
@@ -1404,8 +1380,6 @@ void hostif_ps_adhoc_set_request(struct ks_wlan_private *priv)
 {
 	struct hostif_ps_adhoc_set_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_PS_ADH_SET_REQ);
 	if (!pp)
 		return;
@@ -1429,7 +1403,7 @@ void hostif_infrastructure_set_request(struct ks_wlan_private *priv)
 {
 	struct hostif_infrastructure_set_request_t *pp;
 
-	DPRINTK(3, "ssid.size=%d\n", priv->reg.ssid.size);
+	netdev_dbg(priv->net_dev, "ssid.size=%d\n", priv->reg.ssid.size);
 
 	pp = hostif_generic_request(sizeof(*pp), HIF_INFRA_SET_REQ);
 	if (!pp)
@@ -1478,7 +1452,7 @@ static void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
 {
 	struct hostif_infrastructure_set2_request_t *pp;
 
-	DPRINTK(2, "ssid.size=%d\n", priv->reg.ssid.size);
+	netdev_dbg(priv->net_dev, "ssid.size=%d\n", priv->reg.ssid.size);
 
 	pp = hostif_generic_request(sizeof(*pp), HIF_INFRA_SET2_REQ);
 	if (!pp)
@@ -1530,8 +1504,6 @@ void hostif_adhoc_set_request(struct ks_wlan_private *priv)
 {
 	struct hostif_adhoc_set_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_ADH_SET_REQ);
 	if (!pp)
 		return;
@@ -1557,8 +1529,6 @@ void hostif_adhoc_set2_request(struct ks_wlan_private *priv)
 {
 	struct hostif_adhoc_set2_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_ADH_SET_REQ);
 	if (!pp)
 		return;
@@ -1587,8 +1557,6 @@ void hostif_stop_request(struct ks_wlan_private *priv)
 {
 	struct hostif_stop_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_STOP_REQ);
 	if (!pp)
 		return;
@@ -1603,8 +1571,6 @@ void hostif_phy_information_request(struct ks_wlan_private *priv)
 {
 	struct hostif_phy_information_request_t *pp;
 
-	DPRINTK(3, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_PHY_INFO_REQ);
 	if (!pp)
 		return;
@@ -1629,7 +1595,7 @@ void hostif_power_mgmt_request(struct ks_wlan_private *priv,
 {
 	struct hostif_power_mgmt_request_t *pp;
 
-	DPRINTK(3, "mode=%lu wake_up=%lu receive_dtims=%lu\n", mode, wake_up,
+	netdev_dbg(priv->net_dev, "mode=%lu wake_up=%lu receive_dtims=%lu\n", mode, wake_up,
 		receive_dtims);
 
 	pp = hostif_generic_request(sizeof(*pp), HIF_POWER_MGMT_REQ);
@@ -1651,7 +1617,7 @@ void hostif_sleep_request(struct ks_wlan_private *priv,
 {
 	struct hostif_sleep_request_t *pp;
 
-	DPRINTK(3, "mode=%lu\n", (long)mode);
+	netdev_dbg(priv->net_dev, "mode=%lu\n", (long)mode);
 
 	if (mode == SLP_SLEEP) {
 		pp = hostif_generic_request(sizeof(*pp), HIF_SLEEP_REQ);
@@ -1666,7 +1632,7 @@ void hostif_sleep_request(struct ks_wlan_private *priv,
 		atomic_set(&priv->sleepstatus.wakeup_request, 1);
 		queue_delayed_work(priv->wq, &priv->rw_dwork, 1);
 	} else {
-		DPRINTK(3, "invalid mode %ld\n", (long)mode);
+		netdev_err(priv->net_dev, "invalid mode %ld\n", (long)mode);
 		return;
 	}
 }
@@ -1678,8 +1644,6 @@ void hostif_bss_scan_request(struct ks_wlan_private *priv,
 {
 	struct hostif_bss_scan_request_t *pp;
 
-	DPRINTK(2, "\n");
-
 	pp = hostif_generic_request(sizeof(*pp), HIF_SCAN_REQ);
 	if (!pp)
 		return;
@@ -1730,7 +1694,7 @@ void hostif_mic_failure_request(struct ks_wlan_private *priv,
 {
 	struct hostif_mic_failure_request_t *pp;
 
-	DPRINTK(3, "count=%d :: timer=%d\n", failure_count, timer);
+	netdev_dbg(priv->net_dev, "count=%d :: timer=%d\n", failure_count, timer);
 
 	pp = hostif_generic_request(sizeof(*pp), HIF_MIC_FAILURE_REQ);
 	if (!pp)
@@ -1771,8 +1735,6 @@ static void devio_rec_ind(struct ks_wlan_private *priv, unsigned char *p,
 void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
 		    unsigned int size)
 {
-	DPRINTK(4, "\n");
-
 	devio_rec_ind(priv, p, size);
 
 	priv->rxp = p;
@@ -2106,7 +2068,7 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
 			hostif_infrastructure_set_request(priv);
 		} else {
 			hostif_infrastructure_set2_request(priv);
-			DPRINTK(2,
+			netdev_dbg(priv->net_dev,
 				"Infra bssid = %pM\n", priv->reg.bssid);
 		}
 		break;
@@ -2116,7 +2078,7 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
 			hostif_adhoc_set_request(priv);
 		} else {
 			hostif_adhoc_set2_request(priv);
-			DPRINTK(2,
+			netdev_dbg(priv->net_dev,
 				"Adhoc bssid = %pM\n", priv->reg.bssid);
 		}
 		break;
@@ -2135,8 +2097,6 @@ void hostif_sme_multicast_set(struct ks_wlan_private *priv)
 	__le32 filter_type;
 	int i = 0;
 
-	DPRINTK(3, "\n");
-
 	spin_lock(&priv->multicast_spin);
 
 	memset(set_address, 0, NIC_MAX_MCAST_LIST * ETH_ALEN);
@@ -2186,7 +2146,6 @@ void hostif_sme_power_mgmt_set(struct ks_wlan_private *priv)
 {
 	unsigned long mode, wake_up, receive_dtims;
 
-	DPRINTK(3, "\n");
 	switch (priv->reg.power_mgmt) {
 	case POWER_MGMT_ACTIVE:
 		mode = POWER_ACTIVE;
@@ -2227,7 +2186,6 @@ void hostif_sme_power_mgmt_set(struct ks_wlan_private *priv)
 static
 void hostif_sme_sleep_set(struct ks_wlan_private *priv)
 {
-	DPRINTK(3, "\n");
 	switch (priv->sleep_mode) {
 	case SLP_SLEEP:
 		hostif_sleep_request(priv, priv->sleep_mode);
@@ -2311,7 +2269,7 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
 	struct pmk_t *pmk;
 	int i;
 
-	DPRINTK(4, "pmklist.size=%d\n", priv->pmklist.size);
+	netdev_dbg(priv->net_dev, "pmklist.size=%d\n", priv->pmklist.size);
 	i = 0;
 	list_for_each_entry(pmk, &priv->pmklist.head, list) {
 		if (i < PMK_LIST_MAX) {
@@ -2335,7 +2293,7 @@ void hostif_sme_execute(struct ks_wlan_private *priv, int event)
 {
 	__le32 val;
 
-	DPRINTK(3, "event=%d\n", event);
+	netdev_dbg(priv->net_dev, "event=%d\n", event);
 	switch (event) {
 	case SME_START:
 		if (priv->dev_state == DEVICE_STATE_BOOT)
@@ -2369,7 +2327,7 @@ void hostif_sme_execute(struct ks_wlan_private *priv, int event)
 						   priv->wpa.mic_failure.failure - 1,
 						   priv->wpa.mic_failure.counter);
 		} else {
-			DPRINTK(4, "SME_MIC_FAILURE_REQUEST: failure count=%u error?\n",
+			netdev_err(priv->net_dev, "SME_MIC_FAILURE_REQUEST: failure count=%u error?\n",
 				priv->wpa.mic_failure.failure);
 		}
 		break;
@@ -2510,8 +2468,6 @@ void hostif_sme_task(unsigned long dev)
 {
 	struct ks_wlan_private *priv = (struct ks_wlan_private *)dev;
 
-	DPRINTK(3, "\n");
-
 	if (priv->dev_state < DEVICE_STATE_BOOT)
 		return;
 
@@ -2527,8 +2483,6 @@ void hostif_sme_task(unsigned long dev)
 /* send to Station Management Entity module */
 void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)
 {
-	DPRINTK(3, "\n");
-
 	/* enqueue sme event */
 	if (cnt_smeqbody(priv) < (SME_EVENT_BUFF_SIZE - 1)) {
 		priv->sme_i.event_buff[priv->sme_i.qtail] = event;
@@ -2549,8 +2503,6 @@ int hostif_init(struct ks_wlan_private *priv)
 {
 	int i;
 
-	DPRINTK(3, "\n");
-
 	priv->aplist.size = 0;
 	for (i = 0; i < LOCAL_APLIST_MAX; i++)
 		memset(&priv->aplist.ap[i], 0, sizeof(struct local_ap_t));
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 3767079..4fff7f7 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -34,16 +34,6 @@
 
 #include "ks7010_sdio.h"
 
-#ifdef KS_WLAN_DEBUG
-#define DPRINTK(n, fmt, args...) \
-	do { \
-		if (KS_WLAN_DEBUG > (n)) \
-			pr_notice("%s: "fmt, __func__, ## args); \
-	} while (0)
-#else
-#define DPRINTK(n, fmt, args...)
-#endif
-
 struct ks_wlan_parameter {
 	u8 operation_mode;	/* Operation Mode */
 	u8 channel;	/*  Channel */
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 91acf87..c27971f 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -86,7 +86,7 @@ int ks_wlan_update_phy_information(struct ks_wlan_private *priv)
 {
 	struct iw_statistics *wstats = &priv->wstats;
 
-	DPRINTK(4, "in_interrupt = %ld\n", in_interrupt());
+	netdev_dbg(priv->net_dev, "in_interrupt = %ld\n", in_interrupt());
 
 	if (priv->dev_state < DEVICE_STATE_READY)
 		return -EBUSY;	/* not finished initialize */
@@ -103,7 +103,7 @@ int ks_wlan_update_phy_information(struct ks_wlan_private *priv)
 	/* interruptible_sleep_on_timeout(&priv->confirm_wait, HZ/2); */
 	if (!wait_for_completion_interruptible_timeout
 	    (&priv->confirm_wait, HZ / 2)) {
-		DPRINTK(1, "wait time out!!\n");
+		netdev_dbg(priv->net_dev, "wait time out!!\n");
 	}
 
 	atomic_inc(&update_phyinfo);
@@ -116,15 +116,13 @@ int ks_wlan_update_phy_information(struct ks_wlan_private *priv)
 static
 void ks_wlan_update_phyinfo_timeout(struct timer_list *unused)
 {
-	DPRINTK(4, "in_interrupt = %ld\n", in_interrupt());
+	pr_debug("in_interrupt = %ld\n", in_interrupt());
 	atomic_set(&update_phyinfo, 0);
 }
 
 int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
 			    unsigned int commit_flag)
 {
-	DPRINTK(2, "\n");
-
 	hostif_sme_enqueue(priv, SME_STOP_REQUEST);
 
 	if (commit_flag & SME_RTS)
@@ -268,7 +266,7 @@ static int ks_wlan_set_essid(struct net_device *dev,
 	struct ks_wlan_private *priv = netdev_priv(dev);
 	size_t len;
 
-	DPRINTK(2, " %d\n", dwrq->flags);
+	netdev_dbg(dev, " %d\n", dwrq->flags);
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -352,8 +350,6 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 
@@ -370,7 +366,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
 		return -EOPNOTSUPP;
 	}
 
-	DPRINTK(2, "bssid = %pM\n", priv->reg.bssid);
+	netdev_dbg(dev, "bssid = %pM\n", priv->reg.bssid);
 
 	/* Write it to the card */
 	if (priv->need_commit) {
@@ -683,7 +679,7 @@ static int ks_wlan_get_rate(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "in_interrupt = %ld update_phyinfo = %d\n",
+	netdev_dbg(dev, "in_interrupt = %ld update_phyinfo = %d\n",
 		in_interrupt(), atomic_read(&update_phyinfo));
 
 	if (priv->sleep_mode == SLP_SLEEP)
@@ -785,7 +781,7 @@ static int ks_wlan_set_mode(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "mode=%d\n", *uwrq);
+	netdev_dbg(dev, "mode=%d\n", *uwrq);
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -848,7 +844,7 @@ static int ks_wlan_set_encode(struct net_device *dev,
 	int current_index = priv->reg.wep_index;
 	int i;
 
-	DPRINTK(2, "flags=%04X\n", dwrq->flags);
+	netdev_dbg(dev, "flags=%04X\n", dwrq->flags);
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -986,7 +982,7 @@ static int ks_wlan_get_encode(struct net_device *dev,
 		/* dwrq->flags |= IW_ENCODE_NOKEY; */
 	}
 	dwrq->flags |= index + 1;
-	DPRINTK(2, "encoding flag = 0x%04X\n", dwrq->flags);
+	netdev_dbg(dev, "encoding flag = 0x%04X\n", dwrq->flags);
 	/* Copy the key to the user buffer */
 	if ((index >= 0) && (index < 4))
 		dwrq->length = priv->reg.wep_key[index].size;
@@ -1058,8 +1054,6 @@ static int ks_wlan_get_range(struct net_device *dev,
 	struct iw_range *range = (struct iw_range *)extra;
 	int i, k;
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 
@@ -1300,8 +1294,6 @@ static int ks_wlan_set_scan(struct net_device *dev,
 	struct ks_wlan_private *priv = netdev_priv(dev);
 	struct iw_scan_req *req = NULL;
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 
@@ -1450,7 +1442,7 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev,
 			pbuf += sprintf(pbuf, "%02x", ap->rsn_ie.body[i]);
 		iwe.u.data.length += (ap->rsn_ie.size) * 2;
 
-		DPRINTK(4, "ap->rsn.size=%d\n", ap->rsn_ie.size);
+		netdev_dbg(dev, "ap->rsn.size=%d\n", ap->rsn_ie.size);
 
 		current_ev =
 		    iwe_stream_add_point(info, current_ev, end_buf, &iwe,
@@ -1472,8 +1464,8 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev,
 			pbuf += sprintf(pbuf, "%02x", ap->wpa_ie.body[i]);
 		iwe.u.data.length += (ap->wpa_ie.size) * 2;
 
-		DPRINTK(4, "ap->rsn.size=%d\n", ap->wpa_ie.size);
-		DPRINTK(4, "iwe.u.data.length=%d\n", iwe.u.data.length);
+		netdev_dbg(dev, "ap->rsn.size=%d\n", ap->wpa_ie.size);
+		netdev_dbg(dev, "iwe.u.data.length=%d\n", iwe.u.data.length);
 
 		current_ev =
 		    iwe_stream_add_point(info, current_ev, end_buf, &iwe,
@@ -1494,13 +1486,11 @@ static int ks_wlan_get_scan(struct net_device *dev,
 	int i;
 	char *current_ev = extra;
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 	/* for SLEEP MODE */
 	if (priv->sme_i.sme_flag & SME_AP_SCAN) {
-		DPRINTK(2, "flag AP_SCAN\n");
+		netdev_err(dev, "flag AP_SCAN\n");
 		return -EAGAIN;
 	}
 
@@ -1508,7 +1498,7 @@ static int ks_wlan_get_scan(struct net_device *dev,
 		/* Client error, no scan results...
 		 * The caller need to restart the scan.
 		 */
-		DPRINTK(2, "aplist 0\n");
+		netdev_err(dev, "aplist 0\n");
 		return -ENODATA;
 	}
 
@@ -1552,8 +1542,6 @@ static int ks_wlan_set_genie(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 	/* for SLEEP MODE */
@@ -1569,7 +1557,7 @@ static int ks_wlan_set_auth_mode(struct net_device *dev,
 	int index = (vwrq->flags & IW_AUTH_INDEX);
 	int value = vwrq->value;
 
-	DPRINTK(2, "index=%d:value=%08X\n", index, value);
+	netdev_dbg(dev, "index=%d:value=%08X\n", index, value);
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -1702,7 +1690,7 @@ static int ks_wlan_get_auth_mode(struct net_device *dev,
 	struct ks_wlan_private *priv = netdev_priv(dev);
 	int index = (vwrq->flags & IW_AUTH_INDEX);
 
-	DPRINTK(2, "index=%d\n", index);
+	netdev_dbg(dev, "index=%d\n", index);
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -1753,7 +1741,7 @@ static int ks_wlan_set_encode_ext(struct net_device *dev,
 	if (!enc)
 		return -EINVAL;
 
-	DPRINTK(2, "flags=%04X:: ext_flags=%08X\n", dwrq->flags,
+	netdev_dbg(dev, "flags=%04X:: ext_flags=%08X\n", dwrq->flags,
 		enc->ext_flags);
 
 	if (priv->sleep_mode == SLP_SLEEP)
@@ -1865,8 +1853,6 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
 	struct pmk_t *pmk;
 	struct list_head *ptr;
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 
@@ -1875,7 +1861,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
 		return -EINVAL;
 
 	pmksa = (struct iw_pmksa *)extra;
-	DPRINTK(2, "cmd=%d\n", pmksa->cmd);
+	netdev_dbg(dev, "cmd=%d\n", pmksa->cmd);
 
 	switch (pmksa->cmd) {
 	case IW_PMKSA_ADD:
@@ -1987,8 +1973,6 @@ static int ks_wlan_set_stop_request(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 
@@ -2009,7 +1993,7 @@ static int ks_wlan_set_mlme(struct net_device *dev,
 	struct iw_mlme *mlme = (struct iw_mlme *)extra;
 	__u32 mode;
 
-	DPRINTK(2, ":%d :%d\n", mlme->cmd, mlme->reason_code);
+	netdev_dbg(dev, ":%d :%d\n", mlme->cmd, mlme->reason_code);
 
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
@@ -2269,8 +2253,6 @@ static int ks_wlan_set_sleep_mode(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (*uwrq == SLP_SLEEP) {
 		priv->sleep_mode = *uwrq;
 		netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
@@ -2296,7 +2278,7 @@ static int ks_wlan_get_sleep_mode(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "GET_SLEEP_MODE %d\n", priv->sleep_mode);
+	netdev_dbg(dev, "GET_SLEEP_MODE %d\n", priv->sleep_mode);
 	*uwrq = priv->sleep_mode;
 
 	return 0;
@@ -2310,8 +2292,6 @@ static int ks_wlan_set_wps_enable(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 	/* for SLEEP MODE */
@@ -2331,8 +2311,6 @@ static int ks_wlan_get_wps_enable(struct net_device *dev,
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 	/* for SLEEP MODE */
@@ -2350,12 +2328,10 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
 	unsigned char len;
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(2, "\n");
-
 	if (priv->sleep_mode == SLP_SLEEP)
 		return -EPERM;
 	/* for SLEEP MODE */
-	DPRINTK(2, "dwrq->length=%d\n", dwrq->length);
+	netdev_dbg(dev, "dwrq->length=%d\n", dwrq->length);
 
 	/* length check */
 	if (p[1] + 2 != dwrq->length || dwrq->length > 256)
@@ -2367,7 +2343,7 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
 	memcpy(priv->wps.ie, &len, sizeof(len));
 	p = memcpy(priv->wps.ie + 1, p, len);
 
-	DPRINTK(2, "%d(%#x): %02X %02X %02X %02X ... %02X %02X %02X\n",
+	netdev_dbg(dev, "%d(%#x): %02X %02X %02X %02X ... %02X %02X %02X\n",
 		priv->wps.ielen, priv->wps.ielen, p[0], p[1], p[2], p[3],
 		p[priv->wps.ielen - 3], p[priv->wps.ielen - 2],
 		p[priv->wps.ielen - 1]);
@@ -2789,7 +2765,7 @@ static int ks_wlan_netdev_ioctl(struct net_device *dev, struct ifreq *rq,
 		ret = -EOPNOTSUPP;
 	}
 
-	DPRINTK(5, "return=%d\n", ret);
+	netdev_dbg(dev, "return=%d\n", ret);
 	return ret;
 }
 
@@ -2826,7 +2802,7 @@ void ks_wlan_tx_timeout(struct net_device *dev)
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(1, "head(%d) tail(%d)!!\n", priv->tx_dev.qhead,
+	netdev_dbg(dev, "head(%d) tail(%d)!!\n", priv->tx_dev.qhead,
 		priv->tx_dev.qtail);
 	if (!netif_queue_stopped(dev))
 		netif_stop_queue(dev);
@@ -2840,7 +2816,7 @@ int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	struct ks_wlan_private *priv = netdev_priv(dev);
 	int ret;
 
-	DPRINTK(3, "in_interrupt()=%ld\n", in_interrupt());
+	netdev_dbg(dev, "in_interrupt()=%ld\n", in_interrupt());
 
 	if (!skb) {
 		netdev_err(dev, "ks_wlan:  skb == NULL!!!\n");
@@ -2858,15 +2834,13 @@ int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	netif_trans_update(dev);
 
 	if (ret)
-		DPRINTK(4, "hostif_data_request error: =%d\n", ret);
+		netdev_err(dev, "hostif_data_request error: =%d\n", ret);
 
 	return 0;
 }
 
 void send_packet_complete(struct ks_wlan_private *priv, struct sk_buff *skb)
 {
-	DPRINTK(3, "\n");
-
 	priv->nstats.tx_packets++;
 
 	if (netif_queue_stopped(priv->net_dev))
@@ -2887,7 +2861,6 @@ void ks_wlan_set_multicast_list(struct net_device *dev)
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	DPRINTK(4, "\n");
 	if (priv->dev_state < DEVICE_STATE_READY)
 		return;	/* not finished initialize */
 	hostif_sme_enqueue(priv, SME_MULTICAST_REQUEST);
@@ -2914,7 +2887,7 @@ int ks_wlan_close(struct net_device *dev)
 {
 	netif_stop_queue(dev);
 
-	DPRINTK(4, "%s: Shutting down ethercard, status was 0x%4.4x.\n",
+	netdev_dbg(dev, "%s: Shutting down ethercard, status was 0x%4.4x.\n",
 		dev->name, 0x00);
 
 	return 0;
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: ks7010: replace DPRINTK traces in favour of preferred netdev_*
  2018-03-13  6:42 [PATCH] staging: ks7010: replace DPRINTK traces in favour of preferred netdev_* Sergio Paracuellos
@ 2018-03-13 10:04 ` Dan Carpenter
  2018-03-13 10:57   ` Sergio Paracuellos
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2018-03-13 10:04 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: gregkh, driverdev-devel, wsa

It takes a long time to review this, not because it's hard but because
I have to look at each line and think "Is this really a worthwhile line
to keep?" and a lot of them are marginal but perhaps not necessarily
bad?

You've deleted some obviously rubbish printks but I feel you could have
gone much further.  That would be an easy patch to review if it just
deleted printks.  Maybe say [PATCH 1/2] delete stuff.  [PATCH 2/2] Use
netdev_*.

On Tue, Mar 13, 2018 at 07:42:22AM +0100, Sergio Paracuellos wrote:
> @@ -767,20 +753,20 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
>  
>  static void ks7010_card_init(struct ks_wlan_private *priv)
>  {
> -	DPRINTK(5, "\ncard_init_task()\n");
> +	netdev_dbg(priv->net_dev, "\ncard_init_task()\n");
>  

This one is obviously useless.  We already have ftrace to tell use when
functions are called.  And also the \n at the start is wrong because
it messes up the dmesg log levels.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: ks7010: replace DPRINTK traces in favour of preferred netdev_*
  2018-03-13 10:04 ` Dan Carpenter
@ 2018-03-13 10:57   ` Sergio Paracuellos
  2018-03-13 11:24     ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Sergio Paracuellos @ 2018-03-13 10:57 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Greg KH, driverdev-devel, wsa

On Tue, Mar 13, 2018 at 11:04 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> It takes a long time to review this, not because it's hard but because
> I have to look at each line and think "Is this really a worthwhile line
> to keep?" and a lot of them are marginal but perhaps not necessarily
> bad?

I see. I though if they were there, it might be useful traces for
somebody in any kind of way :-).

>
> You've deleted some obviously rubbish printks but I feel you could have
> gone much further.  That would be an easy patch to review if it just
> deleted printks.  Maybe say [PATCH 1/2] delete stuff.  [PATCH 2/2] Use
> netdev_*.
>

I'll review these changes in the way you are saying and resend a new
patchset with this fixed.


> On Tue, Mar 13, 2018 at 07:42:22AM +0100, Sergio Paracuellos wrote:
>> @@ -767,20 +753,20 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
>>
>>  static void ks7010_card_init(struct ks_wlan_private *priv)
>>  {
>> -     DPRINTK(5, "\ncard_init_task()\n");
>> +     netdev_dbg(priv->net_dev, "\ncard_init_task()\n");
>>
>
> This one is obviously useless.  We already have ftrace to tell use when
> functions are called.  And also the \n at the start is wrong because
> it messes up the dmesg log levels.

Agreed. Thanks for pointing this out.

>
> regards,
> dan carpenter

Best regards,
    Sergio Paracuellos
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: ks7010: replace DPRINTK traces in favour of preferred netdev_*
  2018-03-13 10:57   ` Sergio Paracuellos
@ 2018-03-13 11:24     ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-03-13 11:24 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: Greg KH, driverdev-devel, wsa

On Tue, Mar 13, 2018 at 11:57:35AM +0100, Sergio Paracuellos wrote:
> On Tue, Mar 13, 2018 at 11:04 AM, Dan Carpenter
> <dan.carpenter@oracle.com> wrote:
> > It takes a long time to review this, not because it's hard but because
> > I have to look at each line and think "Is this really a worthwhile line
> > to keep?" and a lot of them are marginal but perhaps not necessarily
> > bad?
> 
> I see. I though if they were there, it might be useful traces for
> somebody in any kind of way :-).
> 

Yeah.  I know, right?  It feels like the original author must have
thought they were super useful and you and I probably don't even have
this hardware (I don't) so it feels wrong to delete too much stuff...

But it's probably the right thing.

I can bet that I will automatically approve of almost anything error
message deletion but it's hard for me to delete the stuff myself because
I am a hoarder by nature.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-13 11:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13  6:42 [PATCH] staging: ks7010: replace DPRINTK traces in favour of preferred netdev_* Sergio Paracuellos
2018-03-13 10:04 ` Dan Carpenter
2018-03-13 10:57   ` Sergio Paracuellos
2018-03-13 11:24     ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.