Subject: [net-next:master 44/65] 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'?

From: kernel test robot <[email-masked]>
Date: Fri, 14 May 2021 08:43:07 +0800

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   ea89c862f01e02ec459932c7c3113fa37aedd09a
commit: a3c02e769efe66dce5e2c716862b60c8d44d191e [44/65] net: bridge: mcast: split multicast router state for IPv4 and IPv6
config: m68k-randconfig-r006-20210514 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=a3c02e769efe66dce5e2c716862b60c8d44d191e
        git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
        git fetch --no-tags net-next master
        git checkout a3c02e769efe66dce5e2c716862b60c8d44d191e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email-masked]>

All error/warnings (new ones prefixed by >>):

   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);
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +1743 net/bridge/br_multicast.c

  1729	
  1730	static void __br_multicast_enable_port(struct net_bridge_port *port)
  1731	{
  1732		struct net_bridge *br = port->br;
  1733	
  1734		if (!br_opt_get(br, BROPT_MULTICAST_ENABLED) || !netif_running(br->dev))
  1735			return;
  1736	
  1737		br_multicast_enable(&port->ip4_own_query);
  1738	#if IS_ENABLED(CONFIG_IPV6)
  1739		br_multicast_enable(&port->ip6_own_query);
  1740	#endif
  1741		if (port->multicast_router == MDB_RTR_TYPE_PERM) {
  1742			br_ip4_multicast_add_router(br, port);
> 1743			br_ip6_multicast_add_router(br, port);
  1744		}
  1745	}
  1746	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email-masked]