From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755242AbcA1NLw (ORCPT ); Thu, 28 Jan 2016 08:11:52 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33277 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755187AbcA1NLr (ORCPT ); Thu, 28 Jan 2016 08:11:47 -0500 Subject: Re: [PATCH] ipv4: ipconfig: avoid unused ic_proto_used symbol To: Arnd Bergmann , "David S. Miller" References: <1453902853-3424272-1-git-send-email-arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org, Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Message-ID: <56AA1390.6000503@cogentembedded.com> Date: Thu, 28 Jan 2016 16:11:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1453902853-3424272-1-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 1/27/2016 4:53 PM, Arnd Bergmann wrote: > When CONFIG_PROC_FS, CONFIG_IP_PNP_BOOTP, CONFIG_IP_PNP_DHCP and > CONFIG_IP_PNP_RARP are all disabled, we get a warning about the > ic_proto_used variable being unused: > > net/ipv4/ipconfig.c:146:12: error: 'ic_proto_used' defined but not used [-Werror=unused-variable] > > This avoids the warning, but making the definition conditional on s/but/by/? > whether a dynamic IP configuration protocol is configured. If not, > we know that the value is always zero, so we can optimize away the > variable and all code that depends on it. > > Signed-off-by: Arnd Bergmann [...] MBR, Sergei