Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp290965pxj; Fri, 14 May 2021 03:38:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6i57JVqRnRv1PGbCaduQYvEE6z2+zYIHVAnaqW+fs2MqIaU1nWy3n7jk/c2LnTbaxhKGp X-Received: by 2002:a17:906:bc8e:: with SMTP id lv14mr47911908ejb.418.1620988700802; Fri, 14 May 2021 03:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620988700; cv=none; d=google.com; s=arc-20160816; b=YwLbh3bnug1lfy27wNQ8AE6wVp5hxcBYuLE+A3tOE9nYqsn2Xa8SuIQqoBiXBX6udS NIsntNf8ReAm1bBfAJY+P0fOfwZrL8SjSEsmIWulQ6NhmobVChly4XOhzdfF6pp6fuBb 2TAyWrSvBpxsBInNQSIISC1XCY9iis6bVks4fYcQJt2a6Pyaw6FurJS8GXbq4wuOiwXw qU8TKvLM9WIRo2JZKG7SzVGVANWUkJYUsMXRoYXVQC77AHUd9DXIQ0UkWi+cM/iXQnOT A1QENYRisJbPKeO0Y9nNakBjlPjKtxpYAPZC5WULJmr8fqtAPZMUgGmujmlcBVmJmfV1 1STg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9RsAQGoPUul2G+Td51d4immefuACSkojntKg29kEj3M=; b=SxPeqqUD0j7qSPqPjbOviCcPIZtwuqa+tvUrnxgmHjBGsru/ueo8i56SDtCALqn3Y2 jkJjDuZ/Oauv9QdfIWF1LsTNlb6R5R+9Hok3qdW97jqKa7JJcdwgubbsPcWNFynM5Kej sC/Vzap8js2YETRrcEQU5jZucIoIH7+wrjnzgA4+gWqmYJi7I7o0CQL4ThUNJF7CokXs PKFkFNASKQIOJUjuKs13sOMQkZj1GsjDgEVedYZGUZ4+L/zPv3gKCBr+3lbewLxcdufK KpXMhTekhgfrQCTY2NQzKa95f7CPUdsFtePJC/B8X6+6hPoElvwt0mbSGv/OoAjoGiyC mXDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si1156192edx.232.2021.05.14.03.37.57; Fri, 14 May 2021 03:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbhENJZg (ORCPT + 99 others); Fri, 14 May 2021 05:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbhENJZf (ORCPT ); Fri, 14 May 2021 05:25:35 -0400 Received: from mail.aperture-lab.de (mail.aperture-lab.de [IPv6:2a01:4f8:c2c:665b::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB439C061574; Fri, 14 May 2021 02:24:21 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A01813E942; Fri, 14 May 2021 11:24:17 +0200 (CEST) Date: Fri, 14 May 2021 11:24:14 +0200 From: Linus =?utf-8?Q?L=C3=BCssing?= To: Matteo Croce Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: bridge: fix build when IPv6 is disabled Message-ID: <20210514092414.GD2222@otheros> References: <20210514015348.15448-1-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210514015348.15448-1-mcroce@linux.microsoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Last-TLS-Session-Version: TLSv1.2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 14, 2021 at 03:53:48AM +0200, Matteo Croce wrote: > From: Matteo Croce > > The br_ip6_multicast_add_router() prototype is defined only when > CONFIG_IPV6 is enabled, but the function is always referenced, so there > is this build error with CONFIG_IPV6 not defined: > > net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’: > net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration] > 1743 | br_ip6_multicast_add_router(br, port); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > | br_ip4_multicast_add_router > net/bridge/br_multicast.c: At top level: > net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’ > 2804 | static void br_ip6_multicast_add_router(struct net_bridge *br, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration > net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here > 1743 | br_ip6_multicast_add_router(br, port); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Fix this build error by moving the definition out of the #ifdef. > > Fixes: a3c02e769efe ("net: bridge: mcast: split multicast router state for IPv4 and IPv6") > Signed-off-by: Matteo Croce > --- > net/bridge/br_multicast.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c > index 0703725527b3..53c3a9d80d9c 100644 > --- a/net/bridge/br_multicast.c > +++ b/net/bridge/br_multicast.c > @@ -62,9 +62,9 @@ static void br_multicast_port_group_rexmit(struct timer_list *t); > > static void > br_multicast_rport_del_notify(struct net_bridge_port *p, bool deleted); > -#if IS_ENABLED(CONFIG_IPV6) > static void br_ip6_multicast_add_router(struct net_bridge *br, > struct net_bridge_port *port); > +#if IS_ENABLED(CONFIG_IPV6) > static void br_ip6_multicast_leave_group(struct net_bridge *br, > struct net_bridge_port *port, > const struct in6_addr *group, > -- > 2.31.1 > Acked-by: Linus Lüssing