* [s390:for-next 2/3] arch/s390/kernel/machine_kexec.c:162:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute
@ 2026-11-27 23:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-27 23:22 UTC (permalink / raw)
To: Heiko Carstens; +Cc: oe-kbuild-all, linux-s390, Alexander Gordeev
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-next
head: e8f20a7b5952e0d5f12f11af4966092242ce7f81
commit: fd5d165900beb00e33763af707cb9be32367e217 [2/3] Merge branch 'features' into for-next
config: s390-randconfig-2200-20261127 (https://download.01.org/0day-ci/archive/20261128/20261128002018.6111Rbgo-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261128/20261128002018.6111Rbgo-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261128002018.6111Rbgo-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/s390/kernel/machine_kexec.c:162:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
162 | set_memory_ro(addr, size >> PAGE_SHIFT);
| ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/kernel/machine_kexec.c:164:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
164 | set_memory_rw(addr, size >> PAGE_SHIFT);
| ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/s390/kernel/machine_kexec.c:165:6: warning: variable 'rc' is uninitialized when used here [-Wuninitialized]
165 | if (rc)
| ^~
arch/s390/kernel/machine_kexec.c:155:8: note: initialize the variable 'rc' to silence this warning
155 | int rc;
| ^
| = 0
3 warnings generated.
vim +/warn_unused_result +162 arch/s390/kernel/machine_kexec.c
2d0af2247906cf Heiko Carstens 2016-05-31 151
4e042af463f806 Heiko Carstens 2016-05-31 152 static void crash_protect_pages(int protect)
dab7a7b1538fec Michael Holzheu 2011-10-30 153 {
a07bc01bec2337 Mike Rapoport (Microsoft 2026-11-17 154) unsigned long addr, size;
21f8d19ddeb3c0 Heiko Carstens 2026-11-18 155 int rc;
dab7a7b1538fec Michael Holzheu 2011-10-30 156
4e042af463f806 Heiko Carstens 2016-05-31 157 if (!crashk_res.end)
4e042af463f806 Heiko Carstens 2016-05-31 158 return;
a07bc01bec2337 Mike Rapoport (Microsoft 2026-11-17 159) addr = (unsigned long)__va(crashk_res.start);
4e042af463f806 Heiko Carstens 2016-05-31 160 size = resource_size(&crashk_res);
4e042af463f806 Heiko Carstens 2016-05-31 161 if (protect)
a07bc01bec2337 Mike Rapoport (Microsoft 2026-11-17 @162) set_memory_ro(addr, size >> PAGE_SHIFT);
a9fbf1a53836d4 Michael Holzheu 2012-05-18 163 else
a07bc01bec2337 Mike Rapoport (Microsoft 2026-11-17 164) set_memory_rw(addr, size >> PAGE_SHIFT);
21f8d19ddeb3c0 Heiko Carstens 2026-11-18 @165 if (rc)
21f8d19ddeb3c0 Heiko Carstens 2026-11-18 166 pr_warn("Failed to %sprotect crashkernel memory: %d\n", protect ? "" : "un", rc);
dab7a7b1538fec Michael Holzheu 2011-10-30 167 }
dab7a7b1538fec Michael Holzheu 2011-10-30 168
:::::: The code at line 162 was first introduced by commit
:::::: a07bc01bec2337151166442b15047b8861c4b23e s390/kdump: Write protect the crash kernel memory by its virtual address
:::::: TO: Mike Rapoport (Microsoft) <rppt@kernel.org>
:::::: CC: Alexander Gordeev <agordeev@linux.ibm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-27 23:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 23:22 [s390:for-next 2/3] arch/s390/kernel/machine_kexec.c:162:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox