From: kernel test robot <lkp@intel.com>
To: Bo Jiao <Bo.Jiao@mediatek.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Felix Fietkau <nbd@nbd.name>,
Peter Chiu <chui-hao.chiu@mediatek.com>,
Ryder Lee <ryder.lee@mediatek.com>,
Sujuan Chen <sujuan.chen@mediatek.com>
Subject: [nbd168-wireless:mt76 8/15] drivers/net/wireless/mediatek/mt76/mt7915/soc.c:106:18: warning: variable 'temp' set but not used
Date: Tue, 15 Feb 2022 06:56:46 +0800 [thread overview]
Message-ID: <202202150606.d9hKxuTN-lkp@intel.com> (raw)
tree: https://github.com/nbd168/wireless mt76
head: 56435dc5c16dfd2c15afd83933b8fe3689a299d6
commit: 91eeaef2523f3456f24a7dbdbf1e0e7deb133a48 [8/15] mt76: mt7915: add support for MT7986
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20220215/202202150606.d9hKxuTN-lkp@intel.com/config)
compiler: mips-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://github.com/nbd168/wireless/commit/91eeaef2523f3456f24a7dbdbf1e0e7deb133a48
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout 91eeaef2523f3456f24a7dbdbf1e0e7deb133a48
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7915/
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/mediatek/mt76/mt7915/soc.c: In function 'mt7986_wmac_adie_efuse_read':
>> drivers/net/wireless/mediatek/mt76/mt7915/soc.c:106:18: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
106 | int ret, temp;
| ^~~~
drivers/net/wireless/mediatek/mt76/mt7915/soc.c: In function 'mt7986_wmac_probe':
>> drivers/net/wireless/mediatek/mt76/mt7915/soc.c:1131:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1131 | chip_id = (u64)of_device_get_match_data(&pdev->dev);
| ^
vim +/temp +106 drivers/net/wireless/mediatek/mt76/mt7915/soc.c
101
102 static int
103 mt7986_wmac_adie_efuse_read(struct mt7915_dev *dev, u8 adie,
104 u32 addr, u32 *data)
105 {
> 106 int ret, temp;
107 u32 val, mask;
108
109 ret = mt76_wmac_spi_write(dev, adie, MT_ADIE_EFUSE_CFG,
110 MT_ADIE_EFUSE_CTRL_MASK);
111 if (ret)
112 return ret;
113
114 ret = mt76_wmac_spi_rmw(dev, adie, MT_ADIE_EFUSE2_CTRL, BIT(30), 0x0);
115 if (ret)
116 return ret;
117
118 mask = (MT_ADIE_EFUSE_MODE_MASK | MT_ADIE_EFUSE_ADDR_MASK |
119 MT_ADIE_EFUSE_KICK_MASK);
120 val = FIELD_PREP(MT_ADIE_EFUSE_MODE_MASK, 0) |
121 FIELD_PREP(MT_ADIE_EFUSE_ADDR_MASK, addr) |
122 FIELD_PREP(MT_ADIE_EFUSE_KICK_MASK, 1);
123 ret = mt76_wmac_spi_rmw(dev, adie, MT_ADIE_EFUSE2_CTRL, mask, val);
124 if (ret)
125 return ret;
126
127 ret = read_poll_timeout(mt76_wmac_spi_read, temp,
128 !FIELD_GET(MT_ADIE_EFUSE_KICK_MASK, val),
129 USEC_PER_MSEC, 50 * USEC_PER_MSEC, false,
130 dev, adie, MT_ADIE_EFUSE2_CTRL, &val);
131 if (ret)
132 return ret;
133
134 ret = mt76_wmac_spi_read(dev, adie, MT_ADIE_EFUSE2_CTRL, &val);
135 if (ret)
136 return ret;
137
138 if (FIELD_GET(MT_ADIE_EFUSE_VALID_MASK, val) == 1)
139 ret = mt76_wmac_spi_read(dev, adie, MT_ADIE_EFUSE_RDATA0,
140 data);
141
142 return ret;
143 }
144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2022-02-14 22:57 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=202202150606.d9hKxuTN-lkp@intel.com \
--to=lkp@intel.com \
--cc=Bo.Jiao@mediatek.com \
--cc=chui-hao.chiu@mediatek.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sujuan.chen@mediatek.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
all inboxes | Powered by JetHome®