summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723au
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-03-01 15:35:33 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-11 03:44:34 (GMT)
commit4b279420ac3bdde45714d107a3943df58d8eea07 (patch)
tree7e23359d7115659ac732a1d9031153b410c09365 /drivers/staging/rtl8723au
parent2cb5780a41714ef91a47b8e33eb7f59ac30c6346 (diff)
downloadlinux-4b279420ac3bdde45714d107a3943df58d8eea07.tar.xz
staging: rtl8723au: core: rtw_recv: use list_first_entry()
Use list_first_entry() instead of container_of() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723au')
-rw-r--r--drivers/staging/rtl8723au/core/rtw_recv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c
index a4dacc3..ceb4a07 100644
--- a/drivers/staging/rtl8723au/core/rtw_recv.c
+++ b/drivers/staging/rtl8723au/core/rtw_recv.c
@@ -1522,7 +1522,7 @@ struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter,
struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter,
struct rtw_queue *defrag_q)
{
- struct list_head *plist, *phead;
+ struct list_head *phead;
u8 wlanhdr_offset;
u8 curfragnum;
struct recv_frame *pnfhdr, *ptmp;
@@ -1534,8 +1534,7 @@ struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter,
pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
phead = get_list_head(defrag_q);
- plist = phead->next;
- prframe = container_of(plist, struct recv_frame, list);
+ prframe = list_first_entry(phead, struct recv_frame, list);
list_del_init(&prframe->list);
skb = prframe->pkt;