mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
xsk: Properly terminate assignment in xskq_produce_flush_desc
Clang warns:
In file included from net/xdp/xsk_queue.c:10:
net/xdp/xsk_queue.h:292:2: warning: expression result unused
[-Wunused-value]
WRITE_ONCE(q->ring->producer, q->prod_tail);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:284:6: note: expanded from macro 'WRITE_ONCE'
__u.__val; \
~~~ ^~~~~
1 warning generated.
The q->prod_tail assignment has a comma at the end, not a semi-colon.
Fix that so clang no longer warns and everything works as expected.
Fixes: c497176cb2 ("xsk: add Rx receive functions and poll support")
Link: https://github.com/ClangBuiltLinux/linux/issues/544
Signed-off-by: Nathan Chancellor <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Acked-by: Jonathan Lemon <[email protected]>
Acked-by: Björn Töpel <[email protected]>
Acked-by: Song Liu <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
This commit is contained in:
parent
0eb84fa6e6
commit
f7019b7b0a
1 changed files with 1 additions and 1 deletions
|
|
@ -288,7 +288,7 @@ static inline void xskq_produce_flush_desc(struct xsk_queue *q)
|
|||
/* Order producer and data */
|
||||
smp_wmb(); /* B, matches C */
|
||||
|
||||
q->prod_tail = q->prod_head,
|
||||
q->prod_tail = q->prod_head;
|
||||
WRITE_ONCE(q->ring->producer, q->prod_tail);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue