From patchwork Sun May 13 19:48:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 135657 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp906127lji; Sun, 13 May 2018 12:49:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqOV1RpIWCvn/tUFXn+XF+t36eg0fjnJBWCaTDiOLTaP3RWZr0zo0gHDyCtJoBm4xQ4KPde X-Received: by 2002:a17:902:8a87:: with SMTP id p7-v6mr6783315plo.278.1526240996943; Sun, 13 May 2018 12:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526240996; cv=none; d=google.com; s=arc-20160816; b=wbBStmEkH4Zj3QYIaVY2PapXBztT6U1+dtTIn88pOVq2WEUsUu2NWllq5v1IqioDNG d81X67XpvCNbHR5FL9WJXJTkyHOFDqd19x6a+0eBBz1nU9l35BR6sntyBMd6942oMoF5 jQEp/4cQ1DEe+aOytoMoxMCjzntRmo0wHYpOpTp0Wb92zIg6k3rxLEaM6uRxYbZLKyNa 7Iq0L0QuirsQevnbbtx7JhIMHcrNa9OdfyvogYIjPnNYtqaHR/InAvhDgmF0TwWvlX3/ rtUFuWRUFUT6kyJOAH8aKALi3CmVKmrmr4lwyDZalV4wUnH+mkrtclNcF90wVYEqx3E/ yrgg== 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 u15-v6si5925077pgv.355.2018.05.13.12.49.56; Sun, 13 May 2018 12:49:56 -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 S1752006AbeEMTtw (ORCPT + 29 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 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(-) -- 2.17.0 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)