Subject: Re: [PATCH net-next 2/3] net/mlx5: MPFS, add support for dynamic enable/disable

From: kernel test robot <[email-masked]>
Date: Fri, 17 Oct 2025 05:35:37 +0800

Hi Saeed,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Saeed-Mahameed/devlink-Introduce-devlink-eswitch-state/20251016-094245
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251016013618.2030940-3-saeed%40kernel.org
patch subject: [PATCH net-next 2/3] net/mlx5: MPFS, add support for dynamic enable/disable
config: x86_64-randconfig-075-20251017 (https://download.01.org/0day-ci/archive/20251017/[email-masked]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

   In file included from drivers/net/ethernet/mellanox/mlx5/core/sriov.c:38:
   In file included from drivers/net/ethernet/mellanox/mlx5/core/eswitch.h:45:
>> drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h:97:5: warning: no previous prototype for function 'mlx5_mpfs_enable' [-Wmissing-prototypes]
      97 | int mlx5_mpfs_enable(struct mlx5_core_dev *dev) { return 0; }
         |     ^
   drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      97 | int mlx5_mpfs_enable(struct mlx5_core_dev *dev) { return 0; }
         | ^
         | static 
>> drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h:98:6: warning: no previous prototype for function 'mlx5_mpfs_disable' [-Wmissing-prototypes]
      98 | void mlx5_mpfs_disable(struct mlx5_core_dev *dev) {}
         |      ^
   drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      98 | void mlx5_mpfs_disable(struct mlx5_core_dev *dev) {}
         | ^
         | static 
   2 warnings generated.

vim +/mlx5_mpfs_enable +97 drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.h

    87	
    88	#ifdef CONFIG_MLX5_MPFS
    89	struct mlx5_core_dev;
    90	int  mlx5_mpfs_init(struct mlx5_core_dev *dev);
    91	void mlx5_mpfs_cleanup(struct mlx5_core_dev *dev);
    92	int mlx5_mpfs_enable(struct mlx5_core_dev *dev);
    93	void mlx5_mpfs_disable(struct mlx5_core_dev *dev);
    94	#else /* #ifndef CONFIG_MLX5_MPFS */
    95	static inline int  mlx5_mpfs_init(struct mlx5_core_dev *dev) { return 0; }
    96	static inline void mlx5_mpfs_cleanup(struct mlx5_core_dev *dev) {}
  > 97	int mlx5_mpfs_enable(struct mlx5_core_dev *dev) { return 0; }
  > 98	void mlx5_mpfs_disable(struct mlx5_core_dev *dev) {}
    99	#endif
   100	

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