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=-8.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 EAD8CC48BDA for ; Wed, 26 Jun 2019 14:30:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC57F2133F for ; Wed, 26 Jun 2019 14:30:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728098AbfFZOap (ORCPT ); Wed, 26 Jun 2019 10:30:45 -0400 Received: from www62.your-server.de ([213.133.104.62]:44192 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727146AbfFZOap (ORCPT ); Wed, 26 Jun 2019 10:30:45 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1hg8wV-0000Sf-5y; Wed, 26 Jun 2019 16:30:35 +0200 Received: from [2a02:1205:5054:6d70:b45c:ec96:516a:e956] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hg8wU-000Rp6-U7; Wed, 26 Jun 2019 16:30:34 +0200 Subject: Re: [PATCH] xsk: Properly terminate assignment in xskq_produce_flush_desc To: Nathan Chancellor , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , "David S. Miller" , Alexei Starovoitov , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, xdp-newbies@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Huckleberry References: <20190625182352.13918-1-natechancellor@gmail.com> From: Daniel Borkmann Message-ID: <253f2fcd-f62d-90e1-2963-c8e5cdda4726@iogearbox.net> Date: Wed, 26 Jun 2019 16:30:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20190625182352.13918-1-natechancellor@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.3/25492/Wed Jun 26 10:00:16 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/25/2019 08:23 PM, Nathan Chancellor wrote: > 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 Applied, thanks!