public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/net/wwan/iosm/iosm_ipc_imem_ops.c:397:17: error: variable 'curr_phase' set but not used
Date: Wed, 10 Nov 2021 05:06:17 +0800	[thread overview]
Message-ID: <202111100511.lxUR3jRO-lkp@intel.com> (raw)

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

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@intel.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

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

                 reply	other threads:[~2021-11-09 21:07 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=202111100511.lxUR3jRO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chetan.kumar@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox