From patchwork Tue Nov 7 14:11:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 118173 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4028140qgn; Tue, 7 Nov 2017 06:12:48 -0800 (PST) X-Google-Smtp-Source: ABhQp+S//R1MwVLkIIE5yv4NnVZVoW0vLEuFHmwunCqYdmM8dMa89xrF53/odKyC2+0RtdRsi0+2 X-Received: by 10.159.247.12 with SMTP id d12mr17666580pls.265.1510063967913; Tue, 07 Nov 2017 06:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510063967; cv=none; d=google.com; s=arc-20160816; b=07ffEUU5pFFmKs898QSy0hVRwBCpNRViZaWTlxALcRTMUrWtHzOnzzScnMxaTfP2Ea cRXAMFdVSSlSro2j7A2lq+0qI9WOgDrpHRN7iZckrvIYMTEDFiMv/lMg/FHelqpsIkgU x7ri5FlcKm9dR+GdWMe22yUg1R7Y/25gBNY3Etu/eJeAM7f/g20RjdnRAIlVmfC+F+pQ xFqcZd7rKJuwWX2eQydv261upFlUYIvWEIXcbU5fKA5lBoEU+0OpnLRyee4CGpWNv/B1 yWWYyd+RDaJiXLzVIviEmYLxzX9lwx7Wc/3cTgb+nstu4eksvU4gaOEx096eB5Z3lRWx rSaA== 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=ZD8gzYrUTbbK34+4sM3RJDC+cV6YbnC394Ba+Anws+A=; b=nwY07477+NQGXtF6HqsHbPTljug5ZQsO0b8TcW+SYMdPso0SqEjYwlHhcfvF/21CTu YnNgCdpyu9ui3Al44PS/IkShOrutZ9XHcPQAoePDcpb1eB1ZsbOgU8jGTEDFCvXRALBk pGGXR9IOgZc05NIficIs9y499dY8Q7sZt+rz9BTqkUCUIi/PLtypZAOXYnjUYfoeztZ+ bg15+av02zQdgWzlIZLvphH7doYT2A8nRJLnqBtZZqibYXYM6NSN3m6LhnyHymv5po1K XsobZXGsudErk72mHaE3oDvaUQ7YKn2SUukWpQ83vVLi94ECuGi8h+TtW9C/zPrP3cM+ dOtA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si1268097pgc.807.2017.11.07.06.12.47; Tue, 07 Nov 2017 06:12:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934116AbdKGOMp (ORCPT + 26 others); Tue, 7 Nov 2017 09:12:45 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:59507 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932671AbdKGOMl (ORCPT ); Tue, 7 Nov 2017 09:12:41 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MJYNz-1eEXJx3Ylv-0035Ep; Tue, 07 Nov 2017 15:12:19 +0100 From: Arnd Bergmann To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" Cc: Arnd Bergmann , Liping Zhang , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [net-next] netfilter: add ifdef around ctnetlink_proto_size Date: Tue, 7 Nov 2017 15:11:51 +0100 Message-Id: <20171107141214.3312784-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:svYX8Q0P2iN7NJbaTabv7tv3/iay60Ywq3/m87XKbDccCL8FVY1 QWuvUe+yELYq+2toUDNJaasIAFfLXyCLNYvpJSyNA8LvuO+APJJFwOiHXJ3sCKdKAvrfgGI oVycSqM1dJnIcC9N18OnqmN8xcOzUVh7qoHyK8b1LMFyh88MhAgYr0WJG3fXkys0CnMxAJy JbFG7nTz4Y6alyCFQP3Mw== X-UI-Out-Filterresults: notjunk:1; V01:K0:JEXLqNpP/no=:GpIby+mZL4S1Gm76A7o+rA rUZg+Ou4qI5Mgp7B/4w5yCTFk84dGwIwW3mbZlT283KyvjYmGR3BzDICv8oPR/SSaBnzq/D8U W8U0yGvcK26WL+ZIFFttOLPp1M8M6Ddt+cBX/44zaY84oN87a8knlBUaoVRJBa9mVF4nyi5c3 9jyIbFWMYZdkbaSkVVCvau/UMv6b4PksbJltNxMu0gWbuTqP5O9ySIl09vDlo+iQuyWpzJpK6 Z3QXE9rISPziRUrwxvoY0LmZPD3qAY9imbf9ZrEQd92OypUZqcZkx5I0ZXk1Z2S0pVdzUMZ53 sgn1f92ud+XbNAWKA4FCQ/3PUvw1COkDfIXnk5fvh8qyXPHdFsMgPHl0eI8igGpGKb+h9Qvax F9ZIYEOMV5O3NJsHziZHkRVjmSTUKEqe1OaypMf11qcZY8cy3hxkFPL4vws/YRm3K5xJDVVEW ChnfTul6eXqMOfFlGhAlP7aBJChLsQvw6Z5DqsGYccpQQdLiA0mJ5j1rvX4uP7XLx284rnDY0 29kpIhIKIl7ID/BMFu3/mUR/vLBsY9HRGeLT1sUzZnXYbn1BIenYYheChXLHVruN5NSizj6NN kTxSqXj+iKC+1bYd2MfQgobSteoS2fDH4I0S5RKebgHuM3F2qu6kDi2QTJazGd6BgWRjYm5O/ vUQn4+CGNtMpcyrDLQs1tvovtryOfUjCo/X+cuyqU8kay6RVKeVKJ6Tuxzs6P56cmrZqDQg+V tcCEtpLmems1HUI5hlDV5T1r7xMgm+tMc6+Cbw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- net/netfilter/nf_conntrack_netlink.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 6e0adfefb9ed..59c08997bfdf 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) {