All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-s390@vger.kernel.org,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: [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
Date: Sat, 28 Nov 2026 00:22:13 +0100	[thread overview]
Message-ID: <20261128002018.6111Rbgo-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-11-27 23:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261128002018.6111Rbgo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agordeev@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.