Re: [PATCH 6/8] mm/swap: get the swap file offset directly

From: kernel test robot
Date: Thu Apr 18 2024 - 14:44:20 EST


Hi Kairui,

kernel test robot noticed the following build errors:

[auto build test ERROR on ceph-client/testing]
[also build test ERROR on ceph-client/for-linus trondmy-nfs/linux-next konis-nilfs2/upstream jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev cifs/for-next linus/master v6.9-rc4 next-20240418]
[cannot apply to akpm-mm/mm-everything]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song/NFS-remove-nfs_page_lengthg-and-usage-of-page_index/20240418-001343
base: https://github.com/ceph/ceph-client.git testing
patch link: https://lore.kernel.org/r/20240417160842.76665-7-ryncsn%40gmail.com
patch subject: [PATCH 6/8] mm/swap: get the swap file offset directly
config: alpha-defconfig (https://download.01.org/0day-ci/archive/20240419/202404190204.cy1pBxFg-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240419/202404190204.cy1pBxFg-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404190204.cy1pBxFg-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from mm/shmem.c:43:
mm/swap.h: In function 'swap_file_pos':
>> mm/swap.h:12:25: error: implicit declaration of function 'swp_offset'; did you mean 'pmd_offset'? [-Werror=implicit-function-declaration]
12 | return ((loff_t)swp_offset(entry)) << PAGE_SHIFT;
| ^~~~~~~~~~
| pmd_offset
In file included from mm/shmem.c:68:
include/linux/swapops.h: At top level:
>> include/linux/swapops.h:107:23: error: conflicting types for 'swp_offset'; have 'long unsigned int(swp_entry_t)'
107 | static inline pgoff_t swp_offset(swp_entry_t entry)
| ^~~~~~~~~~
mm/swap.h:12:25: note: previous implicit declaration of 'swp_offset' with type 'int()'
12 | return ((loff_t)swp_offset(entry)) << PAGE_SHIFT;
| ^~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from mm/show_mem.c:19:
mm/swap.h: In function 'swap_file_pos':
>> mm/swap.h:12:25: error: implicit declaration of function 'swp_offset'; did you mean 'pmd_offset'? [-Werror=implicit-function-declaration]
12 | return ((loff_t)swp_offset(entry)) << PAGE_SHIFT;
| ^~~~~~~~~~
| pmd_offset
cc1: some warnings being treated as errors


vim +12 mm/swap.h

9
10 static inline loff_t swap_file_pos(swp_entry_t entry)
11 {
> 12 return ((loff_t)swp_offset(entry)) << PAGE_SHIFT;
13 }
14

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