[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111100511.lxUR3jRO-lkp@intel.com>
Date: Wed, 10 Nov 2021 05:06:17 +0800
From: kernel test robot <lkp@...el.com>
To: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: error: variable
'curr_phase' set but not used
Hi Chetan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a net: wwan: iosm: transport layer support for fw flashing/cd
date: 7 weeks ago
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c: In function 'ipc_imem_sys_devlink_close':
>> drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: error: variable 'curr_phase' set but not used [-Werror=unused-but-set-variable]
397 | enum ipc_phase curr_phase;
| ^~~~~~~~~~
cc1: all warnings being treated as errors
vim +/curr_phase +397 drivers/net/wwan/iosm/iosm_ipc_imem_ops.c
389
390 /* Release a SIO channel link to CP. */
391 void ipc_imem_sys_devlink_close(struct iosm_devlink *ipc_devlink)
392 {
393 struct iosm_imem *ipc_imem = ipc_devlink->pcie->imem;
394 int boot_check_timeout = BOOT_CHECK_DEFAULT_TIMEOUT;
395 enum ipc_mem_exec_stage exec_stage;
396 struct ipc_mem_channel *channel;
> 397 enum ipc_phase curr_phase;
398 int status = 0;
399 u32 tail = 0;
400
401 channel = ipc_imem->ipc_devlink->devlink_sio.channel;
402 curr_phase = ipc_imem->phase;
403 /* Increase the total wait time to boot_check_timeout */
404 do {
405 exec_stage = ipc_mmio_get_exec_stage(ipc_imem->mmio);
406 if (exec_stage == IPC_MEM_EXEC_STAGE_RUN ||
407 exec_stage == IPC_MEM_EXEC_STAGE_PSI)
408 break;
409 msleep(20);
410 boot_check_timeout -= 20;
411 } while (boot_check_timeout > 0);
412
413 /* If there are any pending TDs then wait for Timeout/Completion before
414 * closing pipe.
415 */
416 if (channel->ul_pipe.old_tail != channel->ul_pipe.old_head) {
417 status = wait_for_completion_interruptible_timeout
418 (&ipc_imem->ul_pend_sem,
419 msecs_to_jiffies(IPC_PEND_DATA_TIMEOUT));
420 if (status == 0) {
421 dev_dbg(ipc_imem->dev,
422 "Data Timeout on UL-Pipe:%d Head:%d Tail:%d",
423 channel->ul_pipe.pipe_nr,
424 channel->ul_pipe.old_head,
425 channel->ul_pipe.old_tail);
426 }
427 }
428
429 ipc_protocol_get_head_tail_index(ipc_imem->ipc_protocol,
430 &channel->dl_pipe, NULL, &tail);
431
432 if (tail != channel->dl_pipe.old_tail) {
433 status = wait_for_completion_interruptible_timeout
434 (&ipc_imem->dl_pend_sem,
435 msecs_to_jiffies(IPC_PEND_DATA_TIMEOUT));
436 if (status == 0) {
437 dev_dbg(ipc_imem->dev,
438 "Data Timeout on DL-Pipe:%d Head:%d Tail:%d",
439 channel->dl_pipe.pipe_nr,
440 channel->dl_pipe.old_head,
441 channel->dl_pipe.old_tail);
442 }
443 }
444
445 /* Due to wait for completion in messages, there is a small window
446 * between closing the pipe and updating the channel is closed. In this
447 * small window there could be HP update from Host Driver. Hence update
448 * the channel state as CLOSING to aviod unnecessary interrupt
449 * towards CP.
450 */
451 channel->state = IMEM_CHANNEL_CLOSING;
452 /* Release the pipe resources */
453 ipc_imem_pipe_cleanup(ipc_imem, &channel->ul_pipe);
454 ipc_imem_pipe_cleanup(ipc_imem, &channel->dl_pipe);
455 }
456
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (66447 bytes)
Powered by blists - more mailing lists