All of lore.kernel.org
 help / color / mirror / Atom feed
* [mptcp:export 242/675] drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: warning: variable 'curr_phase' set but not used
@ 2021-10-02 20:55 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-02 20:55 UTC (permalink / raw)
  To: M Chetan Kumar; +Cc: llvm, kbuild-all, mptcp

[-- Attachment #1: Type: text/plain, Size: 4200 bytes --]

tree:   https://github.com/multipath-tcp/mptcp_net-next.git export
head:   438ef7ceb40408538e91143eb3a1695a242cfecd
commit: 8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a [242/675] net: wwan: iosm: transport layer support for fw flashing/cd
config: i386-randconfig-a016-20211003 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 962e503cc8bc411f7523cc393acae8aae425b1c4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/multipath-tcp/mptcp_net-next/commit/8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a
        git remote add mptcp https://github.com/multipath-tcp/mptcp_net-next.git
        git fetch --no-tags mptcp export
        git checkout 8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: warning: variable 'curr_phase' set but not used [-Wunused-but-set-variable]
           enum ipc_phase curr_phase;
                          ^
   1 warning generated.


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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32030 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [mptcp:export 242/675] drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: warning: variable 'curr_phase' set but not used
@ 2021-10-02 20:55 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-02 20:55 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4302 bytes --]

tree:   https://github.com/multipath-tcp/mptcp_net-next.git export
head:   438ef7ceb40408538e91143eb3a1695a242cfecd
commit: 8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a [242/675] net: wwan: iosm: transport layer support for fw flashing/cd
config: i386-randconfig-a016-20211003 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 962e503cc8bc411f7523cc393acae8aae425b1c4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/multipath-tcp/mptcp_net-next/commit/8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a
        git remote add mptcp https://github.com/multipath-tcp/mptcp_net-next.git
        git fetch --no-tags mptcp export
        git checkout 8d9be06341816e5fb7e29b2fd44b3ffe8dd3263a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: warning: variable 'curr_phase' set but not used [-Wunused-but-set-variable]
           enum ipc_phase curr_phase;
                          ^
   1 warning generated.


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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32030 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-02 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 20:55 [mptcp:export 242/675] drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: warning: variable 'curr_phase' set but not used kernel test robot
2021-10-02 20:55 ` 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.