Re: [PATCH v5 1/4] mm: swap: introduce swap tier infrastructure

From: kernel test robot

Date: Sun Mar 29 2026 - 06:51:26 EST


Hi Youngjun,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 6381a729fa7dda43574d93ab9c61cec516dd885b]

url: https://github.com/intel-lab-lkp/linux/commits/Youngjun-Park/mm-swap-introduce-swap-tier-infrastructure/20260327-203639
base: 6381a729fa7dda43574d93ab9c61cec516dd885b
patch link: https://lore.kernel.org/r/20260325175453.2523280-2-youngjun.park%40lge.com
patch subject: [PATCH v5 1/4] mm: swap: introduce swap tier infrastructure
config: hexagon-randconfig-002-20260329 (https://download.01.org/0day-ci/archive/20260329/202603291831.wZLe8bqg-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260329/202603291831.wZLe8bqg-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/202603291831.wZLe8bqg-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> mm/swap_tier.c:118:10: warning: format specifies type 'long' but the argument has type '__ptrdiff_t' (aka 'int') [-Wformat]
116 | len += sysfs_emit_at(buf, len, "%-16s %-5ld %-11d %-11d\n",
| ~~~~~
| %-5td
117 | tier->name,
118 | TIER_IDX(tier),
| ^~~~~~~~~~~~~~
mm/swap_tier.c:33:24: note: expanded from macro 'TIER_IDX'
33 | #define TIER_IDX(tier) ((tier) - swap_tiers)
| ^~~~~~~~~~~~~~~~~~~~~
1 warning generated.


vim +118 mm/swap_tier.c

105
106 ssize_t swap_tiers_sysfs_show(char *buf)
107 {
108 struct swap_tier *tier;
109 ssize_t len = 0;
110
111 len += sysfs_emit_at(buf, len, "%-16s %-5s %-11s %-11s\n",
112 "Name", "Idx", "PrioStart", "PrioEnd");
113
114 spin_lock(&swap_tier_lock);
115 for_each_active_tier(tier) {
116 len += sysfs_emit_at(buf, len, "%-16s %-5ld %-11d %-11d\n",
117 tier->name,
> 118 TIER_IDX(tier),
119 tier->prio,
120 TIER_END_PRIO(tier));
121 }
122 spin_unlock(&swap_tier_lock);
123
124 return len;
125 }
126

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