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=-13.6 required=3.0 tests=DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 89451C76194 for ; Thu, 25 Jul 2019 05:53:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 569A821850 for ; Thu, 25 Jul 2019 05:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033998; bh=aoMdvRpuYKhI8barI7UHl9rwv9UGaS5nDWQl5NAdW/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cQOmSp+zB+L7nK6V2vYrHWkcQL7xgRRUuVFBuRfOQZng/lM7qeyeix4JHhXYVYogQ ebKNgE8X5ljkaJwni0WwCEyM7m+9kT5MXM/WV+L+417zIAcfp151b3WtIXAHXKLeqC pXg5s2RuXQzLEvKRMh7dndr0rUhwj+db1n00FZZM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404102AbfGYFjf (ORCPT ); Thu, 25 Jul 2019 01:39:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:53816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404099AbfGYFje (ORCPT ); Thu, 25 Jul 2019 01:39:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83CCC22BEF; Thu, 25 Jul 2019 05:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033174; bh=aoMdvRpuYKhI8barI7UHl9rwv9UGaS5nDWQl5NAdW/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cRooWgfIGRV+Adrfs5U7euuzifvQ6IxZvL5uzuyYwqelQXwK1YUV12sHsCUCKs3dg y6D0CJfaqcClu3WR/QciZ5DZE63h9UmiON0KIzKdcVfIg3Txc3mwf7/l1dd27+ycao qTnZU8ztZUG6NNqW5t9P1ZSa72piikqnfIbGaglo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Jonathan Lemon , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Song Liu , Daniel Borkmann , Sasha Levin Subject: [PATCH 4.19 116/271] xsk: Properly terminate assignment in xskq_produce_flush_desc Date: Wed, 24 Jul 2019 21:19:45 +0200 Message-Id: <20190724191705.183354868@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ 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 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); } -- 2.20.1