All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/27] staging: wilc1000: rename struct __Message_struct
@ 2016-01-21  1:20 Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 02/27] staging: wilc1000: rename pvBuffer in struct message Chaehyun Lim
                   ` (25 more replies)
  0 siblings, 26 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames typedef from struct __Message_struct and renames it
to struct message.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 10 +++++-----
 drivers/staging/wilc1000/wilc_msgqueue.h |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index abc780c..9b78fcd 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -38,7 +38,7 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
 	}
 
 	while (pHandle->pstrMessageList) {
-		Message *pstrMessge = pHandle->pstrMessageList->pstrNext;
+		struct message *pstrMessge = pHandle->pstrMessageList->pstrNext;
 
 		kfree(pHandle->pstrMessageList);
 		pHandle->pstrMessageList = pstrMessge;
@@ -57,7 +57,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 			     const void *pvSendBuffer, u32 u32SendBufferSize)
 {
 	unsigned long flags;
-	Message *pstrMessage = NULL;
+	struct message *pstrMessage = NULL;
 
 	if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
 		PRINT_ER("pHandle or pvSendBuffer is null\n");
@@ -70,7 +70,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 	}
 
 	/* construct a new message */
-	pstrMessage = kmalloc(sizeof(Message), GFP_ATOMIC);
+	pstrMessage = kmalloc(sizeof(struct message), GFP_ATOMIC);
 	if (!pstrMessage)
 		return -ENOMEM;
 
@@ -89,7 +89,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 	if (!pHandle->pstrMessageList) {
 		pHandle->pstrMessageList  = pstrMessage;
 	} else {
-		Message *pstrTailMsg = pHandle->pstrMessageList;
+		struct message *pstrTailMsg = pHandle->pstrMessageList;
 
 		while (pstrTailMsg->pstrNext)
 			pstrTailMsg = pstrTailMsg->pstrNext;
@@ -114,7 +114,7 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 			     void *pvRecvBuffer, u32 u32RecvBufferSize,
 			     u32 *pu32ReceivedLength)
 {
-	Message *pstrMessage;
+	struct message *pstrMessage;
 	unsigned long flags;
 
 	if ((!pHandle) || (u32RecvBufferSize == 0)
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index d7e0328..1a7c652 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -13,18 +13,18 @@
 #include <linux/semaphore.h>
 
 /* Message Queue type is a structure */
-typedef struct __Message_struct {
+struct message {
 	void *pvBuffer;
 	u32 u32Length;
-	struct __Message_struct *pstrNext;
-} Message;
+	struct message *pstrNext;
+};
 
 typedef struct __MessageQueue_struct {
 	struct semaphore hSem;
 	spinlock_t strCriticalSection;
 	bool bExiting;
 	u32 u32ReceiversCount;
-	Message *pstrMessageList;
+	struct message *pstrMessageList;
 } WILC_MsgQueueHandle;
 
 /*!
-- 
2.6.4


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

* [PATCH 02/27] staging: wilc1000: rename pvBuffer in struct message
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 03/27] staging: wilc1000: rename u32Length " Chaehyun Lim
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pvBuffer to buf to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 10 +++++-----
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 9b78fcd..a4e612d 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -76,9 +76,9 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 
 	pstrMessage->u32Length = u32SendBufferSize;
 	pstrMessage->pstrNext = NULL;
-	pstrMessage->pvBuffer = kmemdup(pvSendBuffer, u32SendBufferSize,
-					GFP_ATOMIC);
-	if (!pstrMessage->pvBuffer) {
+	pstrMessage->buf = kmemdup(pvSendBuffer, u32SendBufferSize,
+				   GFP_ATOMIC);
+	if (!pstrMessage->buf) {
 		kfree(pstrMessage);
 		return -ENOMEM;
 	}
@@ -151,12 +151,12 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 
 	/* consume the message */
 	pHandle->u32ReceiversCount--;
-	memcpy(pvRecvBuffer, pstrMessage->pvBuffer, pstrMessage->u32Length);
+	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->u32Length);
 	*pu32ReceivedLength = pstrMessage->u32Length;
 
 	pHandle->pstrMessageList = pstrMessage->pstrNext;
 
-	kfree(pstrMessage->pvBuffer);
+	kfree(pstrMessage->buf);
 	kfree(pstrMessage);
 
 	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 1a7c652..848ed82 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -14,7 +14,7 @@
 
 /* Message Queue type is a structure */
 struct message {
-	void *pvBuffer;
+	void *buf;
 	u32 u32Length;
 	struct message *pstrNext;
 };
-- 
2.6.4


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

* [PATCH 03/27] staging: wilc1000: rename u32Length in struct message
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 02/27] staging: wilc1000: rename pvBuffer in struct message Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 04/27] staging: wilc1000: rename pstrNext " Chaehyun Lim
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames u32Length to len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index a4e612d..0e66a64 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -74,7 +74,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 	if (!pstrMessage)
 		return -ENOMEM;
 
-	pstrMessage->u32Length = u32SendBufferSize;
+	pstrMessage->len = u32SendBufferSize;
 	pstrMessage->pstrNext = NULL;
 	pstrMessage->buf = kmemdup(pvSendBuffer, u32SendBufferSize,
 				   GFP_ATOMIC);
@@ -142,7 +142,7 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 		return -EFAULT;
 	}
 	/* check buffer size */
-	if (u32RecvBufferSize < pstrMessage->u32Length)	{
+	if (u32RecvBufferSize < pstrMessage->len) {
 		spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
 		up(&pHandle->hSem);
 		PRINT_ER("u32RecvBufferSize overflow\n");
@@ -151,8 +151,8 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 
 	/* consume the message */
 	pHandle->u32ReceiversCount--;
-	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->u32Length);
-	*pu32ReceivedLength = pstrMessage->u32Length;
+	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
+	*pu32ReceivedLength = pstrMessage->len;
 
 	pHandle->pstrMessageList = pstrMessage->pstrNext;
 
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 848ed82..b0ccd1d 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -15,7 +15,7 @@
 /* Message Queue type is a structure */
 struct message {
 	void *buf;
-	u32 u32Length;
+	u32 len;
 	struct message *pstrNext;
 };
 
-- 
2.6.4


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

* [PATCH 04/27] staging: wilc1000: rename pstrNext in struct message
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 02/27] staging: wilc1000: rename pvBuffer in struct message Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 03/27] staging: wilc1000: rename u32Length " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 05/27] staging: wilc1000: rename struct WILC_MsgQueueHandle Chaehyun Lim
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pstrNext to next to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 12 ++++++------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 0e66a64..4d79a31 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -38,7 +38,7 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
 	}
 
 	while (pHandle->pstrMessageList) {
-		struct message *pstrMessge = pHandle->pstrMessageList->pstrNext;
+		struct message *pstrMessge = pHandle->pstrMessageList->next;
 
 		kfree(pHandle->pstrMessageList);
 		pHandle->pstrMessageList = pstrMessge;
@@ -75,7 +75,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 		return -ENOMEM;
 
 	pstrMessage->len = u32SendBufferSize;
-	pstrMessage->pstrNext = NULL;
+	pstrMessage->next = NULL;
 	pstrMessage->buf = kmemdup(pvSendBuffer, u32SendBufferSize,
 				   GFP_ATOMIC);
 	if (!pstrMessage->buf) {
@@ -91,10 +91,10 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 	} else {
 		struct message *pstrTailMsg = pHandle->pstrMessageList;
 
-		while (pstrTailMsg->pstrNext)
-			pstrTailMsg = pstrTailMsg->pstrNext;
+		while (pstrTailMsg->next)
+			pstrTailMsg = pstrTailMsg->next;
 
-		pstrTailMsg->pstrNext = pstrMessage;
+		pstrTailMsg->next = pstrMessage;
 	}
 
 	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
@@ -154,7 +154,7 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
 	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
 	*pu32ReceivedLength = pstrMessage->len;
 
-	pHandle->pstrMessageList = pstrMessage->pstrNext;
+	pHandle->pstrMessageList = pstrMessage->next;
 
 	kfree(pstrMessage->buf);
 	kfree(pstrMessage);
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index b0ccd1d..ec503c3 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -16,7 +16,7 @@
 struct message {
 	void *buf;
 	u32 len;
-	struct message *pstrNext;
+	struct message *next;
 };
 
 typedef struct __MessageQueue_struct {
-- 
2.6.4


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

* [PATCH 05/27] staging: wilc1000: rename struct WILC_MsgQueueHandle
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (2 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 04/27] staging: wilc1000: rename pstrNext " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 06/27] staging: wilc1000: rename hSem in struct message_queue Chaehyun Lim
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch removes typedef from struct WILC_MsgQueueHandle and renames
it to struct message_queue.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c |  2 +-
 drivers/staging/wilc1000/wilc_msgqueue.c  | 14 +++++++-------
 drivers/staging/wilc1000/wilc_msgqueue.h  | 18 +++++++++---------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 5fac516..98627a6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -229,7 +229,7 @@ struct host_if_drv *terminated_handle;
 bool wilc_optaining_ip;
 static u8 P2P_LISTEN_STATE;
 static struct task_struct *hif_thread_handler;
-static WILC_MsgQueueHandle hif_msg_q;
+static struct message_queue hif_msg_q;
 static struct semaphore hif_sema_thread;
 static struct semaphore hif_sema_driver;
 static struct semaphore hif_sema_wait_response;
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 4d79a31..907bae1 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -11,7 +11,7 @@
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_create(WILC_MsgQueueHandle *pHandle)
+int wilc_mq_create(struct message_queue *pHandle)
 {
 	spin_lock_init(&pHandle->strCriticalSection);
 	sema_init(&pHandle->hSem, 0);
@@ -27,7 +27,7 @@ int wilc_mq_create(WILC_MsgQueueHandle *pHandle)
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
+int wilc_mq_destroy(struct message_queue *pHandle)
 {
 	pHandle->bExiting = true;
 
@@ -53,8 +53,8 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
-			     const void *pvSendBuffer, u32 u32SendBufferSize)
+int wilc_mq_send(struct message_queue *pHandle,
+		 const void *pvSendBuffer, u32 u32SendBufferSize)
 {
 	unsigned long flags;
 	struct message *pstrMessage = NULL;
@@ -110,9 +110,9 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
-			     void *pvRecvBuffer, u32 u32RecvBufferSize,
-			     u32 *pu32ReceivedLength)
+int wilc_mq_recv(struct message_queue *pHandle,
+		 void *pvRecvBuffer, u32 u32RecvBufferSize,
+		 u32 *pu32ReceivedLength)
 {
 	struct message *pstrMessage;
 	unsigned long flags;
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index ec503c3..111be46 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -19,13 +19,13 @@ struct message {
 	struct message *next;
 };
 
-typedef struct __MessageQueue_struct {
+struct message_queue {
 	struct semaphore hSem;
 	spinlock_t strCriticalSection;
 	bool bExiting;
 	u32 u32ReceiversCount;
 	struct message *pstrMessageList;
-} WILC_MsgQueueHandle;
+};
 
 /*!
  *  @brief		Creates a new Message queue
@@ -40,7 +40,7 @@ typedef struct __MessageQueue_struct {
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_create(WILC_MsgQueueHandle *pHandle);
+int wilc_mq_create(struct message_queue *pHandle);
 
 /*!
  *  @brief		Sends a message
@@ -57,8 +57,8 @@ int wilc_mq_create(WILC_MsgQueueHandle *pHandle);
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
-			     const void *pvSendBuffer, u32 u32SendBufferSize);
+int wilc_mq_send(struct message_queue *pHandle,
+		 const void *pvSendBuffer, u32 u32SendBufferSize);
 
 /*!
  *  @brief		Receives a message
@@ -76,9 +76,9 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
-			     void *pvRecvBuffer, u32 u32RecvBufferSize,
-			     u32 *pu32ReceivedLength);
+int wilc_mq_recv(struct message_queue *pHandle,
+		 void *pvRecvBuffer, u32 u32RecvBufferSize,
+		 u32 *pu32ReceivedLength);
 
 /*!
  *  @brief		Destroys an existing  Message queue
@@ -89,6 +89,6 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle);
+int wilc_mq_destroy(struct message_queue *pHandle);
 
 #endif
-- 
2.6.4


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

* [PATCH 06/27] staging: wilc1000: rename hSem in struct message_queue
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (3 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 05/27] staging: wilc1000: rename struct WILC_MsgQueueHandle Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 07/27] staging: wilc1000: rename strCriticalSection " Chaehyun Lim
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames hSem to sem to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 10 +++++-----
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 907bae1..b996c47 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -14,7 +14,7 @@
 int wilc_mq_create(struct message_queue *pHandle)
 {
 	spin_lock_init(&pHandle->strCriticalSection);
-	sema_init(&pHandle->hSem, 0);
+	sema_init(&pHandle->sem, 0);
 	pHandle->pstrMessageList = NULL;
 	pHandle->u32ReceiversCount = 0;
 	pHandle->bExiting = false;
@@ -33,7 +33,7 @@ int wilc_mq_destroy(struct message_queue *pHandle)
 
 	/* Release any waiting receiver thread. */
 	while (pHandle->u32ReceiversCount > 0) {
-		up(&pHandle->hSem);
+		up(&pHandle->sem);
 		pHandle->u32ReceiversCount--;
 	}
 
@@ -99,7 +99,7 @@ int wilc_mq_send(struct message_queue *pHandle,
 
 	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
 
-	up(&pHandle->hSem);
+	up(&pHandle->sem);
 
 	return 0;
 }
@@ -132,7 +132,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	pHandle->u32ReceiversCount++;
 	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
 
-	down(&pHandle->hSem);
+	down(&pHandle->sem);
 	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
 
 	pstrMessage = pHandle->pstrMessageList;
@@ -144,7 +144,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	/* check buffer size */
 	if (u32RecvBufferSize < pstrMessage->len) {
 		spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
-		up(&pHandle->hSem);
+		up(&pHandle->sem);
 		PRINT_ER("u32RecvBufferSize overflow\n");
 		return -EOVERFLOW;
 	}
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 111be46..3ea4068 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -20,7 +20,7 @@ struct message {
 };
 
 struct message_queue {
-	struct semaphore hSem;
+	struct semaphore sem;
 	spinlock_t strCriticalSection;
 	bool bExiting;
 	u32 u32ReceiversCount;
-- 
2.6.4


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

* [PATCH 07/27] staging: wilc1000: rename strCriticalSection in struct message_queue
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (4 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 06/27] staging: wilc1000: rename hSem in struct message_queue Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 08/27] staging: wilc1000: rename bExiting " Chaehyun Lim
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames strCriticalSection to lock to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 18 +++++++++---------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index b996c47..67bf147 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -13,7 +13,7 @@
  */
 int wilc_mq_create(struct message_queue *pHandle)
 {
-	spin_lock_init(&pHandle->strCriticalSection);
+	spin_lock_init(&pHandle->lock);
 	sema_init(&pHandle->sem, 0);
 	pHandle->pstrMessageList = NULL;
 	pHandle->u32ReceiversCount = 0;
@@ -83,7 +83,7 @@ int wilc_mq_send(struct message_queue *pHandle,
 		return -ENOMEM;
 	}
 
-	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
+	spin_lock_irqsave(&pHandle->lock, flags);
 
 	/* add it to the message queue */
 	if (!pHandle->pstrMessageList) {
@@ -97,7 +97,7 @@ int wilc_mq_send(struct message_queue *pHandle,
 		pstrTailMsg->next = pstrMessage;
 	}
 
-	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+	spin_unlock_irqrestore(&pHandle->lock, flags);
 
 	up(&pHandle->sem);
 
@@ -128,22 +128,22 @@ int wilc_mq_recv(struct message_queue *pHandle,
 		return -EFAULT;
 	}
 
-	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
+	spin_lock_irqsave(&pHandle->lock, flags);
 	pHandle->u32ReceiversCount++;
-	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+	spin_unlock_irqrestore(&pHandle->lock, flags);
 
 	down(&pHandle->sem);
-	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
+	spin_lock_irqsave(&pHandle->lock, flags);
 
 	pstrMessage = pHandle->pstrMessageList;
 	if (!pstrMessage) {
-		spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+		spin_unlock_irqrestore(&pHandle->lock, flags);
 		PRINT_ER("pstrMessage is null\n");
 		return -EFAULT;
 	}
 	/* check buffer size */
 	if (u32RecvBufferSize < pstrMessage->len) {
-		spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+		spin_unlock_irqrestore(&pHandle->lock, flags);
 		up(&pHandle->sem);
 		PRINT_ER("u32RecvBufferSize overflow\n");
 		return -EOVERFLOW;
@@ -159,7 +159,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	kfree(pstrMessage->buf);
 	kfree(pstrMessage);
 
-	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+	spin_unlock_irqrestore(&pHandle->lock, flags);
 
 	return 0;
 }
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 3ea4068..6cdebbf 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -21,7 +21,7 @@ struct message {
 
 struct message_queue {
 	struct semaphore sem;
-	spinlock_t strCriticalSection;
+	spinlock_t lock;
 	bool bExiting;
 	u32 u32ReceiversCount;
 	struct message *pstrMessageList;
-- 
2.6.4


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

* [PATCH 08/27] staging: wilc1000: rename bExiting in struct message_queue
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (5 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 07/27] staging: wilc1000: rename strCriticalSection " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 09/27] staging: wilc1000: rename u32ReceiversCount " Chaehyun Lim
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames bExiting to exiting to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 67bf147..47ba256 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -17,7 +17,7 @@ int wilc_mq_create(struct message_queue *pHandle)
 	sema_init(&pHandle->sem, 0);
 	pHandle->pstrMessageList = NULL;
 	pHandle->u32ReceiversCount = 0;
-	pHandle->bExiting = false;
+	pHandle->exiting = false;
 	return 0;
 }
 
@@ -29,7 +29,7 @@ int wilc_mq_create(struct message_queue *pHandle)
  */
 int wilc_mq_destroy(struct message_queue *pHandle)
 {
-	pHandle->bExiting = true;
+	pHandle->exiting = true;
 
 	/* Release any waiting receiver thread. */
 	while (pHandle->u32ReceiversCount > 0) {
@@ -64,7 +64,7 @@ int wilc_mq_send(struct message_queue *pHandle,
 		return -EFAULT;
 	}
 
-	if (pHandle->bExiting) {
+	if (pHandle->exiting) {
 		PRINT_ER("pHandle fail\n");
 		return -EFAULT;
 	}
@@ -123,7 +123,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 		return -EINVAL;
 	}
 
-	if (pHandle->bExiting) {
+	if (pHandle->exiting) {
 		PRINT_ER("pHandle fail\n");
 		return -EFAULT;
 	}
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 6cdebbf..2c21b3e 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -22,7 +22,7 @@ struct message {
 struct message_queue {
 	struct semaphore sem;
 	spinlock_t lock;
-	bool bExiting;
+	bool exiting;
 	u32 u32ReceiversCount;
 	struct message *pstrMessageList;
 };
-- 
2.6.4


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

* [PATCH 09/27] staging: wilc1000: rename u32ReceiversCount in struct message_queue
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (6 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 08/27] staging: wilc1000: rename bExiting " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 10/27] staging: wilc1000: rename pstrMessageList " Chaehyun Lim
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames u32ReceiversCount to recv_count to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 10 +++++-----
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 47ba256..363e003 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -16,7 +16,7 @@ int wilc_mq_create(struct message_queue *pHandle)
 	spin_lock_init(&pHandle->lock);
 	sema_init(&pHandle->sem, 0);
 	pHandle->pstrMessageList = NULL;
-	pHandle->u32ReceiversCount = 0;
+	pHandle->recv_count = 0;
 	pHandle->exiting = false;
 	return 0;
 }
@@ -32,9 +32,9 @@ int wilc_mq_destroy(struct message_queue *pHandle)
 	pHandle->exiting = true;
 
 	/* Release any waiting receiver thread. */
-	while (pHandle->u32ReceiversCount > 0) {
+	while (pHandle->recv_count > 0) {
 		up(&pHandle->sem);
-		pHandle->u32ReceiversCount--;
+		pHandle->recv_count--;
 	}
 
 	while (pHandle->pstrMessageList) {
@@ -129,7 +129,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	}
 
 	spin_lock_irqsave(&pHandle->lock, flags);
-	pHandle->u32ReceiversCount++;
+	pHandle->recv_count++;
 	spin_unlock_irqrestore(&pHandle->lock, flags);
 
 	down(&pHandle->sem);
@@ -150,7 +150,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	}
 
 	/* consume the message */
-	pHandle->u32ReceiversCount--;
+	pHandle->recv_count--;
 	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
 	*pu32ReceivedLength = pstrMessage->len;
 
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 2c21b3e..dcf54ea 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -23,7 +23,7 @@ struct message_queue {
 	struct semaphore sem;
 	spinlock_t lock;
 	bool exiting;
-	u32 u32ReceiversCount;
+	u32 recv_count;
 	struct message *pstrMessageList;
 };
 
-- 
2.6.4


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

* [PATCH 10/27] staging: wilc1000: rename pstrMessageList in struct message_queue
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (7 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 09/27] staging: wilc1000: rename u32ReceiversCount " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 11/27] staging: wilc1000: rename pHandle in wilc_mq_create Chaehyun Lim
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pstrMessageList to msg_list to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 20 ++++++++++----------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 363e003..d13c9a7 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -15,7 +15,7 @@ int wilc_mq_create(struct message_queue *pHandle)
 {
 	spin_lock_init(&pHandle->lock);
 	sema_init(&pHandle->sem, 0);
-	pHandle->pstrMessageList = NULL;
+	pHandle->msg_list = NULL;
 	pHandle->recv_count = 0;
 	pHandle->exiting = false;
 	return 0;
@@ -37,11 +37,11 @@ int wilc_mq_destroy(struct message_queue *pHandle)
 		pHandle->recv_count--;
 	}
 
-	while (pHandle->pstrMessageList) {
-		struct message *pstrMessge = pHandle->pstrMessageList->next;
+	while (pHandle->msg_list) {
+		struct message *pstrMessge = pHandle->msg_list->next;
 
-		kfree(pHandle->pstrMessageList);
-		pHandle->pstrMessageList = pstrMessge;
+		kfree(pHandle->msg_list);
+		pHandle->msg_list = pstrMessge;
 	}
 
 	return 0;
@@ -86,10 +86,10 @@ int wilc_mq_send(struct message_queue *pHandle,
 	spin_lock_irqsave(&pHandle->lock, flags);
 
 	/* add it to the message queue */
-	if (!pHandle->pstrMessageList) {
-		pHandle->pstrMessageList  = pstrMessage;
+	if (!pHandle->msg_list) {
+		pHandle->msg_list  = pstrMessage;
 	} else {
-		struct message *pstrTailMsg = pHandle->pstrMessageList;
+		struct message *pstrTailMsg = pHandle->msg_list;
 
 		while (pstrTailMsg->next)
 			pstrTailMsg = pstrTailMsg->next;
@@ -135,7 +135,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	down(&pHandle->sem);
 	spin_lock_irqsave(&pHandle->lock, flags);
 
-	pstrMessage = pHandle->pstrMessageList;
+	pstrMessage = pHandle->msg_list;
 	if (!pstrMessage) {
 		spin_unlock_irqrestore(&pHandle->lock, flags);
 		PRINT_ER("pstrMessage is null\n");
@@ -154,7 +154,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
 	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
 	*pu32ReceivedLength = pstrMessage->len;
 
-	pHandle->pstrMessageList = pstrMessage->next;
+	pHandle->msg_list = pstrMessage->next;
 
 	kfree(pstrMessage->buf);
 	kfree(pstrMessage);
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index dcf54ea..7e7ec06 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -24,7 +24,7 @@ struct message_queue {
 	spinlock_t lock;
 	bool exiting;
 	u32 recv_count;
-	struct message *pstrMessageList;
+	struct message *msg_list;
 };
 
 /*!
-- 
2.6.4


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

* [PATCH 11/27] staging: wilc1000: rename pHandle in wilc_mq_create
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (8 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 10/27] staging: wilc1000: rename pstrMessageList " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 12/27] staging: wilc1000: rename pHandle in wilc_mq_destroy Chaehyun Lim
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pHandle to mq to avoid camelcase

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 12 ++++++------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index d13c9a7..453fa19 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -11,13 +11,13 @@
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_create(struct message_queue *pHandle)
+int wilc_mq_create(struct message_queue *mq)
 {
-	spin_lock_init(&pHandle->lock);
-	sema_init(&pHandle->sem, 0);
-	pHandle->msg_list = NULL;
-	pHandle->recv_count = 0;
-	pHandle->exiting = false;
+	spin_lock_init(&mq->lock);
+	sema_init(&mq->sem, 0);
+	mq->msg_list = NULL;
+	mq->recv_count = 0;
+	mq->exiting = false;
 	return 0;
 }
 
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 7e7ec06..bfd2347 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -40,7 +40,7 @@ struct message_queue {
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_create(struct message_queue *pHandle);
+int wilc_mq_create(struct message_queue *mq);
 
 /*!
  *  @brief		Sends a message
-- 
2.6.4


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

* [PATCH 12/27] staging: wilc1000: rename pHandle in wilc_mq_destroy
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (9 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 11/27] staging: wilc1000: rename pHandle in wilc_mq_create Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 13/27] staging: wilc1000: rename pstrMessge " Chaehyun Lim
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pHandle to mq to avoid camelcase

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 18 +++++++++---------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 453fa19..103fcfd 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -27,21 +27,21 @@ int wilc_mq_create(struct message_queue *mq)
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_destroy(struct message_queue *pHandle)
+int wilc_mq_destroy(struct message_queue *mq)
 {
-	pHandle->exiting = true;
+	mq->exiting = true;
 
 	/* Release any waiting receiver thread. */
-	while (pHandle->recv_count > 0) {
-		up(&pHandle->sem);
-		pHandle->recv_count--;
+	while (mq->recv_count > 0) {
+		up(&mq->sem);
+		mq->recv_count--;
 	}
 
-	while (pHandle->msg_list) {
-		struct message *pstrMessge = pHandle->msg_list->next;
+	while (mq->msg_list) {
+		struct message *pstrMessge = mq->msg_list->next;
 
-		kfree(pHandle->msg_list);
-		pHandle->msg_list = pstrMessge;
+		kfree(mq->msg_list);
+		mq->msg_list = pstrMessge;
 	}
 
 	return 0;
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index bfd2347..b91822e 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -89,6 +89,6 @@ int wilc_mq_recv(struct message_queue *pHandle,
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_destroy(struct message_queue *pHandle);
+int wilc_mq_destroy(struct message_queue *mq);
 
 #endif
-- 
2.6.4


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

* [PATCH 13/27] staging: wilc1000: rename pstrMessge in wilc_mq_destroy
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (10 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 12/27] staging: wilc1000: rename pHandle in wilc_mq_destroy Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 14/27] staging: wilc1000: rename pHandle in wilc_mq_send Chaehyun Lim
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pstrMessge to msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 103fcfd..a01420a 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -38,10 +38,10 @@ int wilc_mq_destroy(struct message_queue *mq)
 	}
 
 	while (mq->msg_list) {
-		struct message *pstrMessge = mq->msg_list->next;
+		struct message *msg = mq->msg_list->next;
 
 		kfree(mq->msg_list);
-		mq->msg_list = pstrMessge;
+		mq->msg_list = msg;
 	}
 
 	return 0;
-- 
2.6.4


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

* [PATCH 14/27] staging: wilc1000: rename pHandle in wilc_mq_send
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (11 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 13/27] staging: wilc1000: rename pstrMessge " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 15/27] staging: wilc1000: rename pvSendBuffer " Chaehyun Lim
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pHandle to mq to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 22 +++++++++++-----------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index a01420a..71ce1f5 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -53,19 +53,19 @@ int wilc_mq_destroy(struct message_queue *mq)
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_send(struct message_queue *pHandle,
+int wilc_mq_send(struct message_queue *mq,
 		 const void *pvSendBuffer, u32 u32SendBufferSize)
 {
 	unsigned long flags;
 	struct message *pstrMessage = NULL;
 
-	if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
-		PRINT_ER("pHandle or pvSendBuffer is null\n");
+	if ((!mq) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
+		PRINT_ER("mq or pvSendBuffer is null\n");
 		return -EFAULT;
 	}
 
-	if (pHandle->exiting) {
-		PRINT_ER("pHandle fail\n");
+	if (mq->exiting) {
+		PRINT_ER("mq fail\n");
 		return -EFAULT;
 	}
 
@@ -83,13 +83,13 @@ int wilc_mq_send(struct message_queue *pHandle,
 		return -ENOMEM;
 	}
 
-	spin_lock_irqsave(&pHandle->lock, flags);
+	spin_lock_irqsave(&mq->lock, flags);
 
 	/* add it to the message queue */
-	if (!pHandle->msg_list) {
-		pHandle->msg_list  = pstrMessage;
+	if (!mq->msg_list) {
+		mq->msg_list  = pstrMessage;
 	} else {
-		struct message *pstrTailMsg = pHandle->msg_list;
+		struct message *pstrTailMsg = mq->msg_list;
 
 		while (pstrTailMsg->next)
 			pstrTailMsg = pstrTailMsg->next;
@@ -97,9 +97,9 @@ int wilc_mq_send(struct message_queue *pHandle,
 		pstrTailMsg->next = pstrMessage;
 	}
 
-	spin_unlock_irqrestore(&pHandle->lock, flags);
+	spin_unlock_irqrestore(&mq->lock, flags);
 
-	up(&pHandle->sem);
+	up(&mq->sem);
 
 	return 0;
 }
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index b91822e..e6cdc10 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -57,7 +57,7 @@ int wilc_mq_create(struct message_queue *mq);
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_send(struct message_queue *pHandle,
+int wilc_mq_send(struct message_queue *mq,
 		 const void *pvSendBuffer, u32 u32SendBufferSize);
 
 /*!
-- 
2.6.4


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

* [PATCH 15/27] staging: wilc1000: rename pvSendBuffer in wilc_mq_send
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (12 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 14/27] staging: wilc1000: rename pHandle in wilc_mq_send Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 16/27] staging: wilc1000: rename u32SendBufferSize " Chaehyun Lim
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pvSendBuffer to send_buf to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 71ce1f5..5feb87c 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -54,13 +54,13 @@ int wilc_mq_destroy(struct message_queue *mq)
  *  @version		1.0
  */
 int wilc_mq_send(struct message_queue *mq,
-		 const void *pvSendBuffer, u32 u32SendBufferSize)
+		 const void *send_buf, u32 u32SendBufferSize)
 {
 	unsigned long flags;
 	struct message *pstrMessage = NULL;
 
-	if ((!mq) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
-		PRINT_ER("mq or pvSendBuffer is null\n");
+	if ((!mq) || (u32SendBufferSize == 0) || (!send_buf)) {
+		PRINT_ER("mq or send_buf is null\n");
 		return -EFAULT;
 	}
 
@@ -76,7 +76,7 @@ int wilc_mq_send(struct message_queue *mq,
 
 	pstrMessage->len = u32SendBufferSize;
 	pstrMessage->next = NULL;
-	pstrMessage->buf = kmemdup(pvSendBuffer, u32SendBufferSize,
+	pstrMessage->buf = kmemdup(send_buf, u32SendBufferSize,
 				   GFP_ATOMIC);
 	if (!pstrMessage->buf) {
 		kfree(pstrMessage);
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index e6cdc10..3adee90 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -58,7 +58,7 @@ int wilc_mq_create(struct message_queue *mq);
  *  @version		1.0
  */
 int wilc_mq_send(struct message_queue *mq,
-		 const void *pvSendBuffer, u32 u32SendBufferSize);
+		 const void *send_buf, u32 u32SendBufferSize);
 
 /*!
  *  @brief		Receives a message
-- 
2.6.4


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

* [PATCH 16/27] staging: wilc1000: rename u32SendBufferSize in wilc_mq_send
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (13 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 15/27] staging: wilc1000: rename pvSendBuffer " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 17/27] staging: wilc1000: rename pstrMessage " Chaehyun Lim
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames u32SendBufferSize to send_buf_size to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 5feb87c..8e37cff0 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -54,12 +54,12 @@ int wilc_mq_destroy(struct message_queue *mq)
  *  @version		1.0
  */
 int wilc_mq_send(struct message_queue *mq,
-		 const void *send_buf, u32 u32SendBufferSize)
+		 const void *send_buf, u32 send_buf_size)
 {
 	unsigned long flags;
 	struct message *pstrMessage = NULL;
 
-	if ((!mq) || (u32SendBufferSize == 0) || (!send_buf)) {
+	if ((!mq) || (send_buf_size == 0) || (!send_buf)) {
 		PRINT_ER("mq or send_buf is null\n");
 		return -EFAULT;
 	}
@@ -74,9 +74,9 @@ int wilc_mq_send(struct message_queue *mq,
 	if (!pstrMessage)
 		return -ENOMEM;
 
-	pstrMessage->len = u32SendBufferSize;
+	pstrMessage->len = send_buf_size;
 	pstrMessage->next = NULL;
-	pstrMessage->buf = kmemdup(send_buf, u32SendBufferSize,
+	pstrMessage->buf = kmemdup(send_buf, send_buf_size,
 				   GFP_ATOMIC);
 	if (!pstrMessage->buf) {
 		kfree(pstrMessage);
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 3adee90..70e1be1 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -58,7 +58,7 @@ int wilc_mq_create(struct message_queue *mq);
  *  @version		1.0
  */
 int wilc_mq_send(struct message_queue *mq,
-		 const void *send_buf, u32 u32SendBufferSize);
+		 const void *send_buf, u32 send_buf_size);
 
 /*!
  *  @brief		Receives a message
-- 
2.6.4


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

* [PATCH 17/27] staging: wilc1000: rename pstrMessage in wilc_mq_send
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (14 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 16/27] staging: wilc1000: rename u32SendBufferSize " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 18/27] staging: wilc1000: rename tail_msg " Chaehyun Lim
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pstrMessage to new_msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 8e37cff0..9a80fe6 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -57,7 +57,7 @@ int wilc_mq_send(struct message_queue *mq,
 		 const void *send_buf, u32 send_buf_size)
 {
 	unsigned long flags;
-	struct message *pstrMessage = NULL;
+	struct message *new_msg = NULL;
 
 	if ((!mq) || (send_buf_size == 0) || (!send_buf)) {
 		PRINT_ER("mq or send_buf is null\n");
@@ -70,16 +70,15 @@ int wilc_mq_send(struct message_queue *mq,
 	}
 
 	/* construct a new message */
-	pstrMessage = kmalloc(sizeof(struct message), GFP_ATOMIC);
-	if (!pstrMessage)
+	new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
+	if (!new_msg)
 		return -ENOMEM;
 
-	pstrMessage->len = send_buf_size;
-	pstrMessage->next = NULL;
-	pstrMessage->buf = kmemdup(send_buf, send_buf_size,
-				   GFP_ATOMIC);
-	if (!pstrMessage->buf) {
-		kfree(pstrMessage);
+	new_msg->len = send_buf_size;
+	new_msg->next = NULL;
+	new_msg->buf = kmemdup(send_buf, send_buf_size, GFP_ATOMIC);
+	if (!new_msg->buf) {
+		kfree(new_msg);
 		return -ENOMEM;
 	}
 
@@ -87,14 +86,14 @@ int wilc_mq_send(struct message_queue *mq,
 
 	/* add it to the message queue */
 	if (!mq->msg_list) {
-		mq->msg_list  = pstrMessage;
+		mq->msg_list  = new_msg;
 	} else {
 		struct message *pstrTailMsg = mq->msg_list;
 
 		while (pstrTailMsg->next)
 			pstrTailMsg = pstrTailMsg->next;
 
-		pstrTailMsg->next = pstrMessage;
+		pstrTailMsg->next = new_msg;
 	}
 
 	spin_unlock_irqrestore(&mq->lock, flags);
-- 
2.6.4


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

* [PATCH 18/27] staging: wilc1000: rename tail_msg in wilc_mq_send
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (15 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 17/27] staging: wilc1000: rename pstrMessage " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 19/27] staging: wilc1000: fix return error code Chaehyun Lim
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pstrTailMsg to tail_msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 9a80fe6..764723f 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -88,12 +88,12 @@ int wilc_mq_send(struct message_queue *mq,
 	if (!mq->msg_list) {
 		mq->msg_list  = new_msg;
 	} else {
-		struct message *pstrTailMsg = mq->msg_list;
+		struct message *tail_msg = mq->msg_list;
 
-		while (pstrTailMsg->next)
-			pstrTailMsg = pstrTailMsg->next;
+		while (tail_msg->next)
+			tail_msg = tail_msg->next;
 
-		pstrTailMsg->next = new_msg;
+		tail_msg->next = new_msg;
 	}
 
 	spin_unlock_irqrestore(&mq->lock, flags);
-- 
2.6.4


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

* [PATCH 19/27] staging: wilc1000: fix return error code
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (16 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 18/27] staging: wilc1000: rename tail_msg " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 20/27] staging: wilc1000: rename pHandle in wilc_mq_recv Chaehyun Lim
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

Three argument are checked at the beginning of wilc_mq_send whether
they are valid arguments or not. It is correct to use return error code
as -EINVAL, not -EFAULT.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 764723f..361ca8f 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -61,7 +61,7 @@ int wilc_mq_send(struct message_queue *mq,
 
 	if ((!mq) || (send_buf_size == 0) || (!send_buf)) {
 		PRINT_ER("mq or send_buf is null\n");
-		return -EFAULT;
+		return -EINVAL;
 	}
 
 	if (mq->exiting) {
-- 
2.6.4


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

* [PATCH 20/27] staging: wilc1000: rename pHandle in wilc_mq_recv
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (17 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 19/27] staging: wilc1000: fix return error code Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 21/27] staging: wilc1000: rename pvRecvBuffer " Chaehyun Lim
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pHandle to mq to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 34 ++++++++++++++++----------------
 drivers/staging/wilc1000/wilc_msgqueue.h |  2 +-
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 361ca8f..d2df179 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -109,56 +109,56 @@ int wilc_mq_send(struct message_queue *mq,
  *  @note		copied from FLO glue implementatuion
  *  @version		1.0
  */
-int wilc_mq_recv(struct message_queue *pHandle,
+int wilc_mq_recv(struct message_queue *mq,
 		 void *pvRecvBuffer, u32 u32RecvBufferSize,
 		 u32 *pu32ReceivedLength)
 {
 	struct message *pstrMessage;
 	unsigned long flags;
 
-	if ((!pHandle) || (u32RecvBufferSize == 0)
+	if ((!mq) || (u32RecvBufferSize == 0)
 	    || (!pvRecvBuffer) || (!pu32ReceivedLength)) {
-		PRINT_ER("pHandle or pvRecvBuffer is null\n");
+		PRINT_ER("mq or pvRecvBuffer is null\n");
 		return -EINVAL;
 	}
 
-	if (pHandle->exiting) {
-		PRINT_ER("pHandle fail\n");
+	if (mq->exiting) {
+		PRINT_ER("mq fail\n");
 		return -EFAULT;
 	}
 
-	spin_lock_irqsave(&pHandle->lock, flags);
-	pHandle->recv_count++;
-	spin_unlock_irqrestore(&pHandle->lock, flags);
+	spin_lock_irqsave(&mq->lock, flags);
+	mq->recv_count++;
+	spin_unlock_irqrestore(&mq->lock, flags);
 
-	down(&pHandle->sem);
-	spin_lock_irqsave(&pHandle->lock, flags);
+	down(&mq->sem);
+	spin_lock_irqsave(&mq->lock, flags);
 
-	pstrMessage = pHandle->msg_list;
+	pstrMessage = mq->msg_list;
 	if (!pstrMessage) {
-		spin_unlock_irqrestore(&pHandle->lock, flags);
+		spin_unlock_irqrestore(&mq->lock, flags);
 		PRINT_ER("pstrMessage is null\n");
 		return -EFAULT;
 	}
 	/* check buffer size */
 	if (u32RecvBufferSize < pstrMessage->len) {
-		spin_unlock_irqrestore(&pHandle->lock, flags);
-		up(&pHandle->sem);
+		spin_unlock_irqrestore(&mq->lock, flags);
+		up(&mq->sem);
 		PRINT_ER("u32RecvBufferSize overflow\n");
 		return -EOVERFLOW;
 	}
 
 	/* consume the message */
-	pHandle->recv_count--;
+	mq->recv_count--;
 	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
 	*pu32ReceivedLength = pstrMessage->len;
 
-	pHandle->msg_list = pstrMessage->next;
+	mq->msg_list = pstrMessage->next;
 
 	kfree(pstrMessage->buf);
 	kfree(pstrMessage);
 
-	spin_unlock_irqrestore(&pHandle->lock, flags);
+	spin_unlock_irqrestore(&mq->lock, flags);
 
 	return 0;
 }
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 70e1be1..0c1eead 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -76,7 +76,7 @@ int wilc_mq_send(struct message_queue *mq,
  *  @date		30 Aug 2010
  *  @version		1.0
  */
-int wilc_mq_recv(struct message_queue *pHandle,
+int wilc_mq_recv(struct message_queue *mq,
 		 void *pvRecvBuffer, u32 u32RecvBufferSize,
 		 u32 *pu32ReceivedLength);
 
-- 
2.6.4


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

* [PATCH 21/27] staging: wilc1000: rename pvRecvBuffer in wilc_mq_recv
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (18 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 20/27] staging: wilc1000: rename pHandle in wilc_mq_recv Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 22/27] staging: wilc1000: rename u32RecvBufferSize " Chaehyun Lim
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pvRecvBuffer to recv_buf to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index d2df179..b836b2e 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -110,15 +110,15 @@ int wilc_mq_send(struct message_queue *mq,
  *  @version		1.0
  */
 int wilc_mq_recv(struct message_queue *mq,
-		 void *pvRecvBuffer, u32 u32RecvBufferSize,
+		 void *recv_buf, u32 u32RecvBufferSize,
 		 u32 *pu32ReceivedLength)
 {
 	struct message *pstrMessage;
 	unsigned long flags;
 
 	if ((!mq) || (u32RecvBufferSize == 0)
-	    || (!pvRecvBuffer) || (!pu32ReceivedLength)) {
-		PRINT_ER("mq or pvRecvBuffer is null\n");
+	    || (!recv_buf) || (!pu32ReceivedLength)) {
+		PRINT_ER("mq or recv_buf is null\n");
 		return -EINVAL;
 	}
 
@@ -150,7 +150,7 @@ int wilc_mq_recv(struct message_queue *mq,
 
 	/* consume the message */
 	mq->recv_count--;
-	memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
+	memcpy(recv_buf, pstrMessage->buf, pstrMessage->len);
 	*pu32ReceivedLength = pstrMessage->len;
 
 	mq->msg_list = pstrMessage->next;
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 0c1eead..81b51dd 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -77,7 +77,7 @@ int wilc_mq_send(struct message_queue *mq,
  *  @version		1.0
  */
 int wilc_mq_recv(struct message_queue *mq,
-		 void *pvRecvBuffer, u32 u32RecvBufferSize,
+		 void *recv_buf, u32 u32RecvBufferSize,
 		 u32 *pu32ReceivedLength);
 
 /*!
-- 
2.6.4


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

* [PATCH 22/27] staging: wilc1000: rename u32RecvBufferSize in wilc_mq_recv
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (19 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 21/27] staging: wilc1000: rename pvRecvBuffer " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 23/27] staging: wilc1000: rename pu32ReceivedLength " Chaehyun Lim
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames u32RecvBufferSize to recv_buf_size to avoid
camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 8 ++++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index b836b2e..c86bd7c 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -110,13 +110,13 @@ int wilc_mq_send(struct message_queue *mq,
  *  @version		1.0
  */
 int wilc_mq_recv(struct message_queue *mq,
-		 void *recv_buf, u32 u32RecvBufferSize,
+		 void *recv_buf, u32 recv_buf_size,
 		 u32 *pu32ReceivedLength)
 {
 	struct message *pstrMessage;
 	unsigned long flags;
 
-	if ((!mq) || (u32RecvBufferSize == 0)
+	if ((!mq) || (recv_buf_size == 0)
 	    || (!recv_buf) || (!pu32ReceivedLength)) {
 		PRINT_ER("mq or recv_buf is null\n");
 		return -EINVAL;
@@ -141,10 +141,10 @@ int wilc_mq_recv(struct message_queue *mq,
 		return -EFAULT;
 	}
 	/* check buffer size */
-	if (u32RecvBufferSize < pstrMessage->len) {
+	if (recv_buf_size < pstrMessage->len) {
 		spin_unlock_irqrestore(&mq->lock, flags);
 		up(&mq->sem);
-		PRINT_ER("u32RecvBufferSize overflow\n");
+		PRINT_ER("recv_buf_size overflow\n");
 		return -EOVERFLOW;
 	}
 
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 81b51dd..3804b3b 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -77,7 +77,7 @@ int wilc_mq_send(struct message_queue *mq,
  *  @version		1.0
  */
 int wilc_mq_recv(struct message_queue *mq,
-		 void *recv_buf, u32 u32RecvBufferSize,
+		 void *recv_buf, u32 recv_buf_size,
 		 u32 *pu32ReceivedLength);
 
 /*!
-- 
2.6.4


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

* [PATCH 23/27] staging: wilc1000: rename pu32ReceivedLength in wilc_mq_recv
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (20 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 22/27] staging: wilc1000: rename u32RecvBufferSize " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 24/27] staging: wilc1000: rename pstrMessage " Chaehyun Lim
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pu32ReceivedLength to recv_len to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 7 +++----
 drivers/staging/wilc1000/wilc_msgqueue.h | 3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index c86bd7c..5601de8 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -110,14 +110,13 @@ int wilc_mq_send(struct message_queue *mq,
  *  @version		1.0
  */
 int wilc_mq_recv(struct message_queue *mq,
-		 void *recv_buf, u32 recv_buf_size,
-		 u32 *pu32ReceivedLength)
+		 void *recv_buf, u32 recv_buf_size, u32 *recv_len)
 {
 	struct message *pstrMessage;
 	unsigned long flags;
 
 	if ((!mq) || (recv_buf_size == 0)
-	    || (!recv_buf) || (!pu32ReceivedLength)) {
+	    || (!recv_buf) || (!recv_len)) {
 		PRINT_ER("mq or recv_buf is null\n");
 		return -EINVAL;
 	}
@@ -151,7 +150,7 @@ int wilc_mq_recv(struct message_queue *mq,
 	/* consume the message */
 	mq->recv_count--;
 	memcpy(recv_buf, pstrMessage->buf, pstrMessage->len);
-	*pu32ReceivedLength = pstrMessage->len;
+	*recv_len = pstrMessage->len;
 
 	mq->msg_list = pstrMessage->next;
 
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 3804b3b..4f79ead 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -77,8 +77,7 @@ int wilc_mq_send(struct message_queue *mq,
  *  @version		1.0
  */
 int wilc_mq_recv(struct message_queue *mq,
-		 void *recv_buf, u32 recv_buf_size,
-		 u32 *pu32ReceivedLength);
+		 void *recv_buf, u32 recv_buf_size, u32 *recv_len);
 
 /*!
  *  @brief		Destroys an existing  Message queue
-- 
2.6.4


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

* [PATCH 24/27] staging: wilc1000: rename pstrMessage in wilc_mq_recv
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (21 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 23/27] staging: wilc1000: rename pu32ReceivedLength " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage Chaehyun Lim
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch renames pstrMessage to msg to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 5601de8..7107715 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -112,7 +112,7 @@ int wilc_mq_send(struct message_queue *mq,
 int wilc_mq_recv(struct message_queue *mq,
 		 void *recv_buf, u32 recv_buf_size, u32 *recv_len)
 {
-	struct message *pstrMessage;
+	struct message *msg;
 	unsigned long flags;
 
 	if ((!mq) || (recv_buf_size == 0)
@@ -133,14 +133,14 @@ int wilc_mq_recv(struct message_queue *mq,
 	down(&mq->sem);
 	spin_lock_irqsave(&mq->lock, flags);
 
-	pstrMessage = mq->msg_list;
-	if (!pstrMessage) {
+	msg = mq->msg_list;
+	if (!msg) {
 		spin_unlock_irqrestore(&mq->lock, flags);
-		PRINT_ER("pstrMessage is null\n");
+		PRINT_ER("msg is null\n");
 		return -EFAULT;
 	}
 	/* check buffer size */
-	if (recv_buf_size < pstrMessage->len) {
+	if (recv_buf_size < msg->len) {
 		spin_unlock_irqrestore(&mq->lock, flags);
 		up(&mq->sem);
 		PRINT_ER("recv_buf_size overflow\n");
@@ -149,13 +149,13 @@ int wilc_mq_recv(struct message_queue *mq,
 
 	/* consume the message */
 	mq->recv_count--;
-	memcpy(recv_buf, pstrMessage->buf, pstrMessage->len);
-	*recv_len = pstrMessage->len;
+	memcpy(recv_buf, msg->buf, msg->len);
+	*recv_len = msg->len;
 
-	mq->msg_list = pstrMessage->next;
+	mq->msg_list = msg->next;
 
-	kfree(pstrMessage->buf);
-	kfree(pstrMessage);
+	kfree(msg->buf);
+	kfree(msg);
 
 	spin_unlock_irqrestore(&mq->lock, flags);
 
-- 
2.6.4


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

* [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (22 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 24/27] staging: wilc1000: rename pstrMessage " Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  8:18   ` Sudip Mukherjee
  2016-01-21  1:20 ` [PATCH 26/27] staging: wilc1000: fix logical continuations Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 27/27] staging: wilc1000: remove over-commenting Chaehyun Lim
  25 siblings, 1 reply; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch fixes coding style of kmalloc usage found by checkpatch.
CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 7107715..c7a60f4 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq,
 	}
 
 	/* construct a new message */
-	new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
+	new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC);
 	if (!new_msg)
 		return -ENOMEM;
 
-- 
2.6.4


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

* [PATCH 26/27] staging: wilc1000: fix logical continuations
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (23 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  2016-01-21  1:20 ` [PATCH 27/27] staging: wilc1000: remove over-commenting Chaehyun Lim
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch fixes logical continuations found by checkpatch
CHECK: Logical continuations should be on the previous line

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index c7a60f4..4493ca9 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -115,8 +115,7 @@ int wilc_mq_recv(struct message_queue *mq,
 	struct message *msg;
 	unsigned long flags;
 
-	if ((!mq) || (recv_buf_size == 0)
-	    || (!recv_buf) || (!recv_len)) {
+	if ((!mq) || (recv_buf_size == 0) || (!recv_buf) || (!recv_len)) {
 		PRINT_ER("mq or recv_buf is null\n");
 		return -EINVAL;
 	}
-- 
2.6.4


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

* [PATCH 27/27] staging: wilc1000: remove over-commenting
  2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
                   ` (24 preceding siblings ...)
  2016-01-21  1:20 ` [PATCH 26/27] staging: wilc1000: fix logical continuations Chaehyun Lim
@ 2016-01-21  1:20 ` Chaehyun Lim
  25 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21  1:20 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

There are over-commenting in wilc_msgqueue.h file. This comment is not
explain exactly what codes do and make checkpatch warning about "line
over 80 charcters". If necessary, comment will be added later with
preferred coding style.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.h | 66 --------------------------------
 1 file changed, 66 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index 4f79ead..ddd09843 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -1,18 +1,8 @@
 #ifndef __WILC_MSG_QUEUE_H__
 #define __WILC_MSG_QUEUE_H__
 
-/*!
- *  @file	wilc_msgqueue.h
- *  @brief	Message Queue OS wrapper functionality
- *  @author	syounan
- *  @sa		wilc_oswrapper.h top level OS wrapper file
- *  @date	30 Aug 2010
- *  @version	1.0
- */
-
 #include <linux/semaphore.h>
 
-/* Message Queue type is a structure */
 struct message {
 	void *buf;
 	u32 len;
@@ -27,67 +17,11 @@ struct message_queue {
 	struct message *msg_list;
 };
 
-/*!
- *  @brief		Creates a new Message queue
- *  @details		Creates a new Message queue, if the feature
- *                              CONFIG_WILC_MSG_QUEUE_IPC_NAME is enabled and pstrAttrs->pcName
- *                              is not Null, then this message queue can be used for IPC with
- *                              any other message queue having the same name in the system
- *  @param[in,out]	pHandle handle to the message queue object
- *  @param[in]	pstrAttrs Optional attributes, NULL for default
- *  @return		Error code indicating success/failure
- *  @author		syounan
- *  @date		30 Aug 2010
- *  @version		1.0
- */
 int wilc_mq_create(struct message_queue *mq);
-
-/*!
- *  @brief		Sends a message
- *  @details		Sends a message, this API will block until the message is
- *                              actually sent or until it is timedout (as long as the feature
- *                              CONFIG_WILC_MSG_QUEUE_TIMEOUT is enabled and pstrAttrs->u32Timeout
- *                              is not set to WILC_OS_INFINITY), zero timeout is a valid value
- *  @param[in]	pHandle handle to the message queue object
- *  @param[in]	pvSendBuffer pointer to the data to send
- *  @param[in]	u32SendBufferSize the size of the data to send
- *  @param[in]	pstrAttrs Optional attributes, NULL for default
- *  @return		Error code indicating success/failure
- *  @author		syounan
- *  @date		30 Aug 2010
- *  @version		1.0
- */
 int wilc_mq_send(struct message_queue *mq,
 		 const void *send_buf, u32 send_buf_size);
-
-/*!
- *  @brief		Receives a message
- *  @details		Receives a message, this API will block until a message is
- *                              received or until it is timedout (as long as the feature
- *                              CONFIG_WILC_MSG_QUEUE_TIMEOUT is enabled and pstrAttrs->u32Timeout
- *                              is not set to WILC_OS_INFINITY), zero timeout is a valid value
- *  @param[in]	pHandle handle to the message queue object
- *  @param[out]	pvRecvBuffer pointer to a buffer to fill with the received message
- *  @param[in]	u32RecvBufferSize the size of the receive buffer
- *  @param[out]	pu32ReceivedLength the length of received data
- *  @param[in]	pstrAttrs Optional attributes, NULL for default
- *  @return		Error code indicating success/failure
- *  @author		syounan
- *  @date		30 Aug 2010
- *  @version		1.0
- */
 int wilc_mq_recv(struct message_queue *mq,
 		 void *recv_buf, u32 recv_buf_size, u32 *recv_len);
-
-/*!
- *  @brief		Destroys an existing  Message queue
- *  @param[in]	pHandle handle to the message queue object
- *  @param[in]	pstrAttrs Optional attributes, NULL for default
- *  @return		Error code indicating success/failure
- *  @author		syounan
- *  @date		30 Aug 2010
- *  @version		1.0
- */
 int wilc_mq_destroy(struct message_queue *mq);
 
 #endif
-- 
2.6.4


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

* Re: [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
  2016-01-21  1:20 ` [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage Chaehyun Lim
@ 2016-01-21  8:18   ` Sudip Mukherjee
  2016-01-21  8:55     ` Dan Carpenter
  0 siblings, 1 reply; 32+ messages in thread
From: Sudip Mukherjee @ 2016-01-21  8:18 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: gregkh, devel, chris.park, austin.shin, linux-wireless,
	johnny.kim, tony.cho, leo.kim

On Thu, Jan 21, 2016 at 10:20:28AM +0900, Chaehyun Lim wrote:
> This patch fixes coding style of kmalloc usage found by checkpatch.
> CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)
> 
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
>  drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
> index 7107715..c7a60f4 100644
> --- a/drivers/staging/wilc1000/wilc_msgqueue.c
> +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
> @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq,
>  	}
>  
>  	/* construct a new message */
> -	new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
> +	new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC);

This checkpatch error was introduced by 1/27 patch of this series. Maybe
it will be better to fix it in that one.

regards
sudip

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

* Re: [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
  2016-01-21  8:18   ` Sudip Mukherjee
@ 2016-01-21  8:55     ` Dan Carpenter
  2016-01-21 10:01       ` Chaehyun Lim
  0 siblings, 1 reply; 32+ messages in thread
From: Dan Carpenter @ 2016-01-21  8:55 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Chaehyun Lim, devel, chris.park, austin.shin, gregkh,
	linux-wireless, johnny.kim, tony.cho, leo.kim

On Thu, Jan 21, 2016 at 01:48:16PM +0530, Sudip Mukherjee wrote:
> On Thu, Jan 21, 2016 at 10:20:28AM +0900, Chaehyun Lim wrote:
> > This patch fixes coding style of kmalloc usage found by checkpatch.
> > CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)
> > 
> > Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> > ---
> >  drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
> > index 7107715..c7a60f4 100644
> > --- a/drivers/staging/wilc1000/wilc_msgqueue.c
> > +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
> > @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq,
> >  	}
> >  
> >  	/* construct a new message */
> > -	new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
> > +	new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC);
> 
> This checkpatch error was introduced by 1/27 patch of this series. Maybe
> it will be better to fix it in that one.

The warning was introduced there but the issue went back further it's
just that checkpatch didn't detect it because of other issues.  This
seems fine.

regards,
dan carpenter


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

* Re: [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
  2016-01-21  8:55     ` Dan Carpenter
@ 2016-01-21 10:01       ` Chaehyun Lim
  2016-01-21 10:04         ` Dan Carpenter
  0 siblings, 1 reply; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21 10:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Sudip Mukherjee, devel, Chris Park, Austin Shin, Greg KH,
	linux-wireless, Johnny Kim, tony.cho, leo.kim

On Thu, Jan 21, 2016 at 5:55 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Jan 21, 2016 at 01:48:16PM +0530, Sudip Mukherjee wrote:
>> On Thu, Jan 21, 2016 at 10:20:28AM +0900, Chaehyun Lim wrote:
>> > This patch fixes coding style of kmalloc usage found by checkpatch.
>> > CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)
>> >
>> > Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
>> > ---
>> >  drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
>> > index 7107715..c7a60f4 100644
>> > --- a/drivers/staging/wilc1000/wilc_msgqueue.c
>> > +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
>> > @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq,
>> >     }
>> >
>> >     /* construct a new message */
>> > -   new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
>> > +   new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC);
>>
>> This checkpatch error was introduced by 1/27 patch of this series. Maybe
>> it will be better to fix it in that one.
>
> The warning was introduced there but the issue went back further it's
> just that checkpatch didn't detect it because of other issues.  This
> seems fine.

I appreciate for all comment. I will resend it after applying Sudip's review.

regards,
Chaehyun Lim

>
> regards,
> dan carpenter
>

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

* Re: [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
  2016-01-21 10:01       ` Chaehyun Lim
@ 2016-01-21 10:04         ` Dan Carpenter
  2016-01-21 11:11           ` Chaehyun Lim
  0 siblings, 1 reply; 32+ messages in thread
From: Dan Carpenter @ 2016-01-21 10:04 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: Sudip Mukherjee, devel, Chris Park, Austin Shin, Greg KH,
	linux-wireless, Johnny Kim, tony.cho, leo.kim

On Thu, Jan 21, 2016 at 07:01:45PM +0900, Chaehyun Lim wrote:
> On Thu, Jan 21, 2016 at 5:55 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > On Thu, Jan 21, 2016 at 01:48:16PM +0530, Sudip Mukherjee wrote:
> >> On Thu, Jan 21, 2016 at 10:20:28AM +0900, Chaehyun Lim wrote:
> >> > This patch fixes coding style of kmalloc usage found by checkpatch.
> >> > CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)
> >> >
> >> > Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> >> > ---
> >> >  drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
> >> > index 7107715..c7a60f4 100644
> >> > --- a/drivers/staging/wilc1000/wilc_msgqueue.c
> >> > +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
> >> > @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq,
> >> >     }
> >> >
> >> >     /* construct a new message */
> >> > -   new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
> >> > +   new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC);
> >>
> >> This checkpatch error was introduced by 1/27 patch of this series. Maybe
> >> it will be better to fix it in that one.
> >
> > The warning was introduced there but the issue went back further it's
> > just that checkpatch didn't detect it because of other issues.  This
> > seems fine.
> 
> I appreciate for all comment. I will resend it after applying Sudip's review.
> 

That's fine too, but the original way is more correct because it only
fixes one thing at a time and is easier to review.

regards,
dan carpenter


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

* Re: [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage
  2016-01-21 10:04         ` Dan Carpenter
@ 2016-01-21 11:11           ` Chaehyun Lim
  0 siblings, 0 replies; 32+ messages in thread
From: Chaehyun Lim @ 2016-01-21 11:11 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Sudip Mukherjee, devel, Chris Park, Austin Shin, Greg KH,
	linux-wireless, Johnny Kim, tony.cho, leo.kim

On Thu, Jan 21, 2016 at 7:04 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Jan 21, 2016 at 07:01:45PM +0900, Chaehyun Lim wrote:
>> On Thu, Jan 21, 2016 at 5:55 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>> > On Thu, Jan 21, 2016 at 01:48:16PM +0530, Sudip Mukherjee wrote:
>> >> On Thu, Jan 21, 2016 at 10:20:28AM +0900, Chaehyun Lim wrote:
>> >> > This patch fixes coding style of kmalloc usage found by checkpatch.
>> >> > CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...)
>> >> >
>> >> > Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
>> >> > ---
>> >> >  drivers/staging/wilc1000/wilc_msgqueue.c | 2 +-
>> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
>> >> > index 7107715..c7a60f4 100644
>> >> > --- a/drivers/staging/wilc1000/wilc_msgqueue.c
>> >> > +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
>> >> > @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq,
>> >> >     }
>> >> >
>> >> >     /* construct a new message */
>> >> > -   new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC);
>> >> > +   new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC);
>> >>
>> >> This checkpatch error was introduced by 1/27 patch of this series. Maybe
>> >> it will be better to fix it in that one.
>> >
>> > The warning was introduced there but the issue went back further it's
>> > just that checkpatch didn't detect it because of other issues.  This
>> > seems fine.
>>
>> I appreciate for all comment. I will resend it after applying Sudip's review.
>>
>
> That's fine too, but the original way is more correct because it only
> fixes one thing at a time and is easier to review.
>
I will keep the original way, even 1/27 patch was introduced a new
checkpatch warning.
I agree that one patch should be changed one thing.

But I need to resend again because I find a wrong variable name at commit title.

regards
Chaehyun Lim

> regards,
> dan carpenter
>

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

end of thread, other threads:[~2016-01-21 11:11 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-21  1:20 [PATCH 01/27] staging: wilc1000: rename struct __Message_struct Chaehyun Lim
2016-01-21  1:20 ` [PATCH 02/27] staging: wilc1000: rename pvBuffer in struct message Chaehyun Lim
2016-01-21  1:20 ` [PATCH 03/27] staging: wilc1000: rename u32Length " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 04/27] staging: wilc1000: rename pstrNext " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 05/27] staging: wilc1000: rename struct WILC_MsgQueueHandle Chaehyun Lim
2016-01-21  1:20 ` [PATCH 06/27] staging: wilc1000: rename hSem in struct message_queue Chaehyun Lim
2016-01-21  1:20 ` [PATCH 07/27] staging: wilc1000: rename strCriticalSection " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 08/27] staging: wilc1000: rename bExiting " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 09/27] staging: wilc1000: rename u32ReceiversCount " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 10/27] staging: wilc1000: rename pstrMessageList " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 11/27] staging: wilc1000: rename pHandle in wilc_mq_create Chaehyun Lim
2016-01-21  1:20 ` [PATCH 12/27] staging: wilc1000: rename pHandle in wilc_mq_destroy Chaehyun Lim
2016-01-21  1:20 ` [PATCH 13/27] staging: wilc1000: rename pstrMessge " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 14/27] staging: wilc1000: rename pHandle in wilc_mq_send Chaehyun Lim
2016-01-21  1:20 ` [PATCH 15/27] staging: wilc1000: rename pvSendBuffer " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 16/27] staging: wilc1000: rename u32SendBufferSize " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 17/27] staging: wilc1000: rename pstrMessage " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 18/27] staging: wilc1000: rename tail_msg " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 19/27] staging: wilc1000: fix return error code Chaehyun Lim
2016-01-21  1:20 ` [PATCH 20/27] staging: wilc1000: rename pHandle in wilc_mq_recv Chaehyun Lim
2016-01-21  1:20 ` [PATCH 21/27] staging: wilc1000: rename pvRecvBuffer " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 22/27] staging: wilc1000: rename u32RecvBufferSize " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 23/27] staging: wilc1000: rename pu32ReceivedLength " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 24/27] staging: wilc1000: rename pstrMessage " Chaehyun Lim
2016-01-21  1:20 ` [PATCH 25/27] staging: wilc1000: fix coding style of kmalloc usage Chaehyun Lim
2016-01-21  8:18   ` Sudip Mukherjee
2016-01-21  8:55     ` Dan Carpenter
2016-01-21 10:01       ` Chaehyun Lim
2016-01-21 10:04         ` Dan Carpenter
2016-01-21 11:11           ` Chaehyun Lim
2016-01-21  1:20 ` [PATCH 26/27] staging: wilc1000: fix logical continuations Chaehyun Lim
2016-01-21  1:20 ` [PATCH 27/27] staging: wilc1000: remove over-commenting Chaehyun Lim

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.