diff options
author | Hyeonggon Yoo <42.hyeyoo@gmail.com> | 2025-01-28 02:16:31 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-02-01 14:53:23 +0300 |
commit | 6e8e04291d81867680552b49f40fa5c746b641d8 (patch) | |
tree | 7fafac9254b16869eec82a410980c04f748b794b /scripts/gdb/linux/cpus.py | |
parent | 1c7b17cf0594f33c898004ac1b5576c032f266e2 (diff) | |
download | linux-6e8e04291d81867680552b49f40fa5c746b641d8.tar.xz |
mm/zsmalloc: add __maybe_unused attribute for is_first_zpdesc()
Commit c1b3bb73d55e ("mm/zsmalloc: use zpdesc in
trylock_zspage()/lock_zspage()") introduces is_first_zpdesc() function.
However, the function is only used when CONFIG_DEBUG_VM=y.
When building with LLVM=1 and W=1 option, the following warning is
generated:
$ make -j12 W=1 LLVM=1 mm/zsmalloc.o
mm/zsmalloc.c:455:20: error: function 'is_first_zpdesc' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
455 | static inline bool is_first_zpdesc(struct zpdesc *zpdesc)
| ^~~~~~~~~~~~~~~
1 error generated.
Fix the warning by adding __maybe_unused attribute to the function.
No functional change intended.
Link: https://lkml.kernel.org/r/20250127231631.4363-1-42.hyeyoo@gmail.com
Fixes: c1b3bb73d55e ("mm/zsmalloc: use zpdesc in trylock_zspage()/lock_zspage()")
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501240958.4ILzuBrH-lkp@intel.com/
Cc: Alex Shi <alexs@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/linux/cpus.py')
0 files changed, 0 insertions, 0 deletions