All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [glemco:staging_rv_hybrid_automata_enq_lark 10/10] include/rv/automata.h:64:22: sparse: sparse: unsigned value that used to be signed checked against zero?
Date: Fri, 29 May 2026 18:22:29 +0800	[thread overview]
Message-ID: <202605291825.yXTGoZwp-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "low confidence static check first_new_problem: include/rv/automata.h:64:22: sparse: sparse: unsigned value that used to be signed checked against zero?"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Gabriele Monaco <gmonaco@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gmonaco/linux.git staging_rv_hybrid_automata_enq_lark
head:   386880a9f1cbcb69a2013a0a5a92ab3afa62940a
commit: 386880a9f1cbcb69a2013a0a5a92ab3afa62940a [10/10] rv: Add dl_server specific monitors
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: i386-randconfig-061-20260529 (https://download.01.org/0day-ci/archive/20260529/202605291825.yXTGoZwp-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260529/202605291825.yXTGoZwp-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/202605291825.yXTGoZwp-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/trace/rv/monitors/boost/boost.c: note: in included file (through include/rv/ha_monitor.h):
>> include/rv/automata.h:64:22: sparse: sparse: unsigned value that used to be signed checked against zero?
   kernel/trace/rv/monitors/boost/boost.c:155:50: sparse: signed value source

vim +64 include/rv/automata.h

30984ccf31b7f0 Gabriele Monaco 2025-11-26  51  
30984ccf31b7f0 Gabriele Monaco 2025-11-26  52  /*
30984ccf31b7f0 Gabriele Monaco 2025-11-26  53   * model_get_next_state - process an automaton event occurrence
30984ccf31b7f0 Gabriele Monaco 2025-11-26  54   *
30984ccf31b7f0 Gabriele Monaco 2025-11-26  55   * Given the current state (curr_state) and the event (event), returns
30984ccf31b7f0 Gabriele Monaco 2025-11-26  56   * the next state, or INVALID_STATE in case of error.
30984ccf31b7f0 Gabriele Monaco 2025-11-26  57   */
fa9b26dfa172d1 Gabriele Monaco 2025-11-26  58  static inline enum states model_get_next_state(enum states curr_state,
30984ccf31b7f0 Gabriele Monaco 2025-11-26  59  					enum events event)
30984ccf31b7f0 Gabriele Monaco 2025-11-26  60  {
30984ccf31b7f0 Gabriele Monaco 2025-11-26  61  	if ((curr_state < 0) || (curr_state >= STATE_MAX))
30984ccf31b7f0 Gabriele Monaco 2025-11-26  62  		return INVALID_STATE;
30984ccf31b7f0 Gabriele Monaco 2025-11-26  63  
30984ccf31b7f0 Gabriele Monaco 2025-11-26 @64  	if ((event < 0) || (event >= EVENT_MAX))
30984ccf31b7f0 Gabriele Monaco 2025-11-26  65  		return INVALID_STATE;
30984ccf31b7f0 Gabriele Monaco 2025-11-26  66  
30984ccf31b7f0 Gabriele Monaco 2025-11-26  67  	return RV_AUTOMATON_NAME.function[curr_state][event];
30984ccf31b7f0 Gabriele Monaco 2025-11-26  68  }
30984ccf31b7f0 Gabriele Monaco 2025-11-26  69  

:::::: The code at line 64 was first introduced by commit
:::::: 30984ccf31b7f0678fad05a22e06bb9f6014c1ce rv: Refactor da_monitor to minimise macros

:::::: TO: Gabriele Monaco <gmonaco@redhat.com>
:::::: CC: Gabriele Monaco <gmonaco@redhat.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-05-29 10:23 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=202605291825.yXTGoZwp-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 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.