lkml.org 
[lkml]   [2021]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used
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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-10 04:10    [W:0.576 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site