Commit aafec40c authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: Bcmchar.c: Renamed variable "Packet" -> "packet"

Renamed variable "Packet" -> "packet" in bcm_char_read().
Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dab41a0e
...@@ -187,7 +187,7 @@ static ssize_t bcm_char_read(struct file *filp, ...@@ -187,7 +187,7 @@ static ssize_t bcm_char_read(struct file *filp,
{ {
struct bcm_tarang_data *tarang = filp->private_data; struct bcm_tarang_data *tarang = filp->private_data;
struct bcm_mini_adapter *ad = tarang->Adapter; struct bcm_mini_adapter *ad = tarang->Adapter;
struct sk_buff *Packet = NULL; struct sk_buff *packet = NULL;
ssize_t pkt_len = 0; ssize_t pkt_len = 0;
int wait_ret_val = 0; int wait_ret_val = 0;
unsigned long ret = 0; unsigned long ret = 0;
...@@ -215,7 +215,7 @@ static ssize_t bcm_char_read(struct file *filp, ...@@ -215,7 +215,7 @@ static ssize_t bcm_char_read(struct file *filp,
down(&ad->RxAppControlQueuelock); down(&ad->RxAppControlQueuelock);
if (tarang->RxAppControlHead) { if (tarang->RxAppControlHead) {
Packet = tarang->RxAppControlHead; packet = tarang->RxAppControlHead;
DEQUEUEPACKET(tarang->RxAppControlHead, DEQUEUEPACKET(tarang->RxAppControlHead,
tarang->RxAppControlTail); tarang->RxAppControlTail);
tarang->AppCtrlQueueLen--; tarang->AppCtrlQueueLen--;
...@@ -223,20 +223,20 @@ static ssize_t bcm_char_read(struct file *filp, ...@@ -223,20 +223,20 @@ static ssize_t bcm_char_read(struct file *filp,
up(&ad->RxAppControlQueuelock); up(&ad->RxAppControlQueuelock);
if (Packet) { if (packet) {
pkt_len = Packet->len; pkt_len = packet->len;
ret = copy_to_user(buf, Packet->data, ret = copy_to_user(buf, packet->data,
min_t(size_t, pkt_len, size)); min_t(size_t, pkt_len, size));
if (ret) { if (ret) {
dev_kfree_skb(Packet); dev_kfree_skb(packet);
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
"Returning from copy to user failure\n"); "Returning from copy to user failure\n");
return -EFAULT; return -EFAULT;
} }
BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
"Read %zd Bytes From Adapter packet = %p by process %d!\n", "Read %zd Bytes From Adapter packet = %p by process %d!\n",
pkt_len, Packet, current->pid); pkt_len, packet, current->pid);
dev_kfree_skb(Packet); dev_kfree_skb(packet);
} }
BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "<\n"); BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "<\n");
......
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