From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [hubcap:for-next 1/6] fs/orangefs/orangefs-debugfs.c:244:20: sparse: sparse: unsigned value that used to be signed checked against zero?
Date: Tue, 07 Apr 2026 15:11:42 +0800 [thread overview]
Message-ID: <202604071540.ul3D0TzF-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check warning: fs/orangefs/orangefs-debugfs.c:244:20: sparse: sparse: unsigned value that used to be signed checked against zero?"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Mike Marshall <hubcap@omnibond.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git for-next
head: fb0898b77656046fd25c5f08cf89cd6e3899e6db
commit: 30b7c30781f0440e70a5e0c8943be423b57bbd9b [1/6] debugfs: take better advantage of strscpy.
:::::: branch date: 16 hours ago
:::::: commit date: 3 days ago
config: parisc-randconfig-r134-20260407 (https://download.01.org/0day-ci/archive/20260407/202604071540.ul3D0TzF-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 14.3.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604071540.ul3D0TzF-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/r/202604071540.ul3D0TzF-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/orangefs/orangefs-debugfs.c:244:20: sparse: sparse: unsigned value that used to be signed checked against zero?
fs/orangefs/orangefs-debugfs.c:242:17: sparse: signed value source
fs/orangefs/orangefs-debugfs.c:343:20: sparse: sparse: unsigned value that used to be signed checked against zero?
fs/orangefs/orangefs-debugfs.c:341:17: sparse: signed value source
vim +244 fs/orangefs/orangefs-debugfs.c
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 234
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 235 /*
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 236 * initialize the kernel-debug file.
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 237 */
0979cf95d201f7 fs/orangefs/orangefs-debugfs.c Greg Kroah-Hartman 2019-07-04 238 static void orangefs_kernel_debug_init(void)
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 239 {
31720a2b109b30 fs/orangefs/orangefs-debugfs.c Zhang Xiaoxu 2022-10-18 240 static char k_buffer[ORANGEFS_MAX_DEBUG_STRING_LEN] = { };
30b7c30781f044 fs/orangefs/orangefs-debugfs.c Mike Marshall 2026-04-03 241 size_t len =
30b7c30781f044 fs/orangefs/orangefs-debugfs.c Mike Marshall 2026-04-03 242 strscpy(k_buffer, kernel_debug_string, sizeof(k_buffer) - 1);
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 243
30b7c30781f044 fs/orangefs/orangefs-debugfs.c Mike Marshall 2026-04-03 @244 if (len >= 0) {
9e835108a9ae1c fs/orangefs/orangefs-debugfs.c Thorsten Blum 2026-01-17 245 k_buffer[len] = '\n';
9e835108a9ae1c fs/orangefs/orangefs-debugfs.c Thorsten Blum 2026-01-17 246 k_buffer[len + 1] = '\0';
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 247 } else {
9e835108a9ae1c fs/orangefs/orangefs-debugfs.c Thorsten Blum 2026-01-17 248 strscpy(k_buffer, "none\n");
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 249 pr_info("%s: overflow 1!\n", __func__);
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 250 }
44f4641073f132 fs/orangefs/orangefs-debugfs.c Martin Brandenburg 2016-08-15 251
c2a3a216c7e9ad fs/orangefs/orangefs-debugfs.c Al Viro 2025-01-12 252 debugfs_create_file_aux_num(ORANGEFS_KMOD_DEBUG_FILE, 0444, debug_dir, k_buffer,
c2a3a216c7e9ad fs/orangefs/orangefs-debugfs.c Al Viro 2025-01-12 253 0, &kernel_debug_fops);
274dcf55bd4ab1 fs/orangefs/pvfs2-debugfs.c Mike Marshall 2015-07-17 254 }
274dcf55bd4ab1 fs/orangefs/pvfs2-debugfs.c Mike Marshall 2015-07-17 255
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-07 7:12 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=202604071540.ul3D0TzF-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox