Skip to contentSkip to conversation

mm/swapfile.c:102:26: warning: no previous prototype for 'swap_type_to_swap_info'

PATCH kernel test robot 1 participant 1 message Nov 30

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

Hi Bing,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android12-5.10
head:   4c7c54d5282535632ad82a459d9a58e130a0452c
commit: 4506bcbba5ec78d8d694fbb43e964cfefe900887 [1/1] ANDROID: mm: export swap_type_to_swap_info
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20261130/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/[email protected]/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 protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> mm/swapfile.c:102:26: warning: no previous prototype for 'swap_type_to_swap_info' [-Wmissing-prototypes]

102 | struct swap_info_struct *swap_type_to_swap_info(int type)
| ^~~~~~~~~~~~~~~~~~~~~~

vim +/swap_type_to_swap_info +102 mm/swapfile.c

101

 > 102	struct swap_info_struct *swap_type_to_swap_info(int type)

103 {
104 if (type >= READ_ONCE(nr_swapfiles))
105 return NULL;
106
107 smp_rmb(); /* Pairs with smp_wmb in alloc_swap_info. */
108 return READ_ONCE(swap_info[type]);
109 }
110 EXPORT_SYMBOL_GPL(swap_type_to_swap_info);
111

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