diff options
| author | Martin Kaiser <martin@kaiser.cx> | 2023-01-23 21:53:34 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-27 10:10:36 +0100 |
| commit | ca21b2db6804d2d1d03e376c8e1dc57b0875d38e (patch) | |
| tree | 4eee73041857434dac3d5f25ea3527d2943a835a | |
| parent | 6500084a41758542c839e280703eddebdd367b10 (diff) | |
staging: r8188eu: simplify dequeue_one_xmitframe
Simplify the dequeue_one_xmitframe function without changing its
behaviour. Drop the temporary variable xmitframe_plist.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230123205342.229589-16-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/r8188eu/core/rtw_xmit.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index 7802a34ebcfd..79a1999ca809 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -1357,15 +1357,13 @@ s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitfram static struct xmit_frame *dequeue_one_xmitframe(struct __queue *pframe_queue) { - struct list_head *xmitframe_plist, *xmitframe_phead; + struct list_head *xmitframe_phead = get_list_head(pframe_queue); struct xmit_frame *pxmitframe; - xmitframe_phead = get_list_head(pframe_queue); if (list_empty(xmitframe_phead)) return NULL; - xmitframe_plist = xmitframe_phead->next; - pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list); + pxmitframe = container_of(xmitframe_phead->next, struct xmit_frame, list); list_del_init(&pxmitframe->list); return pxmitframe; } |
