Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp678733imu; Wed, 23 Jan 2019 03:49:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7UtFbI2aFsshvG0S7tUB7sz81M1Mv1Q+Tx7ZGR3xzSyrnYG/kkyGVOcLTUO1JvJGKL3qcg X-Received: by 2002:aa7:8542:: with SMTP id y2mr1767381pfn.83.1548244188991; Wed, 23 Jan 2019 03:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548244188; cv=none; d=google.com; s=arc-20160816; b=pf2F3gyePnu6luer/Gz1O9MIbcnL2ekJ+Xwkt5EnG48QLlVhQnQIn71KhvQQd6VWsV G1mgo+ifQZO29NLQR2ebjxC3US7t9W7zczXJZs7Rrmtvq8NgLhmTJMfYMlwVZJ+GOkCH M62SCfgMzgXmI/HyKkYdwoJhBTddzt6BXEnhEcgQyiUDXBU+ZdkTN1kL0s55oXwJ7szq 5CX1v5TqU94sDDFoMRjhWEdia0dxUdKfkgpwpYWYv0R0ay3a73tw970QM77KZD2eB1YW 1K7jZZEOHMstQQJ12lNUsQvpj8/tiCPvBW680+fPB5RtMyz8LiENXNkV1W+g+V3ocj6b wNwQ== 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 26si16147892pgu.190.2019.01.23.03.49.33; Wed, 23 Jan 2019 03:49:48 -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 S1727308AbfAWLsQ (ORCPT + 99 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 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 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(-) 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; -- 2.19.2