Commit 5b8e7ba9 authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman

staging: wilc1000: rename pstrMessage in wilc_mq_recv

This patch renames pstrMessage to msg to avoid camelcase.
Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62082cbe
...@@ -112,7 +112,7 @@ int wilc_mq_send(struct message_queue *mq, ...@@ -112,7 +112,7 @@ int wilc_mq_send(struct message_queue *mq,
int wilc_mq_recv(struct message_queue *mq, int wilc_mq_recv(struct message_queue *mq,
void *recv_buf, u32 recv_buf_size, u32 *recv_len) void *recv_buf, u32 recv_buf_size, u32 *recv_len)
{ {
struct message *pstrMessage; struct message *msg;
unsigned long flags; unsigned long flags;
if ((!mq) || (recv_buf_size == 0) if ((!mq) || (recv_buf_size == 0)
...@@ -133,14 +133,14 @@ int wilc_mq_recv(struct message_queue *mq, ...@@ -133,14 +133,14 @@ int wilc_mq_recv(struct message_queue *mq,
down(&mq->sem); down(&mq->sem);
spin_lock_irqsave(&mq->lock, flags); spin_lock_irqsave(&mq->lock, flags);
pstrMessage = mq->msg_list; msg = mq->msg_list;
if (!pstrMessage) { if (!msg) {
spin_unlock_irqrestore(&mq->lock, flags); spin_unlock_irqrestore(&mq->lock, flags);
PRINT_ER("pstrMessage is null\n"); PRINT_ER("msg is null\n");
return -EFAULT; return -EFAULT;
} }
/* check buffer size */ /* check buffer size */
if (recv_buf_size < pstrMessage->len) { if (recv_buf_size < msg->len) {
spin_unlock_irqrestore(&mq->lock, flags); spin_unlock_irqrestore(&mq->lock, flags);
up(&mq->sem); up(&mq->sem);
PRINT_ER("recv_buf_size overflow\n"); PRINT_ER("recv_buf_size overflow\n");
...@@ -149,13 +149,13 @@ int wilc_mq_recv(struct message_queue *mq, ...@@ -149,13 +149,13 @@ int wilc_mq_recv(struct message_queue *mq,
/* consume the message */ /* consume the message */
mq->recv_count--; mq->recv_count--;
memcpy(recv_buf, pstrMessage->buf, pstrMessage->len); memcpy(recv_buf, msg->buf, msg->len);
*recv_len = pstrMessage->len; *recv_len = msg->len;
mq->msg_list = pstrMessage->next; mq->msg_list = msg->next;
kfree(pstrMessage->buf); kfree(msg->buf);
kfree(pstrMessage); kfree(msg);
spin_unlock_irqrestore(&mq->lock, flags); spin_unlock_irqrestore(&mq->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment