[jpirko-mlxsw:jiri_devel_devlink_locking 33/40] drivers/net/netdevsim/netdev.c:363:2: error: expected expression

From: kernel test robot
Date: Fri Aug 12 2022 - 17:13:10 EST


tree: https://github.com/jpirko/linux_mlxsw jiri_devel_devlink_locking
head: 3752df45a64c94afd110eeb956cd9adaeec586c1
commit: 95a8f1859e438effd49d5c1ae7828e87b8471180 [33/40] net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
config: hexagon-randconfig-r041-20220812 (https://download.01.org/0day-ci/archive/20220813/202208130537.EKYjXYLm-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520)
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://github.com/jpirko/linux_mlxsw/commit/95a8f1859e438effd49d5c1ae7828e87b8471180
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_devlink_locking
git checkout 95a8f1859e438effd49d5c1ae7828e87b8471180
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/net/netdevsim/ net/dsa/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/net/netdevsim/netdev.c:363:2: error: expected ';' after expression
SET_NETDEV_DEVLINK_PORT(dev, &nsim_dev_port->devlink_port);
^
include/linux/netdevice.h:2347:44: note: expanded from macro 'SET_NETDEV_DEVLINK_PORT'
((dev)->devlink_port = (_devlink_port)) \
^
>> drivers/net/netdevsim/netdev.c:363:2: error: expected expression
include/linux/netdevice.h:2347:44: note: expanded from macro 'SET_NETDEV_DEVLINK_PORT'
((dev)->devlink_port = (_devlink_port)) \
^
>> drivers/net/netdevsim/netdev.c:363:60: error: expected ')'
SET_NETDEV_DEVLINK_PORT(dev, &nsim_dev_port->devlink_port);
^
drivers/net/netdevsim/netdev.c:363:2: note: to match this '('
SET_NETDEV_DEVLINK_PORT(dev, &nsim_dev_port->devlink_port);
^
include/linux/netdevice.h:2345:53: note: expanded from macro 'SET_NETDEV_DEVLINK_PORT'
#define SET_NETDEV_DEVLINK_PORT(dev, _devlink_port) ({ \
^
3 errors generated.
--
net/dsa/slave.c:2367:2: error: expected ';' after expression
SET_NETDEV_DEVLINK_PORT(slave_dev, &port->devlink_port);
^
include/linux/netdevice.h:2347:44: note: expanded from macro 'SET_NETDEV_DEVLINK_PORT'
((dev)->devlink_port = (_devlink_port)) \
^
>> net/dsa/slave.c:2367:2: error: expected expression
include/linux/netdevice.h:2347:44: note: expanded from macro 'SET_NETDEV_DEVLINK_PORT'
((dev)->devlink_port = (_devlink_port)) \
^
>> net/dsa/slave.c:2367:57: error: expected ')'
SET_NETDEV_DEVLINK_PORT(slave_dev, &port->devlink_port);
^
net/dsa/slave.c:2367:2: note: to match this '('
SET_NETDEV_DEVLINK_PORT(slave_dev, &port->devlink_port);
^
include/linux/netdevice.h:2345:53: note: expanded from macro 'SET_NETDEV_DEVLINK_PORT'
#define SET_NETDEV_DEVLINK_PORT(dev, _devlink_port) ({ \
^
3 errors generated.


vim +363 drivers/net/netdevsim/netdev.c

342
343 struct netdevsim *
344 nsim_create(struct nsim_dev *nsim_dev, struct nsim_dev_port *nsim_dev_port)
345 {
346 struct net_device *dev;
347 struct netdevsim *ns;
348 int err;
349
350 dev = alloc_netdev_mq(sizeof(*ns), "eth%d", NET_NAME_UNKNOWN, nsim_setup,
351 nsim_dev->nsim_bus_dev->num_queues);
352 if (!dev)
353 return ERR_PTR(-ENOMEM);
354
355 dev_net_set(dev, nsim_dev_net(nsim_dev));
356 ns = netdev_priv(dev);
357 ns->netdev = dev;
358 u64_stats_init(&ns->syncp);
359 ns->nsim_dev = nsim_dev;
360 ns->nsim_dev_port = nsim_dev_port;
361 ns->nsim_bus_dev = nsim_dev->nsim_bus_dev;
362 SET_NETDEV_DEV(dev, &ns->nsim_bus_dev->dev);
> 363 SET_NETDEV_DEVLINK_PORT(dev, &nsim_dev_port->devlink_port);
364 nsim_ethtool_init(ns);
365 if (nsim_dev_port_is_pf(nsim_dev_port))
366 err = nsim_init_netdevsim(ns);
367 else
368 err = nsim_init_netdevsim_vf(ns);
369 if (err)
370 goto err_free_netdev;
371 return ns;
372
373 err_free_netdev:
374 free_netdev(dev);
375 return ERR_PTR(err);
376 }
377

--
0-DAY CI Kernel Test Service
https://01.org/lkp