From patchwork Mon Jan 28 14:04:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 156746 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3463279jaa; Mon, 28 Jan 2019 06:04:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN70uZjznkcyt/F2mORH5v0tUbUE2JMxzQajhnvMjRLgAwhoEA/ZBbD4OwG1uIE8X3MHY+wL X-Received: by 2002:a63:a553:: with SMTP id r19mr19822565pgu.53.1548684267097; Mon, 28 Jan 2019 06:04:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548684267; cv=none; d=google.com; s=arc-20160816; b=QBZ/SW5eXZX7/gmepOhXYc9FYq4xlrKHt+fSAk9gxbpo/uv1x5sRA7/aiauO4Teg3f Try7LZnCwdF61+Y+8mjSicQ8mP1RL65drC93JjuHbA2yaEieJsM+czLO7zUhhVPH0CxH R2bX5hq4adYh498ll/d0xRuc6DhAFZucq/R5REZ2uTUH9A1kxspjjKO/3VEIz0zv5vk9 3Mzk3/cDIwJYFvOtDcPUp8kGb2Ot7V5yzcC/pDMTPMDay2xqQARHDlz8T4izBgyCdOb1 UhOCWtv9Q1CcLrlfmwMwNzGZb3mTHYG7s/i8TXqN7b63S2xTcUAreee4qn/5OClxwPaC pguQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MMDYNU9cjCVw3ZuwdGV5OFw9B8R3HQGPS+ToZ8mNdRQ=; b=wK7uNgBBaviXkVQ5MnVSRTZ5Mh4F8LGTryJqzi29TrkUvkqGX/ZZrTwg/uRXSYQTJT 5k0HrC1YKac8hqALY4fVlx2BBIB05OZkUp639g0S1v/VXMaOaz0ayKASZaiiYow5Evle VGIuP9UccaNKmtuHPFp2WtYPhZ8LM/RYLzT2M0SAs3gsUFs3coCr2igAmeEWH4x3hTYL 3YEtw2hN1BZfzFPxAfXEkzQ0wTqcEWLBDMYVAsuzQ0hTZ9UITOU2BVlZ1EAGjVQME/O1 WQD0fQFFsOQyNZ0MWR1soz1t0bHJ9Ssp+92/zztwUxiCdPr8ssXfAFotHKiL1FIO2sJs Ke1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si22964678pgg.274.2019.01.28.06.04.26; Mon, 28 Jan 2019 06:04:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfA1OEZ (ORCPT + 10 others); Mon, 28 Jan 2019 09:04:25 -0500 Received: from mail.us.es ([193.147.175.20]:35448 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726945AbfA1OES (ORCPT ); Mon, 28 Jan 2019 09:04:18 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 92E2D2D9AEB for ; Mon, 28 Jan 2019 15:04:16 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 7E26FDA876 for ; Mon, 28 Jan 2019 15:04:16 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 7D0D7DA872; Mon, 28 Jan 2019 15:04:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50, SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 8CA4EDA864; Mon, 28 Jan 2019 15:04:14 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Mon, 28 Jan 2019 15:04:14 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from salvia.here (sys.soleta.eu [212.170.55.40]) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPA id 5901A4265A2F; Mon, 28 Jan 2019 15:04:14 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Cc: davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH 7/7] netfilter: ipt_CLUSTERIP: fix warning unused variable cn Date: Mon, 28 Jan 2019 15:04:05 +0100 Message-Id: <20190128140405.15020-8-pablo@netfilter.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190128140405.15020-1-pablo@netfilter.org> References: <20190128140405.15020-1-pablo@netfilter.org> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Anders Roxell 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 Signed-off-by: Pablo Neira Ayuso --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 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;