From patchwork Tue Feb 2 13:55:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 12061885 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16FB5C433E9 for ; Tue, 2 Feb 2021 14:38:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5A7364F50 for ; Tue, 2 Feb 2021 14:38:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234676AbhBBOiQ (ORCPT ); Tue, 2 Feb 2021 09:38:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:51352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbhBBORr (ORCPT ); Tue, 2 Feb 2021 09:17:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2DECB64FC7; Tue, 2 Feb 2021 13:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612274152; bh=mfmlJHMI6yFr64wRzHKtS4W4P42yrVgDCbbvPMoKAGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoxQLkdyV4FP7VWWxxoG8/TpmyzxT3yA3k6n03uZ+AzksrQbhchiBrL0NhXvDFzxX J/BnHcIiixqzcPJO7TacexxGvlXOdn00VtjHzki3C3raoE4xhGBL86KpbCu7aXaeJL jLkaVvgKWAuW20Vwh2Y8OR8KgxpN+ytCs5eaCwF+RZfhB2RM4xQrDN8xIqJqE7Qv86 Ppmb4ReBz9zdnjA3O1akQqkydM7SMnhyBMuNCtugT7gbn3F5AwXY1Psr1Z8wEUesqe 0NEpzOHWKs0rCYV9WDdyX1pAdrMm41aVkB8RjJSHkiun5AMUjYscnP0VDpU9TIKQxw KvUD2zgyqsnHQ== From: Leon Romanovsky To: Jakub Kicinski , "David S. Miller" , Pablo Neira Ayuso Cc: Leon Romanovsky , coreteam@netfilter.org, Eric Dumazet , Florian Westphal , Hideaki YOSHIFUJI , Jozsef Kadlecsik , Julian Anastasov , linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, Matteo Croce , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Simon Horman Subject: [PATCH net 1/4] ipv6: silence compilation warning for non-IPV6 builds Date: Tue, 2 Feb 2021 15:55:41 +0200 Message-Id: <20210202135544.3262383-2-leon@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210202135544.3262383-1-leon@kernel.org> References: <20210202135544.3262383-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky The W=1 compilation of allmodconfig generates the following warning: net/ipv6/icmp.c:448:6: warning: no previous prototype for 'icmp6_send' [-Wmissing-prototypes] 448 | void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, | ^~~~~~~~~~ In such configuration, the icmp6_send() is not used outside of icmp.c, so close its EXPORT_SYMBOL and add "static" word to limit the scope. Fixes: cc7a21b6fbd9 ("ipv6: icmp6: avoid indirect call for icmpv6_send()") Signed-off-by: Leon Romanovsky --- net/ipv6/icmp.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.29.2 diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index f3d05866692e..5d4232b492dc 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -445,6 +445,9 @@ static int icmp6_iif(const struct sk_buff *skb) /* * Send an ICMP message in response to a packet in error */ +#if !IS_BUILTIN(CONFIG_IPV6) +static +#endif void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, const struct in6_addr *force_saddr) { @@ -634,7 +637,10 @@ void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, out_bh_enable: local_bh_enable(); } + +#if IS_BUILTIN(CONFIG_IPV6) EXPORT_SYMBOL(icmp6_send); +#endif /* Slightly more convenient version of icmp6_send. */