All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used
Date: Wed, 10 Nov 2021 11:09:44 +0800	[thread overview]
Message-ID: <202111101136.15gbNM1b-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 5bb9de8bcb18c38ea089a287b77944ef8ee71abd wilc1000: configure registers to handle chip wakeup sequence
date:   7 weeks ago
config: h8300-randconfig-r026-20211109 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.0
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5bb9de8bcb18c38ea089a287b77944ef8ee71abd
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 5bb9de8bcb18c38ea089a287b77944ef8ee71abd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300 

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/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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Ajay Singh <ajay.kathat@microchip.com>
Cc: kbuild-all@lists.01.org, 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: Wed, 10 Nov 2021 11:09:44 +0800	[thread overview]
Message-ID: <202111101136.15gbNM1b-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 5bb9de8bcb18c38ea089a287b77944ef8ee71abd wilc1000: configure registers to handle chip wakeup sequence
date:   7 weeks ago
config: h8300-randconfig-r026-20211109 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.0
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5bb9de8bcb18c38ea089a287b77944ef8ee71abd
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 5bb9de8bcb18c38ea089a287b77944ef8ee71abd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300 

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/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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

             reply	other threads:[~2021-11-10  3:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  3:09 kernel test robot [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2026-04-07  4:00 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=202111101136.15gbNM1b-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.