Re: [PATCH v2 18/19] mm, swap: drop the SWAP_HAS_CACHE flag

From: Kairui Song
Date: Mon Nov 17 2025 - 08:40:04 EST


On Mon, Nov 17, 2025 at 7:23 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> Hi Kairui,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on 41218ede767f6b218185af65ce919d0cade75f6b]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song/mm-swap-rename-__read_swap_cache_async-to-swap_cache_alloc_folio/20251117-021532
> base: 41218ede767f6b218185af65ce919d0cade75f6b
> patch link: https://lore.kernel.org/r/20251117-swap-table-p2-v2-18-37730e6ea6d5%40tencent.com
> patch subject: [PATCH v2 18/19] mm, swap: drop the SWAP_HAS_CACHE flag
> config: riscv-defconfig (https://download.01.org/0day-ci/archive/20251117/202511171912.yMOEajkV-lkp@xxxxxxxxx/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 0bba1e76581bad04e7d7f09f5115ae5e2989e0d9)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/202511171912.yMOEajkV-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/202511171912.yMOEajkV-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
> >> mm/swapfile.c:88:19: warning: unused variable 'Unused_offset' [-Wunused-const-variable]
> 88 | static const char Unused_offset[] = "Unused swap offset entry ";
> | ^~~~~~~~~~~~~
> 1 warning generated.
>
>
> vim +/Unused_offset +88 mm/swapfile.c
>
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 84
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 85 static const char Bad_file[] = "Bad swap file entry ";
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 86 static const char Unused_file[] = "Unused swap file entry ";
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 87 static const char Bad_offset[] = "Bad swap offset entry ";
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 @88 static const char Unused_offset[] = "Unused swap offset entry ";
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 89
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

My bad, should move the `Unused_offset` related change to the next
commit, and remove it by then. It's just an unused variable so it can
be dropped easily.