Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2236224rwd; Fri, 19 May 2023 02:59:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6l97wQ5QamUO05xxMcoCGK4ajtf2gkMq++TulHx1JmHLPvtzzEXVWdLagaZegJ7+KbVYpW X-Received: by 2002:a05:6a20:7491:b0:100:6a95:c288 with SMTP id p17-20020a056a20749100b001006a95c288mr2365365pzd.7.1684490367843; Fri, 19 May 2023 02:59:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684490367; cv=none; d=google.com; s=arc-20160816; b=ekEi5/HfwqgER5g8TEq8/3Wa/SWXgym9K359Ve8aU2DzjeUxfDtM4V/cvzHum/epRZ N5dqcUhZD4WRsA4M8mm6NI9jwW7G39wSBIU2Qa5Dgx3g/DqOoTcuOOTFV9vOeAloMTp2 zAWaJnUS5acGye/To9CdPIMtvCZrgMTvbkYrqk4mLcaCNpaqjJ4UgS9dV9C4dYQC/OyP KvFSG+39LLjjk0WUydyLu4Ylh0Hi3Q/LfxPw30IpeF60PWJdIzoqMkEzBdxiIavGrJYk Y0Osj9s/Lnmq1QByvaflxglHmMK4mS93I9I3uQ9/ISBhcfieps4jkJJXserOaaNX8Tes Ha/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=BtktTK37zCSQ8VAqtKn5INz6adLKBQ2Q4xBF7yCW5d8=; b=sLbXdJVhXOC38nCzMx8DeUq5sQ7PiRyBLXzJwTGO0R5NEre6tYJHUDTLVFk9cMCY6z sBZIlCL08yr9nP9FBUfkXHuiLcTGgog4OUP6FzlRVFDxpLZKHwa79sjysOLy9NZ6B7h1 IqhfTXKGcHn2R6QO0lXiytJwO2V5MX3jS8AhgfVfa5oQlujkdel8bgTH2X1qQTsgW7O6 QkX+TP2Go2jtKFNtRZ4E5KH9tQiacbF4J/YCyhlewbLqOOC0gVMsAnA39fXrRgLkjWmK rY2+eEhh2AhU3nt2KhDmY7oqkip7jkmKH8PVdAe9x7qmURLIVJ/MRGoIb/gb1uob8i8C A37w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JRY03y+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a63b90d000000b005309dcba147si3472897pge.754.2023.05.19.02.59.12; Fri, 19 May 2023 02:59:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JRY03y+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231812AbjESJfq (ORCPT + 99 others); Fri, 19 May 2023 05:35:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231720AbjESJfc (ORCPT ); Fri, 19 May 2023 05:35:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF7FF2127 for ; Fri, 19 May 2023 02:34:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 80D85655A3 for ; Fri, 19 May 2023 09:32:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C46CC4339B; Fri, 19 May 2023 09:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684488775; bh=wGKJyQlBy4S9Q6vaML8h068iGf1xJ8aPt0xeOhV7lkE=; h=From:To:Cc:Subject:Date:From; b=JRY03y+kPjBs3+pNdyS3dr3enxOCHF/Z0w0g/El9B6THPmic1qZfEf4prdMnQvZ1f FAzsYoTYlrp/8mnOZWxzentNUkYVnEua00zRHrn+SOXtT5grVjeg0+zPRSS22sgzWU dkI123s6ZiRrtDFTtpCzigQXhDxIt7EkhFHJnvae5pXaizwrw7yz3kkah53g05FBlk TiPRZBSya8obTsXj1x+zcncI0dRS6J8zPkQk7rXr6HbcnGlmy/FY+P8pxHDwL3w/8N CL8N6ho1xLyobc/2WDp2XV7/H52BoxPk3/oomN6UOf0WT+YUZYMdV1MmecHFor0tVo c3d64YH4j96oQ== From: Arnd Bergmann To: "David S. Miller" , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Martin Wetterwald Cc: Arnd Bergmann , XueBing Chen , Greg Kroah-Hartman , Saravana Kannan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [net-next] net: ipconfig: move ic_nameservers_fallback into #ifdef block Date: Fri, 19 May 2023 11:32:38 +0200 Message-Id: <20230519093250.4011881-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann The new variable is only used when IPCONFIG_BOOTP is defined and otherwise causes a warning: net/ipv4/ipconfig.c:177:12: error: 'ic_nameservers_fallback' defined but not used [-Werror=unused-variable] Move it next to the user. Fixes: 81ac2722fa19 ("net: ipconfig: Allow DNS to be overwritten by DHCPACK") Signed-off-by: Arnd Bergmann --- net/ipv4/ipconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 202fa1943ccd..c56b6fe6f0d7 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -173,9 +173,6 @@ static int ic_proto_have_if __initdata; /* MTU for boot device */ static int ic_dev_mtu __initdata; -/* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */ -static int ic_nameservers_fallback __initdata; - #ifdef IPCONFIG_DYNAMIC static DEFINE_SPINLOCK(ic_recv_lock); static volatile int ic_got_reply __initdata; /* Proto(s) that replied */ @@ -668,6 +665,9 @@ static struct packet_type bootp_packet_type __initdata = { .func = ic_bootp_recv, }; +/* DHCPACK can overwrite DNS if fallback was set upon first BOOTP reply */ +static int ic_nameservers_fallback __initdata; + /* * Initialize DHCP/BOOTP extension fields in the request. */ -- 2.39.2