* [PATCH 01/15] staging: rtl8188eu: Remove function rtw_dequeue_recvbuf()
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 02/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head() navin patidar
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
rtw_dequeue_recvbuf() is not being used by driver.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 25 -------------------------
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
2 files changed, 26 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 5c1d2d2..eac5260 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -313,31 +313,6 @@ int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
return _SUCCESS;
}
-struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
-{
- unsigned long irqL;
- struct recv_buf *precvbuf;
- struct list_head *plist, *phead;
-
- spin_lock_irqsave(&queue->lock, irqL);
-
- if (_rtw_queue_empty(queue)) {
- precvbuf = NULL;
- } else {
- phead = get_list_head(queue);
-
- plist = phead->next;
-
- precvbuf = container_of(plist, struct recv_buf, list);
-
- rtw_list_delete(&precvbuf->list);
- }
-
- spin_unlock_irqrestore(&queue->lock, irqL);
-
- return precvbuf;
-}
-
static int recvframe_chkmic(struct adapter *adapter,
struct recv_frame *precvframe)
{
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index bcbce46..7b95860 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -304,7 +304,6 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue,
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
-struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue);
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 02/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head()
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
2014-05-03 11:45 ` [PATCH 01/15] staging: rtl8188eu: Remove function rtw_dequeue_recvbuf() navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 03/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf() navin patidar
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
rtw_enqueue_recvbuf_to_head() is not being used by driver.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ------------
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
2 files changed, 13 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index eac5260..21aa89d 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -289,18 +289,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
return cnt;
}
-int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
-{
- spin_lock_bh(&queue->lock);
-
- rtw_list_delete(&precvbuf->list);
- rtw_list_insert_head(&precvbuf->list, get_list_head(queue));
-
- spin_unlock_bh(&queue->lock);
-
- return _SUCCESS;
-}
-
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
{
unsigned long irqL;
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 7b95860..21ce405 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -302,7 +302,6 @@ int rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue);
void rtw_free_recvframe_queue(struct __queue *pframequeue,
struct __queue *pfree_recv_queue);
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
-int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 03/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf()
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
2014-05-03 11:45 ` [PATCH 01/15] staging: rtl8188eu: Remove function rtw_dequeue_recvbuf() navin patidar
2014-05-03 11:45 ` [PATCH 02/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head() navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 04/15] staging: rtl8188eu: Remove 'struct list_head list' from struct recv_buf navin patidar
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
rtw_enqueue_recvbuf() is not being used by driver.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ------------
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
2 files changed, 13 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 21aa89d..da26fa5c 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -289,18 +289,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
return cnt;
}
-int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
-{
- unsigned long irqL;
- spin_lock_irqsave(&queue->lock, irqL);
-
- rtw_list_delete(&precvbuf->list);
-
- rtw_list_insert_tail(&precvbuf->list, get_list_head(queue));
- spin_unlock_irqrestore(&queue->lock, irqL);
- return _SUCCESS;
-}
-
static int recvframe_chkmic(struct adapter *adapter,
struct recv_frame *precvframe)
{
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 21ce405..677859e 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -302,7 +302,6 @@ int rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue);
void rtw_free_recvframe_queue(struct __queue *pframequeue,
struct __queue *pfree_recv_queue);
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
-int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 04/15] staging: rtl8188eu: Remove 'struct list_head list' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (2 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 03/15] staging: rtl8188eu: Remove function rtw_enqueue_recvbuf() navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 05/15] staging: rtl8188eu: Remove 'spinlock_t recvbuf_lock' " navin patidar
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Users of 'struct list_head list' variable e.g. rtw_enqueue_recvbuf(),
rtw_enqueue_recvbuf_to_head() and rtw_dequeue_recvbuf() are
already removed.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 1 -
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index b1b1584..98a79ba 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -71,7 +71,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) {
- _rtw_init_listhead(&precvbuf->list);
spin_lock_init(&precvbuf->recvbuf_lock);
precvbuf->alloc_sz = MAX_RECVBUF_SZ;
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 677859e..103849f 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -235,7 +235,6 @@ struct sta_recv_priv {
};
struct recv_buf {
- struct list_head list;
spinlock_t recvbuf_lock;
u32 ref_cnt;
struct adapter *adapter;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 05/15] staging: rtl8188eu: Remove 'spinlock_t recvbuf_lock' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (3 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 04/15] staging: rtl8188eu: Remove 'struct list_head list' from struct recv_buf navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 06/15] staging: rtl8188eu: Remove 'dma_addr_t dma_transfer_addr' " navin patidar
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
recvbuf_lock is initialized inside rtl8188eu_init_recv_priv() but never used.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 1 -
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 98a79ba..52d83a4 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -71,7 +71,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) {
- spin_lock_init(&precvbuf->recvbuf_lock);
precvbuf->alloc_sz = MAX_RECVBUF_SZ;
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
if (res == _FAIL)
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 103849f..4a19a06 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -235,7 +235,6 @@ struct sta_recv_priv {
};
struct recv_buf {
- spinlock_t recvbuf_lock;
u32 ref_cnt;
struct adapter *adapter;
u8 *pbuf;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 06/15] staging: rtl8188eu: Remove 'dma_addr_t dma_transfer_addr' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (4 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 05/15] staging: rtl8188eu: Remove 'spinlock_t recvbuf_lock' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 07/15] staging: rtl8188eu: Remove 'int transfer_len' " navin patidar
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Remove unused variable dma_transfer_addr.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 4a19a06..bf9af77 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -245,7 +245,6 @@ struct recv_buf {
u8 *ptail;
u8 *pend;
struct urb *purb;
- dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
u32 alloc_sz;
u8 irp_pending;
int transfer_len;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 07/15] staging: rtl8188eu: Remove 'int transfer_len' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (5 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 06/15] staging: rtl8188eu: Remove 'dma_addr_t dma_transfer_addr' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 08/15] staging: rtl8188eu: Remove pdata, phead, ptail and pend " navin patidar
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Driver is not making any use of value stored in this variable.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 --
drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 1 -
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 1 -
4 files changed, 5 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 52d83a4..ee7fa64 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -30,8 +30,6 @@
void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf)
{
- precvbuf->transfer_len = 0;
-
precvbuf->len = 0;
precvbuf->ref_cnt = 0;
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index 1fa5370..285cb5f 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -518,7 +518,6 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
} else {
rtw_reset_continual_urb_error(adapter_to_dvobj(adapt));
- precvbuf->transfer_len = purb->actual_length;
skb_put(precvbuf->pskb, purb->actual_length);
skb_queue_tail(&precvpriv->rx_skb_queue, precvbuf->pskb);
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index bf9af77..cac8acb 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -247,7 +247,6 @@ struct recv_buf {
struct urb *purb;
u32 alloc_sz;
u8 irp_pending;
- int transfer_len;
struct sk_buff *pskb;
u8 reuse;
};
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index da397e4..0838339 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -67,7 +67,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
precvbuf->phead = NULL;
precvbuf->ptail = NULL;
precvbuf->pend = NULL;
- precvbuf->transfer_len = 0;
precvbuf->len = 0;
return res;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 08/15] staging: rtl8188eu: Remove pdata, phead, ptail and pend from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (6 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 07/15] staging: rtl8188eu: Remove 'int transfer_len' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 09/15] staging: rtl8188eu: Remove 'irp_pending' " navin patidar
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Driver is not making use of value stored in removed variables.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 8 --------
drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 9 ---------
drivers/staging/rtl8188eu/include/rtw_recv.h | 4 ----
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 4 ----
4 files changed, 25 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index ee7fa64..41a0c0d 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -31,15 +31,7 @@
void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf)
{
precvbuf->len = 0;
-
precvbuf->ref_cnt = 0;
-
- if (precvbuf->pbuf) {
- precvbuf->pdata = precvbuf->pbuf;
- precvbuf->phead = precvbuf->pbuf;
- precvbuf->ptail = precvbuf->pbuf;
- precvbuf->pend = precvbuf->pdata + MAX_RECVBUF_SZ;
- }
}
int rtl8188eu_init_recv_priv(struct adapter *padapter)
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index 285cb5f..654c5b3 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -615,18 +615,9 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
- precvbuf->phead = precvbuf->pskb->head;
- precvbuf->pdata = precvbuf->pskb->data;
- precvbuf->ptail = skb_tail_pointer(precvbuf->pskb);
- precvbuf->pend = skb_end_pointer(precvbuf->pskb);
precvbuf->pbuf = precvbuf->pskb->data;
} else { /* reuse skb */
- precvbuf->phead = precvbuf->pskb->head;
- precvbuf->pdata = precvbuf->pskb->data;
- precvbuf->ptail = skb_tail_pointer(precvbuf->pskb);
- precvbuf->pend = skb_end_pointer(precvbuf->pskb);
precvbuf->pbuf = precvbuf->pskb->data;
-
precvbuf->reuse = false;
}
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index cac8acb..8d3424b 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -240,10 +240,6 @@ struct recv_buf {
u8 *pbuf;
u8 *pallocated_buf;
u32 len;
- u8 *phead;
- u8 *pdata;
- u8 *ptail;
- u8 *pend;
struct urb *purb;
u32 alloc_sz;
u8 irp_pending;
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 0838339..99b5910 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -63,10 +63,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
precvbuf->reuse = false;
precvbuf->pallocated_buf = NULL;
precvbuf->pbuf = NULL;
- precvbuf->pdata = NULL;
- precvbuf->phead = NULL;
- precvbuf->ptail = NULL;
- precvbuf->pend = NULL;
precvbuf->len = 0;
return res;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 09/15] staging: rtl8188eu: Remove 'irp_pending' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (7 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 08/15] staging: rtl8188eu: Remove pdata, phead, ptail and pend " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 10/15] staging: rtl8188eu: Remove 'pallocated_buf' " navin patidar
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
irp_pending is initialized to false inside rtw_os_recvbuf_resource_alloc()
and value of irq_pending never changed after that, so 'if (!precvbuf->irp_pending)'
inside rtw_os_read_port() function will be always true.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 8d3424b..987445a 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -242,7 +242,6 @@ struct recv_buf {
u32 len;
struct urb *purb;
u32 alloc_sz;
- u8 irp_pending;
struct sk_buff *pskb;
u8 reuse;
};
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 99b5910..7f9b654 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -55,7 +55,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
{
int res = _SUCCESS;
- precvbuf->irp_pending = false;
precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
if (precvbuf->purb == NULL)
res = _FAIL;
@@ -229,9 +228,8 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
dev_kfree_skb_any(precvbuf->pskb);
precvbuf->pskb = NULL;
precvbuf->reuse = false;
- if (!precvbuf->irp_pending)
- rtw_read_port(padapter, precvpriv->ff_hwaddr, 0,
- (unsigned char *)precvbuf);
+ rtw_read_port(padapter, precvpriv->ff_hwaddr, 0,
+ (unsigned char *)precvbuf);
}
static void _rtw_reordering_ctrl_timeout_handler(void *func_context)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 10/15] staging: rtl8188eu: Remove 'pallocated_buf' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (8 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 09/15] staging: rtl8188eu: Remove 'irp_pending' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 11/15] staging: rtl8188eu: Remove 'alloc_sz' " navin patidar
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
pallocated_buf is not being used by driver.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 987445a..b955d73 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -238,7 +238,6 @@ struct recv_buf {
u32 ref_cnt;
struct adapter *adapter;
u8 *pbuf;
- u8 *pallocated_buf;
u32 len;
struct urb *purb;
u32 alloc_sz;
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 7f9b654..25358fb 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
res = _FAIL;
precvbuf->pskb = NULL;
precvbuf->reuse = false;
- precvbuf->pallocated_buf = NULL;
precvbuf->pbuf = NULL;
precvbuf->len = 0;
return res;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 11/15] staging: rtl8188eu: Remove 'alloc_sz' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (9 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 10/15] staging: rtl8188eu: Remove 'pallocated_buf' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 12/15] staging: rtl8188eu: Remove 'u32 len' " navin patidar
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Driver isn't making any use of value stored in alloc_sz variable.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 1 -
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 41a0c0d..3edc2cd 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -61,7 +61,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) {
- precvbuf->alloc_sz = MAX_RECVBUF_SZ;
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
if (res == _FAIL)
break;
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index b955d73..519ed4e 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -240,7 +240,6 @@ struct recv_buf {
u8 *pbuf;
u32 len;
struct urb *purb;
- u32 alloc_sz;
struct sk_buff *pskb;
u8 reuse;
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 12/15] staging: rtl8188eu: Remove 'u32 len' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (10 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 11/15] staging: rtl8188eu: Remove 'alloc_sz' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 13/15] staging: rtl8188eu: Remove 'u32 ref_cnt' " navin patidar
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Remove unused variable 'u32 len'.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 1 -
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 3edc2cd..740818a5 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -30,7 +30,6 @@
void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf)
{
- precvbuf->len = 0;
precvbuf->ref_cnt = 0;
}
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 519ed4e..3f43f11 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -238,7 +238,6 @@ struct recv_buf {
u32 ref_cnt;
struct adapter *adapter;
u8 *pbuf;
- u32 len;
struct urb *purb;
struct sk_buff *pskb;
u8 reuse;
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 25358fb..2577ceb6 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -61,7 +61,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
precvbuf->pskb = NULL;
precvbuf->reuse = false;
precvbuf->pbuf = NULL;
- precvbuf->len = 0;
return res;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 13/15] staging: rtl8188eu: Remove 'u32 ref_cnt' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (11 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 12/15] staging: rtl8188eu: Remove 'u32 len' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 14/15] staging: rtl8188eu: Remove rtl8188eu_init_recvbuf() function navin patidar
2014-05-03 11:45 ` [PATCH 15/15] staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf navin patidar
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Driver isn't making any use of value stored in variable ref_cnt.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 --
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index 740818a5..fc06991 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -30,7 +30,6 @@
void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf)
{
- precvbuf->ref_cnt = 0;
}
int rtl8188eu_init_recv_priv(struct adapter *padapter)
@@ -63,7 +62,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
if (res == _FAIL)
break;
- precvbuf->ref_cnt = 0;
precvbuf->adapter = padapter;
precvbuf++;
}
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 3f43f11..8dadf30 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -235,7 +235,6 @@ struct sta_recv_priv {
};
struct recv_buf {
- u32 ref_cnt;
struct adapter *adapter;
u8 *pbuf;
struct urb *purb;
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index 2577ceb6..c1664b7 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -221,7 +221,6 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
{
struct recv_priv *precvpriv = &padapter->recvpriv;
- precvbuf->ref_cnt--;
/* free skb in recv_buf */
dev_kfree_skb_any(precvbuf->pskb);
precvbuf->pskb = NULL;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 14/15] staging: rtl8188eu: Remove rtl8188eu_init_recvbuf() function
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (12 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 13/15] staging: rtl8188eu: Remove 'u32 ref_cnt' " navin patidar
@ 2014-05-03 11:45 ` navin patidar
2014-05-03 11:45 ` [PATCH 15/15] staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf navin patidar
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
rtl8188eu_init_recvbuf() function definition is empty now,
so remove it.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 4 ----
drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 2 --
drivers/staging/rtl8188eu/include/rtl8188e_recv.h | 1 -
3 files changed, 7 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index fc06991..2b45564 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -28,10 +28,6 @@
#include <rtl8188e_hal.h>
-void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *precvbuf)
-{
-}
-
int rtl8188eu_init_recv_priv(struct adapter *padapter)
{
struct recv_priv *precvpriv = &padapter->recvpriv;
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index 654c5b3..d3c5ed3 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -600,8 +600,6 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
precvbuf->reuse = true;
}
- rtl8188eu_init_recvbuf(adapter, precvbuf);
-
/* re-assign for linux based on skb */
if ((!precvbuf->reuse) || (precvbuf->pskb == NULL)) {
precvbuf->pskb = netdev_alloc_skb(adapter->pnetdev, MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
index 07e5f52..5fed30d 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
@@ -56,7 +56,6 @@ enum rx_packet_type {
};
#define INTERRUPT_MSG_FORMAT_LEN 60
-void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *buf);
s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
void rtl8188eu_free_recv_priv(struct adapter *padapter);
void rtl8188eu_recv_hdl(struct adapter *padapter, struct recv_buf *precvbuf);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 15/15] staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf
2014-05-03 11:45 [PATCH 00/15] staging: rtl8188eu: clean-up struct recv_buf navin patidar
` (13 preceding siblings ...)
2014-05-03 11:45 ` [PATCH 14/15] staging: rtl8188eu: Remove rtl8188eu_init_recvbuf() function navin patidar
@ 2014-05-03 11:45 ` navin patidar
14 siblings, 0 replies; 16+ messages in thread
From: navin patidar @ 2014-05-03 11:45 UTC (permalink / raw)
To: gregkh, Larry.Finger; +Cc: devel, linux-kernel, navin patidar
Instead of using pbuf to pass sbk data pointer to usb_fill_bulk_urb(),
we can use precvbuf->pskb->data to do that.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 5 +----
drivers/staging/rtl8188eu/include/rtw_recv.h | 1 -
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 1 -
3 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
index d3c5ed3..d8fc747 100644
--- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
@@ -612,10 +612,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
tmpaddr = (size_t)precvbuf->pskb->data;
alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
-
- precvbuf->pbuf = precvbuf->pskb->data;
} else { /* reuse skb */
- precvbuf->pbuf = precvbuf->pskb->data;
precvbuf->reuse = false;
}
@@ -627,7 +624,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
pipe = ffaddr2pipehdl(pdvobj, addr);
usb_fill_bulk_urb(purb, pusbd, pipe,
- precvbuf->pbuf,
+ precvbuf->pskb->data,
MAX_RECVBUF_SZ,
usb_read_port_complete,
precvbuf);/* context is precvbuf */
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 8dadf30..971dd16 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -236,7 +236,6 @@ struct sta_recv_priv {
struct recv_buf {
struct adapter *adapter;
- u8 *pbuf;
struct urb *purb;
struct sk_buff *pskb;
u8 reuse;
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index c1664b7..29ec014 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -60,7 +60,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
res = _FAIL;
precvbuf->pskb = NULL;
precvbuf->reuse = false;
- precvbuf->pbuf = NULL;
return res;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 16+ messages in thread