From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37462C7618F for ; Mon, 15 Jul 2019 14:13:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10288212F5 for ; Mon, 15 Jul 2019 14:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563200001; bh=s/vchQ7ex/pUHlTrgQqeUHZI7AKxaFagzyTNNSalu2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1mI9tMc/lKlA0lEywaGERu7X4ZjcOsIi7fmfft8Z4QploKx9gnzpAnuC7w5L/oIq/ gp7j4ZvVlnzbpmEGKeo9hh97UXdsEUC9HztqBfIbs0hgdm3w6dBXXafNGh3Gtmsmbp QzPnEnsWL3FfASk3hse4pvTtNBFvjwUOlV+CySVU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388775AbfGOONM (ORCPT ); Mon, 15 Jul 2019 10:13:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:53298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731232AbfGOONI (ORCPT ); Mon, 15 Jul 2019 10:13:08 -0400 Received: from sasha-vm.mshome.net (unknown [73.61.17.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6546A217D8; Mon, 15 Jul 2019 14:13:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563199988; bh=s/vchQ7ex/pUHlTrgQqeUHZI7AKxaFagzyTNNSalu2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NThYHnTOOx2cXbRCwGclKjiHsiC0x6ZwPb7Nb0kFQ8lGlSJW4rpzdwkiviySD9Lqq wFrBo5LVnvs+6elB+MEgTlyAxLYFHu+zGaJXL3KdpE9vvKv/ZyDnoOOQwnq+PitMhx +oaVbrydTT+NHXpktVuHjzQdG5FuEXEN/nhFC8+A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Nick Desaulniers , Jonathan Lemon , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Song Liu , Daniel Borkmann , Sasha Levin , netdev@vger.kernel.org, bpf@vger.kernel.org, xdp-newbies@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.1 154/219] xsk: Properly terminate assignment in xskq_produce_flush_desc Date: Mon, 15 Jul 2019 10:02:35 -0400 Message-Id: <20190715140341.6443-154-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190715140341.6443-1-sashal@kernel.org> References: <20190715140341.6443-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nathan Chancellor [ 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 Acked-by: Nick Desaulniers Acked-by: Jonathan Lemon Acked-by: Björn Töpel Acked-by: Song Liu Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- net/xdp/xsk_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h index 610c0bdc0c2b..cd333701f4bf 100644 --- a/net/xdp/xsk_queue.h +++ b/net/xdp/xsk_queue.h @@ -240,7 +240,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); } -- 2.20.1