lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204202021.UKHPj2M9-lkp@intel.com>
Date:   Thu, 21 Apr 2022 14:32:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jiri Pirko <jiri@...dia.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:jiri_devel_linecards 92/94]
 drivers/net/netdevsim/dev.c:119:25: error: too few arguments to function
 call, expected 5, have 4

tree:   https://github.com/jpirko/linux_mlxsw jiri_devel_linecards
head:   653975cafc05a2ffc68d2cbd1c5a328c67ce7142
commit: cb770dca23bd2c2fc957d64caeed00ba78a07e0b [92/94] TMP: devlink device type
config: x86_64-randconfig-a005 (https://download.01.org/0day-ci/archive/20220420/202204202021.UKHPj2M9-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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/cb770dca23bd2c2fc957d64caeed00ba78a07e0b
        git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
        git fetch --no-tags jpirko-mlxsw jiri_devel_linecards
        git checkout cb770dca23bd2c2fc957d64caeed00ba78a07e0b
        # 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=x86_64 SHELL=/bin/bash drivers/net/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/net/netdevsim/dev.c:119:25: error: too few arguments to function call, expected 5, have 4
                                                           nsim_dev_linecard);
                                                                            ^
   include/net/devlink.h:1607:1: note: 'devlink_linecard_device_create' declared here
   devlink_linecard_device_create(struct devlink_linecard *linecard,
   ^
   drivers/net/netdevsim/dev.c:870:14: error: too many arguments to function call, expected 3, have 4
                                             NULL, i);
                                                   ^
   drivers/net/netdevsim/dev.c:844:1: note: '__nsim_dev_port_add' declared here
   __nsim_dev_port_add(struct nsim_dev *nsim_dev, enum nsim_dev_port_type type,
   ^
   drivers/net/netdevsim/dev.c:883:39: error: too many arguments to function call, expected single argument 'nsim_dev_port', have 3 arguments
                           __nsim_dev_port_del(nsim_dev_port, NULL, i);
                           ~~~~~~~~~~~~~~~~~~~                ^~~~~~~
   include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
   #define NULL ((void *)0)
                ^
   drivers/net/netdevsim/dev.c:846:13: note: '__nsim_dev_port_del' declared here
   static void __nsim_dev_port_del(struct nsim_dev_port *nsim_dev_port);
               ^
   drivers/net/netdevsim/dev.c:1625:12: error: conflicting types for '__nsim_dev_port_add'
   static int __nsim_dev_port_add(struct nsim_dev *nsim_dev, enum nsim_dev_port_type type,
              ^
   drivers/net/netdevsim/dev.c:844:1: note: previous declaration is here
   __nsim_dev_port_add(struct nsim_dev *nsim_dev, enum nsim_dev_port_type type,
   ^
   drivers/net/netdevsim/dev.c:1738:14: error: too many arguments to function call, expected 3, have 4
                                             NULL, i);
                                                   ^
   drivers/net/netdevsim/dev.c:844:1: note: '__nsim_dev_port_add' declared here
   __nsim_dev_port_add(struct nsim_dev *nsim_dev, enum nsim_dev_port_type type,
   ^
   drivers/net/netdevsim/dev.c:2213:27: error: too many arguments to function call, expected 3, have 4
                                             nsim_dev_linecard, port_index);
                                                                ^~~~~~~~~~
   drivers/net/netdevsim/dev.c:844:1: note: '__nsim_dev_port_add' declared here
   __nsim_dev_port_add(struct nsim_dev *nsim_dev, enum nsim_dev_port_type type,
   ^
   6 errors generated.


vim +119 drivers/net/netdevsim/dev.c

eae68f21fc5005 Jiri Pirko 2021-05-05  100  
eae68f21fc5005 Jiri Pirko 2021-05-05  101  static int
eae68f21fc5005 Jiri Pirko 2021-05-05  102  nsim_dev_linecard_devices_create(struct nsim_dev_linecard *nsim_dev_linecard)
eae68f21fc5005 Jiri Pirko 2021-05-05  103  {
eae68f21fc5005 Jiri Pirko 2021-05-05  104  	struct devlink_linecard_device *device;
eae68f21fc5005 Jiri Pirko 2021-05-05  105  	char *component_name;
eae68f21fc5005 Jiri Pirko 2021-05-05  106  	int err;
eae68f21fc5005 Jiri Pirko 2021-05-05  107  	int i;
eae68f21fc5005 Jiri Pirko 2021-05-05  108  
eae68f21fc5005 Jiri Pirko 2021-05-05  109  	snprintf(nsim_dev_linecard->device_component_name,
eae68f21fc5005 Jiri Pirko 2021-05-05  110  		 sizeof(nsim_dev_linecard->device_component_name), "lc%u_dev0",
eae68f21fc5005 Jiri Pirko 2021-05-05  111  		 nsim_dev_linecard->linecard_index);
eae68f21fc5005 Jiri Pirko 2021-05-05  112  	component_name = nsim_dev_linecard->device_component_name;
eae68f21fc5005 Jiri Pirko 2021-05-05  113  
eae68f21fc5005 Jiri Pirko 2021-05-05  114  	for (i = 0; i < NSIM_DEV_LINECARD_DEVICE_COUNT; i++) {
eae68f21fc5005 Jiri Pirko 2021-05-05  115  		if (i > 0)
eae68f21fc5005 Jiri Pirko 2021-05-05  116  			component_name = NULL;
eae68f21fc5005 Jiri Pirko 2021-05-05  117  		device = devlink_linecard_device_create(nsim_dev_linecard->devlink_linecard,
eae68f21fc5005 Jiri Pirko 2021-05-05  118  							i, component_name,
eae68f21fc5005 Jiri Pirko 2021-05-05 @119  							nsim_dev_linecard);
eae68f21fc5005 Jiri Pirko 2021-05-05  120  		if (IS_ERR(device)) {
eae68f21fc5005 Jiri Pirko 2021-05-05  121  			err = PTR_ERR(device);
eae68f21fc5005 Jiri Pirko 2021-05-05  122  			goto rollback;
eae68f21fc5005 Jiri Pirko 2021-05-05  123  		}
eae68f21fc5005 Jiri Pirko 2021-05-05  124  		nsim_dev_linecard->devlink_device[i] = device;
eae68f21fc5005 Jiri Pirko 2021-05-05  125  	}
eae68f21fc5005 Jiri Pirko 2021-05-05  126  	return 0;
eae68f21fc5005 Jiri Pirko 2021-05-05  127  
eae68f21fc5005 Jiri Pirko 2021-05-05  128  rollback:
eae68f21fc5005 Jiri Pirko 2021-05-05  129  	for (i--; i >= 0; i--) {
eae68f21fc5005 Jiri Pirko 2021-05-05  130  		device = nsim_dev_linecard->devlink_device[i];
eae68f21fc5005 Jiri Pirko 2021-05-05  131  		devlink_linecard_device_destroy(nsim_dev_linecard->devlink_linecard,
eae68f21fc5005 Jiri Pirko 2021-05-05  132  						device);
eae68f21fc5005 Jiri Pirko 2021-05-05  133  	}
eae68f21fc5005 Jiri Pirko 2021-05-05  134  	return err;
eae68f21fc5005 Jiri Pirko 2021-05-05  135  }
eae68f21fc5005 Jiri Pirko 2021-05-05  136  

:::::: The code at line 119 was first introduced by commit
:::::: eae68f21fc5005048b5b49a4c953ff76b724df98 netdevsim: create couple of devices on each linecard

:::::: TO: Jiri Pirko <jiri@...dia.com>
:::::: CC: Jiri Pirko <jiri@...dia.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ