mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/s390/include/asm/syscall.h:23 syscall_get_nr() warn: check sign expansion for '-1'
@ 2026-03-25 11:23 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-03-25 11:23 UTC (permalink / raw)
  To: oe-kbuild, Charlie Jenkins
  Cc: lkp, oe-kbuild-all, linux-kernel, Thomas Gleixner, Alexandre Ghiti

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bbeb83d3182abe0d245318e274e8531e5dd7a948
commit: e43b8bb56e537bfc8d9076793091e7679020fc9c entry: Inline syscall_exit_to_user_mode()
config: s390-randconfig-r072-20260325 (https://download.01.org/0day-ci/archive/20260325/202603251953.xOfBpOhW-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
smatch: v0.5.0-9004-gb810ac53

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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202603251953.xOfBpOhW-lkp@intel.com/

smatch warnings:
arch/s390/include/asm/syscall.h:23 syscall_get_nr() warn: check sign expansion for '-1'

vim +23 arch/s390/include/asm/syscall.h

753c4dd6a2fa2a Martin Schwidefsky 2008-10-10  20  static inline long syscall_get_nr(struct task_struct *task,
753c4dd6a2fa2a Martin Schwidefsky 2008-10-10  21  				  struct pt_regs *regs)
753c4dd6a2fa2a Martin Schwidefsky 2008-10-10  22  {
d3a73acbc26a4a Martin Schwidefsky 2014-04-15 @23  	return test_pt_regs_flag(regs, PIF_SYSCALL) ?
aa33c8cbbae2eb Martin Schwidefsky 2011-12-27  24  		(regs->int_code & 0xffff) : -1;


regs->int_code is a u32, so the -1 becomes UINT_MAX where -1 was
obviously intended.  Maybe change the function to return int or change
the -1 to -1L?

753c4dd6a2fa2a Martin Schwidefsky 2008-10-10  25  }

-- 
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-03-25 11:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-25 11:23 arch/s390/include/asm/syscall.h:23 syscall_get_nr() warn: check sign expansion for '-1' Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®