All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ajay Singh <ajay.kathat@microchip.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Kalle Valo <kvalo@codeaurora.org>
Subject: drivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used
Date: Tue, 07 Apr 2026 12:00:33 +0800	[thread overview]
Message-ID: <202604052006.fns84vWs-lkp@intel.com> (raw)

Hi Ajay,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3aae9383f42f687221c011d7ee87529398e826b3
commit: 5bb9de8bcb18c38ea089a287b77944ef8ee71abd wilc1000: configure registers to handle chip wakeup sequence
date:   4 years, 6 months ago
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20260405/202604052006.fns84vWs-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260405/202604052006.fns84vWs-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
| Fixes: 5bb9de8bcb18 ("wilc1000: configure registers to handle chip wakeup sequence")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604052006.fns84vWs-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/wireless/microchip/wilc1000/wlan.c: In function 'chip_wakeup':
>> drivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used [-Wunused-but-set-variable]
     620 |         u32 to_host_from_fw_reg, to_host_from_fw_bit;
         |                                  ^~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/microchip/wilc1000/wlan.c:620:13: warning: variable 'to_host_from_fw_reg' set but not used [-Wunused-but-set-variable]
     620 |         u32 to_host_from_fw_reg, to_host_from_fw_bit;
         |             ^~~~~~~~~~~~~~~~~~~


vim +/to_host_from_fw_bit +620 drivers/net/wireless/microchip/wilc1000/wlan.c

   613	
   614	void chip_wakeup(struct wilc *wilc)
   615	{
   616		u32 ret = 0;
   617		u32 clk_status_val = 0, trials = 0;
   618		u32 wakeup_reg, wakeup_bit;
   619		u32 clk_status_reg, clk_status_bit;
 > 620		u32 to_host_from_fw_reg, to_host_from_fw_bit;
   621		u32 from_host_to_fw_reg, from_host_to_fw_bit;
   622		const struct wilc_hif_func *hif_func = wilc->hif_func;
   623	
   624		if (wilc->io_type == WILC_HIF_SDIO) {
   625			wakeup_reg = WILC_SDIO_WAKEUP_REG;
   626			wakeup_bit = WILC_SDIO_WAKEUP_BIT;
   627			clk_status_reg = WILC_SDIO_CLK_STATUS_REG;
   628			clk_status_bit = WILC_SDIO_CLK_STATUS_BIT;
   629			from_host_to_fw_reg = WILC_SDIO_HOST_TO_FW_REG;
   630			from_host_to_fw_bit = WILC_SDIO_HOST_TO_FW_BIT;
   631			to_host_from_fw_reg = WILC_SDIO_FW_TO_HOST_REG;
   632			to_host_from_fw_bit = WILC_SDIO_FW_TO_HOST_BIT;
   633		} else {
   634			wakeup_reg = WILC_SPI_WAKEUP_REG;
   635			wakeup_bit = WILC_SPI_WAKEUP_BIT;
   636			clk_status_reg = WILC_SPI_CLK_STATUS_REG;
   637			clk_status_bit = WILC_SPI_CLK_STATUS_BIT;
   638			from_host_to_fw_reg = WILC_SPI_HOST_TO_FW_REG;
   639			from_host_to_fw_bit = WILC_SPI_HOST_TO_FW_BIT;
   640			to_host_from_fw_reg = WILC_SPI_FW_TO_HOST_REG;
   641			to_host_from_fw_bit = WILC_SPI_FW_TO_HOST_BIT;
   642		}
   643	
   644		/* indicate host wakeup */
   645		ret = hif_func->hif_write_reg(wilc, from_host_to_fw_reg,
   646					      from_host_to_fw_bit);
   647		if (ret)
   648			return;
   649	
   650		/* Set wake-up bit */
   651		ret = hif_func->hif_write_reg(wilc, wakeup_reg,
   652					      wakeup_bit);
   653		if (ret)
   654			return;
   655	
   656		while (trials < WAKE_UP_TRIAL_RETRY) {
   657			ret = hif_func->hif_read_reg(wilc, clk_status_reg,
   658						     &clk_status_val);
   659			if (ret) {
   660				pr_err("Bus error %d %x\n", ret, clk_status_val);
   661				return;
   662			}
   663			if (clk_status_val & clk_status_bit)
   664				break;
   665	
   666			trials++;
   667		}
   668		if (trials >= WAKE_UP_TRIAL_RETRY) {
   669			pr_err("Failed to wake-up the chip\n");
   670			return;
   671		}
   672	}
   673	EXPORT_SYMBOL_GPL(chip_wakeup);
   674	

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

             reply	other threads:[~2026-04-07  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  4:00 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-10  3:09 drivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used kernel test robot
2021-11-10  3:09 ` kernel test robot

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=202604052006.fns84vWs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ajay.kathat@microchip.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.