Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Petr Machata <petrm@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Ido Schimmel <idosch@nvidia.com>
Subject: [jpirko-mlxsw:combined_queue 53/60] net/bridge/br.c:58:4: error: call to undeclared function 'br_vlan_vlan_upper_event'; ISO C99 and later do not support implicit function declarations
Date: Tue, 17 Dec 2024 23:07:14 +0800	[thread overview]
Message-ID: <202412172314.72HnCK0B-lkp@intel.com> (raw)

tree:   https://github.com/jpirko/linux_mlxsw combined_queue
head:   eed0968cc93b75eeb363ea89d1834928a77e6fdc
commit: dae14d4697667bf658c29a01c0aac9c8f305e478 [53/60] net: bridge: Handle changes in VLAN_FLAG_BRIDGE_BINDING
config: x86_64-buildonly-randconfig-001-20241217 (https://download.01.org/0day-ci/archive/20241217/202412172314.72HnCK0B-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241217/202412172314.72HnCK0B-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412172314.72HnCK0B-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from net/bridge/br.c:12:
   In file included from include/linux/netdevice.h:38:
   In file included from include/net/net_namespace.h:43:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/x86/include/asm/cacheflush.h:5:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> net/bridge/br.c:58:4: error: call to undeclared function 'br_vlan_vlan_upper_event'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      58 |                         br_vlan_vlan_upper_event(real_dev, dev, event);
         |                         ^
   1 warning and 1 error generated.


vim +/br_vlan_vlan_upper_event +58 net/bridge/br.c

    21	
    22	/*
    23	 * Handle changes in state of network devices enslaved to a bridge.
    24	 *
    25	 * Note: don't care about up/down if bridge itself is down, because
    26	 *     port state is checked when bridge is brought up.
    27	 */
    28	static int br_device_event(struct notifier_block *unused, unsigned long event, void *ptr)
    29	{
    30		struct netlink_ext_ack *extack = netdev_notifier_info_to_extack(ptr);
    31		struct netdev_notifier_pre_changeaddr_info *prechaddr_info;
    32		struct net_device *dev = netdev_notifier_info_to_dev(ptr);
    33		struct net_bridge_port *p;
    34		struct net_bridge *br;
    35		bool notified = false;
    36		bool changed_addr;
    37		int err;
    38	
    39		if (netif_is_bridge_master(dev)) {
    40			err = br_vlan_bridge_event(dev, event, ptr);
    41			if (err)
    42				return notifier_from_errno(err);
    43	
    44			if (event == NETDEV_REGISTER) {
    45				/* register of bridge completed, add sysfs entries */
    46				err = br_sysfs_addbr(dev);
    47				if (err)
    48					return notifier_from_errno(err);
    49	
    50				return NOTIFY_DONE;
    51			}
    52		}
    53	
    54		if (is_vlan_dev(dev)) {
    55			struct net_device *real_dev = vlan_dev_real_dev(dev);
    56	
    57			if (netif_is_bridge_master(real_dev))
  > 58				br_vlan_vlan_upper_event(real_dev, dev, event);
    59		}
    60	
    61		/* not a port of a bridge */
    62		p = br_port_get_rtnl(dev);
    63		if (!p)
    64			return NOTIFY_DONE;
    65	
    66		br = p->br;
    67	
    68		switch (event) {
    69		case NETDEV_CHANGEMTU:
    70			br_mtu_auto_adjust(br);
    71			break;
    72	
    73		case NETDEV_PRE_CHANGEADDR:
    74			if (br->dev->addr_assign_type == NET_ADDR_SET)
    75				break;
    76			prechaddr_info = ptr;
    77			err = dev_pre_changeaddr_notify(br->dev,
    78							prechaddr_info->dev_addr,
    79							extack);
    80			if (err)
    81				return notifier_from_errno(err);
    82			break;
    83	
    84		case NETDEV_CHANGEADDR:
    85			spin_lock_bh(&br->lock);
    86			br_fdb_changeaddr(p, dev->dev_addr);
    87			changed_addr = br_stp_recalculate_bridge_id(br);
    88			spin_unlock_bh(&br->lock);
    89	
    90			if (changed_addr)
    91				call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev);
    92	
    93			break;
    94	
    95		case NETDEV_CHANGE:
    96			br_port_carrier_check(p, &notified);
    97			break;
    98	
    99		case NETDEV_FEAT_CHANGE:
   100			netdev_update_features(br->dev);
   101			break;
   102	
   103		case NETDEV_DOWN:
   104			spin_lock_bh(&br->lock);
   105			if (br->dev->flags & IFF_UP) {
   106				br_stp_disable_port(p);
   107				notified = true;
   108			}
   109			spin_unlock_bh(&br->lock);
   110			break;
   111	
   112		case NETDEV_UP:
   113			if (netif_running(br->dev) && netif_oper_up(dev)) {
   114				spin_lock_bh(&br->lock);
   115				br_stp_enable_port(p);
   116				notified = true;
   117				spin_unlock_bh(&br->lock);
   118			}
   119			break;
   120	
   121		case NETDEV_UNREGISTER:
   122			br_del_if(br, dev);
   123			break;
   124	
   125		case NETDEV_CHANGENAME:
   126			err = br_sysfs_renameif(p);
   127			if (err)
   128				return notifier_from_errno(err);
   129			break;
   130	
   131		case NETDEV_PRE_TYPE_CHANGE:
   132			/* Forbid underlying device to change its type. */
   133			return NOTIFY_BAD;
   134	
   135		case NETDEV_RESEND_IGMP:
   136			/* Propagate to master device */
   137			call_netdevice_notifiers(event, br->dev);
   138			break;
   139		}
   140	
   141		if (event != NETDEV_UNREGISTER)
   142			br_vlan_port_event(p, event);
   143	
   144		/* Events that may cause spanning tree to refresh */
   145		if (!notified && (event == NETDEV_CHANGEADDR || event == NETDEV_UP ||
   146				  event == NETDEV_CHANGE || event == NETDEV_DOWN))
   147			br_ifinfo_notify(RTM_NEWLINK, NULL, p);
   148	
   149		return NOTIFY_DONE;
   150	}
   151	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-12-17 15:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412172314.72HnCK0B-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=idosch@nvidia.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=petrm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox