[PATCH v4 2/2] staging: ks7010: remove max_event_count field which is only being used in debug

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

 



This patch removes max_event_count field of sme_info structure which is a
write only variable just being used for debug purposes.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
---
 drivers/staging/ks7010/ks_hostif.c | 7 -------
 drivers/staging/ks7010/ks_wlan.h   | 4 ----
 2 files changed, 11 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 81391df..ce1ac11 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -2409,10 +2409,6 @@ void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)
 	if (cnt_smeqbody(priv) < (SME_EVENT_BUFF_SIZE - 1)) {
 		priv->sme_i.event_buff[priv->sme_i.qtail] = event;
 		inc_smeqtail(priv);
-#ifdef DEBUG
-		if (priv->sme_i.max_event_count < cnt_smeqbody(priv))
-			priv->sme_i.max_event_count = cnt_smeqbody(priv);
-#endif
 	} else {
 		/* in case of buffer overflow */
 		netdev_err(priv->net_dev, "sme queue buffer overflow\n");
@@ -2461,9 +2457,6 @@ int hostif_init(struct ks_wlan_private *priv)
 	priv->sme_i.sme_status = SME_IDLE;
 	priv->sme_i.qhead = 0;
 	priv->sme_i.qtail = 0;
-#ifdef DEBUG
-	priv->sme_i.max_event_count = 0;
-#endif
 	spin_lock_init(&priv->sme_i.sme_spin);
 	priv->sme_i.sme_flag = 0;
 
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 6bad88d2..aeabbe3 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -192,10 +192,6 @@ struct sme_info {
 	int event_buff[SME_EVENT_BUFF_SIZE];
 	unsigned int qhead;
 	unsigned int qtail;
-#ifdef DEBUG
-	/* for debug */
-	unsigned int max_event_count;
-#endif
 	spinlock_t sme_spin;
 	unsigned long sme_flag;
 };
-- 
2.7.4

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



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux