All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [norov:new_tests 18/25] drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1228:16: warning: expression result unused
Date: Fri, 27 Mar 2026 02:06:15 +0800	[thread overview]
Message-ID: <202603270257.eiqFVAWP-lkp@intel.com> (raw)

tree:   https://github.com/norov/linux new_tests
head:   7402f5cc9265ac58854a5e28fa0305bda6f459ab
commit: 9c19f38601eb29dfc08c3db08940f467f48b1d79 [18/25] mellanox: cleanup mlx5_cmd_all_stalled()
config: x86_64-buildonly-randconfig-003-20260326 (https://download.01.org/0day-ci/archive/20260327/202603270257.eiqFVAWP-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260327/202603270257.eiqFVAWP-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/202603270257.eiqFVAWP-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1228:45: error: expected ';' in 'for' statement specifier
    1228 |         for (i = 0, i < cmd->vars.max_reg_cmds; i++) {
         |                                                    ^
>> drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1228:16: warning: expression result unused [-Wunused-value]
    1228 |         for (i = 0, i < cmd->vars.max_reg_cmds; i++) {
         |                     ~ ^ ~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.


vim +1228 drivers/net/ethernet/mellanox/mlx5/core/cmd.c

  1203	
  1204	/* Check if all command slots are stalled (timed out and not recovered).
  1205	 * returns true if all slots timed out on a recent command and have not been
  1206	 * completed by FW yet. (stalled state)
  1207	 * false otherwise (at least one slot is not stalled).
  1208	 *
  1209	 * In such odd situation "all_stalled", this serves as a protection mechanism
  1210	 * to avoid blocking the kernel for long periods of time in case FW is not
  1211	 * responding to commands.
  1212	 */
  1213	static bool mlx5_cmd_all_stalled(struct mlx5_core_dev *dev)
  1214	{
  1215		struct mlx5_cmd *cmd = &dev->cmd;
  1216		bool all_stalled = true;
  1217		unsigned long flags;
  1218		int i;
  1219	
  1220		spin_lock_irqsave(&cmd->alloc_lock, flags);
  1221	
  1222		/* at least one command slot is free */
  1223		if (!bitmap_empty(&cmd->vars.bitmask, cmd->vars.max_reg_cmds)) {
  1224			all_stalled = false;
  1225			goto out;
  1226		}
  1227	
> 1228		for (i = 0, i < cmd->vars.max_reg_cmds; i++) {
  1229			struct mlx5_cmd_work_ent *ent = dev->cmd.ent_arr[i];
  1230	
  1231			if (!test_bit(MLX5_CMD_ENT_STATE_TIMEDOUT, &ent->state)) {
  1232				all_stalled = false;
  1233				break;
  1234			}
  1235		}
  1236	out:
  1237		spin_unlock_irqrestore(&cmd->alloc_lock, flags);
  1238	
  1239		return all_stalled;
  1240	}
  1241	

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

                 reply	other threads:[~2026-03-26 18:06 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=202603270257.eiqFVAWP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yury.norov@gmail.com \
    /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.