Search Linux Wireless

[PATCH 2/7] staging: wilc1000: wilc_msgqueue.c: removes debug print log

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

 



This patches removes unnecessary debug print logs.

Signed-off-by: Leo Kim <leo.kim@xxxxxxxxx>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 098390c..5c09cab 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -59,15 +59,11 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 	unsigned long flags;
 	Message *pstrMessage = NULL;
 
-	if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
-		PRINT_ER("pHandle or pvSendBuffer is null\n");
+	if (!pHandle || (u32SendBufferSize == 0) || !pvSendBuffer)
 		return -EFAULT;
-	}
 
-	if (pHandle->bExiting) {
-		PRINT_ER("pHandle fail\n");
+	if (pHandle->bExiting)
 		return -EFAULT;
-	}
 
 	/* construct a new message */
 	pstrMessage = kmalloc(sizeof(Message), GFP_ATOMIC);
@@ -117,16 +113,12 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 	Message *pstrMessage;
 	unsigned long flags;
 
-	if ((!pHandle) || (u32RecvBufferSize == 0)
-	    || (!pvRecvBuffer) || (!pu32ReceivedLength)) {
-		PRINT_ER("pHandle or pvRecvBuffer is null\n");
+	if (!pHandle || (u32RecvBufferSize == 0) || !pvRecvBuffer ||
+	    !pu32ReceivedLength)
 		return -EINVAL;
-	}
 
-	if (pHandle->bExiting) {
-		PRINT_ER("pHandle fail\n");
+	if (pHandle->bExiting)
 		return -EFAULT;
-	}
 
 	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
 	pHandle->u32ReceiversCount++;
@@ -134,24 +126,20 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 
 	down(&pHandle->hSem);
 
-	if (pHandle->bExiting) {
-		PRINT_ER("pHandle fail\n");
+	if (pHandle->bExiting)
 		return -EFAULT;
-	}
 
 	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
 
 	pstrMessage = pHandle->pstrMessageList;
 	if (!pstrMessage) {
 		spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
-		PRINT_ER("pstrMessage is null\n");
 		return -EFAULT;
 	}
 	/* check buffer size */
 	if (u32RecvBufferSize < pstrMessage->u32Length)	{
 		spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
 		up(&pHandle->hSem);
-		PRINT_ER("u32RecvBufferSize overflow\n");
 		return -EOVERFLOW;
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux