mm/zsmalloc.c:431:20: warning: function 'is_first_zpdesc' is not needed and will not be emitted
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 853d1f41ba73e78d22e7075d9a95670aab187eba commit: 1c6c153b503f90d1099ae606198e080a452687f6 [8826/10150] mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage() config: i386-randconfig-005-20250124 (https://download.01.org/0day-ci/archive/20250124/[email protected]/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250124/[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/zsmalloc.c:431:20: warning: function 'is_first_zpdesc' is not needed and will not be emitted [-Wunneeded-internal-declaration]
431 | static inline bool is_first_zpdesc(struct zpdesc *zpdesc)
| ^~~~~~~~~~~~~~~
1 warning generated.
vim +/is_first_zpdesc +431 mm/zsmalloc.c
430
> 431 static inline bool is_first_zpdesc(struct zpdesc *zpdesc)
432 {
433 return PagePrivate(zpdesc_page(zpdesc));
434 }
435
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 12 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 853d1f41ba73e78d22e7075d9a95670aab187eba commit: 1c6c153b503f90d1099ae606198e080a452687f6 [8826/10150] mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage() config: i386-randconfig-005-20250124 (https://download.01.org/0day-ci/archive/20250124/[email protected]/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250124/[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]/
Quoted 4 lines
All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
mm/zsmalloc.c:431:20: warning: function 'is_first_zpdesc' is not needed and will not be emitted [-Wunneeded-internal-declaration]431 | static inline bool
is_first_zpdesc(struct zpdesc *zpdesc)
Ok. for now is_first_zpdesc() is only used to check erroneous conditions on CONFIG_DEBUG_VM=y. Simply adding __maybe_unused will be enough to suppress this warning.
However I'm afraid that it's too late to update the patch now.
Andrew, if you're ok I'll send a patch after the merge window's closed. How does that sound?
--
Hyeonggon
Quoted 13 lines
| ^~~~~~~~~~~~~~~
1 warning generated.vim +/is_first_zpdesc +431
mm/zsmalloc.c430Quoted 1 line
431 static inline bool
is_first_zpdesc(struct zpdesc *zpdesc)432 { 433 return PagePrivate(zpdesc_page(zpdesc)); 434 } 435
Andrew Morton
maintainerQuoted 2 lines · On Fri, 24 Jan 2025 10:45:45 +0900 Hyeonggon Yoo <[email protected]> wrote:
Andrew, if you're ok I'll send a patch after the merge window's closed. How does that sound?
Please send the fix as soon as you can conveniently prepare it.