Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp17341pxj; Thu, 13 May 2021 19:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziV4MqDJ65d1pO4Rg25xiMosbzEtfEGqdfEDDx4/zkoLpp5AUbYBxZj35YI+kmmqV2WbKE X-Received: by 2002:a17:906:e10f:: with SMTP id gj15mr7815990ejb.434.1620959440055; Thu, 13 May 2021 19:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620959440; cv=none; d=google.com; s=arc-20160816; b=rnRHQXmU25NGzr70IeYhnTLFOxltv5DMZQvinI46YzO+af67k0H5vHPK9oLI73hKlB EDcaS+cERqP1JSiiDfH/D8VaX2VAzkj1kS7IBI5vUudJsnhXCo15sPkeuR5hwTHaM+eT JrZuhbmmW43SAmQRL8nFGhHKMSWx28NiLF+RVqAJS4xtVGzHtJz4TNsD2tayHLGmpC41 Qpi7tkp3HT8VpBL5YhfPVp/c3b7fMW88JE9bwpIoKgBaQuXfvtTQ8BCXwi1oGafD3Fvo ToV/LXSCZCCPsPHaxbCSvVbzSzj4VFB8QRVpDjXoc3KyRSwUC/c41oSuPF5yIrYo5+eb sbmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vf/w0gIA31yDofWDFARiKyZ1Z+Y8XK+6F1QRv5/kfU4=; b=M81g9SgOclz4blRquKDtURkOQ5lGbgxyw8J16isk94suUXzoOSQpxvb1mE5EHJ0W27 BFdG4u5a7TzS8cwCCPnwvqyfVncyRBwJhshDdU7uXgedjQauoo8waPqFzp879ZBDjlcQ wJp5as2ffSeCiOm5b/qzAZeRYfAqZ8XycJMHWLd1Ca7Bkmf5sFmrxeF/DYMnPKlzSDBu uWAAWH1FtNzHSgVeBE0dZ1l6yinK3IntnTSxa3a/YKRzk3RCH1Hz9J2dfmZFLfJmXD0c 3ZhJR8HrmMKLyFhe1WUNtbbYLQ9g0SLXHTIyLan+ahVF1igu0cVkFozJDxqmweOibB75 xODw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si4457392edw.358.2021.05.13.19.30.15; Thu, 13 May 2021 19:30:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232212AbhENBzF (ORCPT + 99 others); Thu, 13 May 2021 21:55:05 -0400 Received: from mail-ej1-f51.google.com ([209.85.218.51]:35595 "EHLO mail-ej1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbhENBzF (ORCPT ); Thu, 13 May 2021 21:55:05 -0400 Received: by mail-ej1-f51.google.com with SMTP id m12so42540277eja.2; Thu, 13 May 2021 18:53:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vf/w0gIA31yDofWDFARiKyZ1Z+Y8XK+6F1QRv5/kfU4=; b=WmLNMnnE3vOtWOsu/xxqAn62x+VJI8bbm3FhP01TxgjzD/1vG5e4zDX3GGyo389zOt hz4ADJgSSXpFtFAmePOa8L8d1iF4Kiz2H8X3+305rumCXo65pBCebEwA3tnIyZolRBYU fGAMPtp8LesvD6YgMU6BZOgtYbjOJVFl2/DWG+CKgbhGvJFhBa38gUGafpW0S5KTQWGP +a4t8VgC9ltafuu0iU/MBCL/PJrH742QlYkO8AghlIMXZnMKOfgDH1K1YjtjR/j6uIPB SZQJcRsQPokRUorTXX9bKgONph0GK8sOZa3rlDk6El4FT8/2kghfwgufXILVJrSsWEGv XEFg== X-Gm-Message-State: AOAM5314rPfvvu+m0ZAZnUQ2KSEqZrwftegHQzYgSUAjoJkBNb1/DeEw CrY7fQjlyAq6tsVuK045L/+bM8gnS9Rr1z3l X-Received: by 2002:a17:907:161e:: with SMTP id hb30mr45346717ejc.360.1620957233559; Thu, 13 May 2021 18:53:53 -0700 (PDT) Received: from msft-t490s.teknoraver.net (net-5-94-253-60.cust.vodafonedsl.it. [5.94.253.60]) by smtp.gmail.com with ESMTPSA id w6sm3322574edc.25.2021.05.13.18.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 18:53:53 -0700 (PDT) From: Matteo Croce To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, =?UTF-8?q?Linus=20L=C3=BCssing?= Cc: Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: bridge: fix build when IPv6 is disabled Date: Fri, 14 May 2021 03:53:48 +0200 Message-Id: <20210514015348.15448-1-mcroce@linux.microsoft.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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