From patchwork Wed Jan 23 11:48:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 156369 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp625689jaa; Wed, 23 Jan 2019 03:48:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN5DqZE77VKp2FozvAYlHeGcpgStYbirvoCx6BQq4yyovou3bOdvw1X5wQQSWrNWLx1wcATW X-Received: by 2002:a63:8ac4:: with SMTP id y187mr1694382pgd.446.1548244103009; Wed, 23 Jan 2019 03:48:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548244103; cv=none; d=google.com; s=arc-20160816; b=bLrL494oSMXOoArehPjFzbKcPAxGWFpbPkfTp5yRGTia68KBHl/Yb4cX8lgoinFGfG E7EOSmN2syN9uRGc/JEHzoMveaoKj2ijY461wHiMYZ35KozG+LWQLDxWPlH/M7jXqaNK cmvTn2HG9VL0gfLJ9i2HRu7y/wNm8zc10FHLrMCzfAj3ZJSWL4y/FsPlfoEfGvFndoz5 22q5K4w5tL1oBFXu5yPgVcNFbLlsIWNfUlfTUnSvmnGEJZWPADOB2o3lzw5TSwcQIFDE 5dM4JfKM7N4fkXwMhXd9qZtOudAeDWQgBVK7mYFZH3XBLP6w9MjW1/iPkbYf4Znq7tZl ubGg== 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; bh=/fB25Mi8HKeuwdrx1ZeEDd3u/unirlpp2EU8uchWpDE=; b=RduENQLUvF6OyB5jnIDzOw+SHO4t0bVbAfdvDgprN84Qpvl/Sll3KzXqYp31klMHIq O2cIsiKBJo8wexLBPQhRzbK43FAWWQ3k9AweDnLiVwI7s2IyKbrA4ahxUmC121UrCZyR md2CboVBijF8COvI/R14p28N4e3781jbfzRcdWN3O/9onaRdMX7NFsPUZK1pmsejrbJl xw+b3YxewuyUaU/kxGItMvuDlH4bqGSKMv05856UhpSogEOZ071uBNmW/cGN4cLbEv37 ofScEDbGTomjsaoSf1mBpZbn2al7d7UAn4PWq4tRejhJSPppRmWM7pWrj1SE6GMQfUaH aQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LhHW/38w"; 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 o11si19480707pgd.234.2019.01.23.03.48.22; Wed, 23 Jan 2019 03:48:22 -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; dkim=pass header.i=@linaro.org header.s=google header.b="LhHW/38w"; 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 S1727347AbfAWLsQ (ORCPT + 31 others); Wed, 23 Jan 2019 06:48:16 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34848 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfAWLsP (ORCPT ); Wed, 23 Jan 2019 06:48:15 -0500 Received: by mail-lj1-f195.google.com with SMTP id x85-v6so1667061ljb.2 for ; Wed, 23 Jan 2019 03:48:15 -0800 (PST) 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=/fB25Mi8HKeuwdrx1ZeEDd3u/unirlpp2EU8uchWpDE=; b=LhHW/38w8iE5FnzbPO2Nzy5p1roWV0h35xT95QmAE1MTqcTeu0UC0c9O1TmnmeJAEs FZJIRj8etXXhjq4CMuJh+Gh47h39pX7PnQAfYkjsICcw2ixT7S34EtV1LlYWbIVAhkJq +w0JYisVOEEaInQkdizhEllCi5z2wznhSmGzs= 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=/fB25Mi8HKeuwdrx1ZeEDd3u/unirlpp2EU8uchWpDE=; b=JTV2sOy2Waf3rKNaa2sWrS9hii39UvNIKd6mvOi69Jbgj167nWKhdBNa3JMsX1XCsD soTybxHXYOsfuTyBDkwIlXslYJHL4w+M6e4zCxybsC36I/elSTGCVqAkqGoZJ7g/XUbv UXaTjlTxxwkpCYFoykMoqSPgMaThDSdGF3h5mo7rkPpKGrVQesak1+TljydqkJ0qfMZe Jph23uSy4kEskPaW+v8Fl9W4HqEA0oYJchXAXZvHbwdlJq4EkTtLNOOpePYy3OHbIqu0 WCGpTMdc4nwn/c3Dd5v37YQelknRKRiBrqM+ao7F+/1Ovoo6fONJknelzJGZrEfF/3cQ NYaA== X-Gm-Message-State: AJcUukdvSE60zxWtPpjRua8TmVSbVLdHplmm8nguUy+/2JvEgntMgCal x9+dpudFMUS6m5WWA4s2wmpojqSyuAaS5w== X-Received: by 2002:a2e:9595:: with SMTP id w21-v6mr1630868ljh.194.1548244094029; Wed, 23 Jan 2019 03:48:14 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id q8-v6sm459760lji.69.2019.01.23.03.48.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Jan 2019 03:48:13 -0800 (PST) From: Anders Roxell To: pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de, davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] netfilter: ipt_CLUSTERIP: fix warning unused variable cn Date: Wed, 23 Jan 2019 12:48:11 +0100 Message-Id: <20190123114811.25388-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.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 the variable cn isn't used. net/ipv4/netfilter/ipt_CLUSTERIP.c: In function ‘clusterip_net_exit’: net/ipv4/netfilter/ipt_CLUSTERIP.c:849:24: warning: unused variable ‘cn’ [-Wunused-variable] struct clusterip_net *cn = clusterip_pernet(net); ^~ Rework so the variable 'cn' is declared inside "#ifdef CONFIG_PROC_FS". Fixes: b12f7bad5ad3 ("netfilter: ipt_CLUSTERIP: remove wrong WARN_ON_ONCE in netns exit routine") Signed-off-by: Anders Roxell --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.2 diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index b61977db9b7f..2a909e5f9ba0 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -846,9 +846,9 @@ static int clusterip_net_init(struct net *net) static void clusterip_net_exit(struct net *net) { +#ifdef CONFIG_PROC_FS struct clusterip_net *cn = clusterip_pernet(net); -#ifdef CONFIG_PROC_FS mutex_lock(&cn->mutex); proc_remove(cn->procdir); cn->procdir = NULL;