[jpirko-mlxsw:jiri_devel_lc_dev 4/5] drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:26:5: warning: no previous prototype for function 'mlxsw_linecard_dev_id_alloc'

From: kernel test robot
Date: Thu Jun 02 2022 - 11:56:40 EST


tree: https://github.com/jpirko/linux_mlxsw jiri_devel_lc_dev
head: ef34c1c33c0ae43a9ad3c0ed3708eb1880972de0
commit: 2d0852c5fa89a48c6fa1f860600b5e24e2faab4b [4/5] mlxsw: core_linecards: Introduce per line card auxiliary device
config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220602/202206022331.m9R8tlOt-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b364c76683f8ef241025a9556300778c07b590c2)
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/2d0852c5fa89a48c6fa1f860600b5e24e2faab4b
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_lc_dev
git checkout 2d0852c5fa89a48c6fa1f860600b5e24e2faab4b
# 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/ethernet/mellanox/mlxsw/

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:26:5: warning: no previous prototype for function 'mlxsw_linecard_dev_id_alloc' [-Wmissing-prototypes]
int mlxsw_linecard_dev_id_alloc(void)
^
drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mlxsw_linecard_dev_id_alloc(void)
^
static
>> drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:31:6: warning: no previous prototype for function 'mlxsw_linecard_dev_id_free' [-Wmissing-prototypes]
void mlxsw_linecard_dev_id_free(int id)
^
drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mlxsw_linecard_dev_id_free(int id)
^
static
2 warnings generated.


vim +/mlxsw_linecard_dev_id_alloc +26 drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c

25
> 26 int mlxsw_linecard_dev_id_alloc(void)
27 {
28 return ida_alloc(&mlxsw_linecard_dev_ida, GFP_KERNEL);
29 }
30
> 31 void mlxsw_linecard_dev_id_free(int id)
32 {
33 ida_free(&mlxsw_linecard_dev_ida, id);
34 }
35

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