From patchwork Wed Nov 15 17:28:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 118986 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp3761966edl; Wed, 15 Nov 2017 09:28:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMYUVZ6m05LQNIWD/IxVRuAGDlP+tksZaOCF6Yn81wrWUhPuoeMSv/OX5QjO4WhjdGnIAP4i X-Received: by 10.84.235.137 with SMTP id p9mr2893059plk.291.1510766918476; Wed, 15 Nov 2017 09:28:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510766918; cv=none; d=google.com; s=arc-20160816; b=heJzfgognVfxVZW+0LkewI7NDkN3xtPCiCeRXDHieCy5WMHqNR1e0OgFn4QKF7YXoF xUg7l7cpU2R3H50LaWzuVesN7UL5TpFBRVAp2UmCLoEW3rN/NxdNqn3qzgu5nPZ/B83Z o5VfM2ki+3UOveicDJGpcSmK/91yWaMZo4IcU1W9t/yZ/W9uJ7HWrCWBXSPBJl+Bi9zG 9d7kLeEEKJtframI4pqn8kqfxoCo40NmPTKnkZ+oybxC9Kmr/LPn1kKtJ5Bzq/dma16u 1WrS87xIsLq98wMkO+SnGHAzC2qthlI41lPP2lU1fDh4HOqqgjWMrgIRHAtghFdFvXvP jADQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=k7H5APzQDumgrwUUX8kl3uFK3XatniaUhWtylNP0u0g=; b=tnGqstuSPOgrUdeAzKPUAjsjmtJejRFLXRro3HS+rFJ4Q0Q/j3bWLh58yA6PLhhxdY ABh6EZuBJxCSFkFA7HClhDe6kf2ub6dhyJruLsmXVUaIRjkSnAZEClRrpZ4/Lef7P5+5 X3Le0gdOk6yr1WcADKTp1YqIHvYDsVwqjHvlWX3eJNtJqrf1pVIMjGGkBlYIAyU1tTKp 8HAaRMEDWSZrQc1yzK+5y6yYNrB4/P4e6mSdEmdRCJd+afY6YKBo0eBV+wPSvX3Ld6v9 daL4VSn/kXrcai6XkA2NudBWYbgdXVbYAz4vtwQdcD3+NHa53bgXTLEI7AYspeaLqPig W58w== 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 h11si172593pgp.611.2017.11.15.09.28.38; Wed, 15 Nov 2017 09:28:38 -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 S1756639AbdKOR2e (ORCPT + 7 others); Wed, 15 Nov 2017 12:28:34 -0500 Received: from mail.us.es ([193.147.175.20]:50020 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753066AbdKOR2b (ORCPT ); Wed, 15 Nov 2017 12:28:31 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 4B0B53066B5 for ; Wed, 15 Nov 2017 18:28:30 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 3B914DA812 for ; Wed, 15 Nov 2017 18:28:30 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 31397DA804; Wed, 15 Nov 2017 18:28:30 +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 D248DDA86F; Wed, 15 Nov 2017 18:28:26 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Wed, 15 Nov 2017 18:28:26 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from salvia.here (129.166.216.87.static.jazztel.es [87.216.166.129]) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPA id 7086F403DF98; Wed, 15 Nov 2017 18:28:26 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: davem@davemloft.net Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, arnd@arndb.de Subject: [PATCH net-next] netfilter: add ifdef around ctnetlink_proto_size Date: Wed, 15 Nov 2017 18:28:21 +0100 Message-Id: <20171115172821.8451-1-pablo@netfilter.org> X-Mailer: git-send-email 2.11.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: Arnd Bergmann This function is no longer marked 'inline', so we now get a warning when it is unused: net/netfilter/nf_conntrack_netlink.c:536:15: error: 'ctnetlink_proto_size' defined but not used [-Werror=unused-function] We could mark it inline again, mark it __maybe_unused, or add an #ifdef around the definition. I'm picking the third approach here since that seems to be what the rest of the file has. Fixes: 5caaed151a68 ("netfilter: conntrack: don't cache nlattr_tuple_size result in nla_size") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso --- @David: please place this fix into your net-next tree, it is calming down a compilation warning. Thanks! net/netfilter/nf_conntrack_netlink.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 71a43ed19a0f..96277706b379 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -533,6 +533,7 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 portid, u32 seq, u32 type, return -1; } +#if defined(CONFIG_NETFILTER_NETLINK_GLUE_CT) || defined(CONFIG_NF_CONNTRACK_EVENTS) static size_t ctnetlink_proto_size(const struct nf_conn *ct) { const struct nf_conntrack_l3proto *l3proto; @@ -552,6 +553,7 @@ static size_t ctnetlink_proto_size(const struct nf_conn *ct) return len + len4; } +#endif static inline size_t ctnetlink_acct_size(const struct nf_conn *ct) {