summaryrefslogtreecommitdiffstats
path: root/net/xdp
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-06-25 11:23:52 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-26 09:14:12 +0200
commitdad0b17e4a4e68df83e2904034e76a94c0a82d91 (patch)
treeade82e3c052b66084b03d74248e94a88b6aa3cef /net/xdp
parente69fac59c493107bf25343ad7b387530e2334836 (diff)
downloadlinux-stable-dad0b17e4a4e68df83e2904034e76a94c0a82d91.tar.gz
linux-stable-dad0b17e4a4e68df83e2904034e76a94c0a82d91.tar.bz2
linux-stable-dad0b17e4a4e68df83e2904034e76a94c0a82d91.zip
xsk: Properly terminate assignment in xskq_produce_flush_desc
[ Upstream commit f7019b7b0ad14bde732b8953161994edfc384953 ] 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: c497176cb2e4 ("xsk: add Rx receive functions and poll support") Link: https://github.com/ClangBuiltLinux/linux/issues/544 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Nick Desaulniers <ndesaulniers@google.com> Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com> Acked-by: Björn Töpel <bjorn.topel@intel.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/xdp')
-rw-r--r--net/xdp/xsk_queue.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h
index 8a64b150be54..fe96c0d039f2 100644
--- a/net/xdp/xsk_queue.h
+++ b/net/xdp/xsk_queue.h
@@ -239,7 +239,7 @@ static inline void xskq_produce_flush_desc(struct xsk_queue *q)
/* Order producer and data */
smp_wmb();
- q->prod_tail = q->prod_head,
+ q->prod_tail = q->prod_head;
WRITE_ONCE(q->ring->producer, q->prod_tail);
}