Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3500174imm; Sun, 13 May 2018 12:50:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZozwk9JJl/I40Z9jVVcEvUtOnykW1yAWzRmO7f2VthZenlB1u3VuR7Ry+adqvvT2JremeNs X-Received: by 2002:a17:902:b949:: with SMTP id h9-v6mr6922694pls.146.1526241036453; Sun, 13 May 2018 12:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526241036; cv=none; d=google.com; s=arc-20160816; b=btDQiK5CegdKxZLTIKDUiYD0+fEB4LYu0QOStsKbrb44FU4EGJjiQRKZ/GD0WsV8Ws l8pb9telwUFM6aniCCXkb/9P5aYc98OY+AKTqkMV2rFSZeF9h4wnVG9Oju4zFVHZbtbY JPGV+1Oq42TilGu+qHMyZu4obTQPz4jq2jpHMWaW3Hk3NVkuhGOURN1V2mewHJor2k0C zn1QI7OiEFTZRIaHNBlseeNSjA65gYBeph7iiC7iM9m6eBuDvzQVpflkIU+VCxM2i3sj asLBK3F//A7ABSnP6ZJvqHY7eDWYi2PpJfhAO4gxJy9Vq2JfkBGT7/B3nM9MgHGhbWIg iDuQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=jbmB/DUYw4Xj9drjUxOoKx8oQEnZXlRrqi9+thVZCx8=; b=gPMDNN2ntIXrb0yWcwVi8KvG32Hlqzzo488GrT5xY5xJ2qSvVBuIJe/D/tSDPKUrVG 6Revka92FLF0O9x2WE7Mk6OrC+RvTIz5HeeRfiQeMHYPI59TrQkqq2tER0aXVRuqTctp LLJFV2NMaP5UexZzY89aTETY1DUeZcsMvO7HNPJJIjj/N+1y5AFDYir6twLaKDU5Hwqr 1CrEAYmzLI5fKAJRLdl9pCbDnjyUGxwOr7CrfYrg2smkiju1xntHnkqHK4uwvbmqKbuR UOsTNA0b6UnTeeS/xDpmqoPDvzImWnQEM5Kf5Fy8Lz06Eo0kL3VEmStHK3+4B7h/OZdX QlXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iq8mnbmF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x11-v6si8469645plo.41.2018.05.13.12.50.06; Sun, 13 May 2018 12:50:36 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=iq8mnbmF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751992AbeEMTtw (ORCPT + 99 others); Sun, 13 May 2018 15:49:52 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:45866 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbeEMTtu (ORCPT ); Sun, 13 May 2018 15:49:50 -0400 Received: by mail-lf0-f68.google.com with SMTP id q2-v6so14855441lfc.12 for ; Sun, 13 May 2018 12:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jbmB/DUYw4Xj9drjUxOoKx8oQEnZXlRrqi9+thVZCx8=; b=iq8mnbmFiAm+aMT6L8jOZISlRU1q6tR1tfNjnIgv64ho9tBikxQlFgw5G42/yFD/lS rt0q+E3WsMedn3zrIsdPAF5Ka7eJlCQ7cCYsfIqkKRVK6/vlTXp/XSpg2L74kk7k6nau bEifsaOyGGwQ/BWrEGZGNYLE/dGb8zUIdZvPs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jbmB/DUYw4Xj9drjUxOoKx8oQEnZXlRrqi9+thVZCx8=; b=mROz6X64qnCAR4/zhpO1TlwzcrgZVyK2S7PzpgG+GmniYdFrr3YUp9dzwDhrvsJghx ciBBOOzq1/Q6Lfw07y8ESVcyLVFuYFrro2CSss13YSDKyN7kI6bXaxWTct6cmg5EBT5o avSFpSqoNLTJmRj+g5/4OeVbsSzIlefp8tzRPsj9/NJLkOPLZFSjb1J6cD6BXY0XIoRD 9XPYMzyWyX3w5LYVi+XXrLmCTj/mrRyPpg5oK7A7KszyjQSu4rmdtU9dsdnqOCgXixpW xa8HjerrAF0wGVVrtx+gxzobkGpxEyqS0r6J3JTIeD4OGjCPJ+RGSqZNk6pE7r3RzNUo Mtzg== X-Gm-Message-State: ALKqPwegsAxDdKPO4MC5s5dy6icV7ydaPSeNetM+arNftYrBH52ZDAlO Eeyn3i6+UZZaYnvxcYIkgkqEYg== X-Received: by 2002:a19:1294:: with SMTP id 20-v6mr6864659lfs.21.1526240989165; Sun, 13 May 2018 12:49:49 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id c26-v6sm1959560lfh.25.2018.05.13.12.49.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 May 2018 12:49:48 -0700 (PDT) From: Anders Roxell To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] net: ipv4: ipconfig: fix unused variable Date: Sun, 13 May 2018 21:48:30 +0200 Message-Id: <20180513194830.29946-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PROC_FS isn't set, variable ipconfig_dir isn't used. net/ipv4/ipconfig.c:167:31: warning: ‘ipconfig_dir’ defined but not used [-Wunused-variable] static struct proc_dir_entry *ipconfig_dir; ^~~~~~~~~~~~ Move the declaration of ipconfig_dir inside the CONFIG_PROC_FS ifdef to fix the warning. Fixes: c04d2cb2009f ("ipconfig: Write NTP server IPs to /proc/net/ipconfig/ntp_servers") Signed-off-by: Anders Roxell --- net/ipv4/ipconfig.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index d839d74853fc..86c9f755de3d 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -163,9 +163,6 @@ static u8 ic_domain[64]; /* DNS (not NIS) domain name */ * Private state. */ -/* proc_dir_entry for /proc/net/ipconfig */ -static struct proc_dir_entry *ipconfig_dir; - /* Name of user-selected boot device */ static char user_dev_name[IFNAMSIZ] __initdata = { 0, }; @@ -1292,6 +1289,8 @@ static int __init ic_dynamic(void) #endif /* IPCONFIG_DYNAMIC */ #ifdef CONFIG_PROC_FS +/* proc_dir_entry for /proc/net/ipconfig */ +static struct proc_dir_entry *ipconfig_dir; /* Name servers: */ static int pnp_seq_show(struct seq_file *seq, void *v) -- 2.17.0