* [norov:new_tests 18/25] drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1228:16: warning: expression result unused
@ 2026-03-26 18:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-26 18:06 UTC (permalink / raw)
To: Yury Norov; +Cc: oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-26 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 18:06 [norov:new_tests 18/25] drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1228:16: warning: expression result unused kernel test robot
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.