Received: by 10.223.185.116 with SMTP id b49csp1301936wrg; Wed, 21 Feb 2018 16:14:00 -0800 (PST) X-Google-Smtp-Source: AH8x224nhKIiqVQal2ov4NdrT4fYLSMlhsKwj389DujLSjbNRRvr+/ZG7+xTLwN+C8QTPo4qK1k3 X-Received: by 10.98.205.140 with SMTP id o134mr392321pfg.34.1519258440341; Wed, 21 Feb 2018 16:14:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519258440; cv=none; d=google.com; s=arc-20160816; b=oPO9FetBR5XMMboPFxsGAbZGticXTbQqrZexMmf0qqC3cb5tacrG8gmKrJ+KRQFMDg ibuZJkfuJwRssbXdwdhiePzrAAzCP7ZggW5aEj6hwxJgp+LXa4jTYvXqkwwXg8xlfWVi Q2BSeA2dfZebrv851zzUaSR7xjonReLqrZc4gz85cskHOcdWXun9fL/9mXdp5Pl7FvKe EBHJDiwus8CrkOZ/oxL1Nrw2ETTdStOz6OCngwuxXl6Fbr/jGNU8cgPWlSJk7U+NONvL Zb6o6zyQcc8WMpAZ2qHiEg9CTmh+begplCakQXVAd0HFJuuLvh5UpYz8A0X8mPRLJ5E2 bVdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=UH4Chb9STP9886+FbUibEIN7GdGQ9KiWuxItRuea6N8=; b=ZJy9vlrTBB19O3sXgCKXfhoccGt/NgNFs1sdG5EEj8rjUVRDjVmJemqWhUCe9JY52G q2PO21ssjQhDp/S8U4qsO01/Nl4HFswBUdyJG2ZwK6XEJekiQ9OJ0etYC6I+DtWvEovv g33a9W5QsnqwHZ1kZYfXJuQkBKT8DUWW2QQwzVpGbpj+dK1payAvMnOn+v8gHZGpQfnp Ky6cgjuiZgH2mWza6yLm49C/qNTM9PmofocB2MMxYrwwfZlesIRf5ov0+TIDaHv1vHMo Qmm60XupUfpbpOfLUs3SCPSd/1n3N2nd5hXQai/cH2p9ZyjlCX4wF8J1YFz7X1AanE0n HnCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si1976947pfa.86.2018.02.21.16.13.45; Wed, 21 Feb 2018 16:14:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbeBVANC (ORCPT + 99 others); Wed, 21 Feb 2018 19:13:02 -0500 Received: from www62.your-server.de ([213.133.104.62]:52329 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbeBVANA (ORCPT ); Wed, 21 Feb 2018 19:13:00 -0500 Received: from [62.202.221.135] (helo=linux.home) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1eoeVB-0002Wc-Q2; Thu, 22 Feb 2018 01:12:45 +0100 Subject: Re: [PATCH] bpf: clean up unused-variable warning To: Arnd Bergmann , Alexei Starovoitov Cc: "David S. Miller" , John Fastabend , Lawrence Brakmo , Jesper Dangaard Brouer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180220220744.305712-1-arnd@arndb.de> From: Daniel Borkmann Message-ID: Date: Thu, 22 Feb 2018 01:12:44 +0100 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: <20180220220744.305712-1-arnd@arndb.de> 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.99.3/24336/Wed Feb 21 18:21:56 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/20/2018 11:07 PM, Arnd Bergmann wrote: > The only user of this variable is inside of an #ifdef, causing > a warning without CONFIG_INET: > > net/core/filter.c: In function '____bpf_sock_ops_cb_flags_set': > net/core/filter.c:3382:6: error: unused variable 'val' [-Werror=unused-variable] > int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS; > > This replaces the #ifdef with a nicer IS_ENABLED() check that > makes the code more readable and avoids the warning. > > Fixes: b13d88072172 ("bpf: Adds field bpf_sock_ops_cb_flags to tcp_sock") > Signed-off-by: Arnd Bergmann Now applied to bpf, thanks Arnd!