drivers/phy/cadence/phy-cadence-salvo.c:213:6: warning: variable 'value' set but not used

From: kernel test robot
Date: Wed Jun 02 2021 - 16:29:37 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 324c92e5e0ee0e993bdb106fac407846ed677f6b
commit: 50d35aa8c15f7210fe76de64b1940100b588bcae phy: cadence: salvo: add salvo phy driver
date: 1 year, 1 month ago
config: x86_64-randconfig-a014-20210602 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d41cb6bb2607fa5c7a9df2b3dab361353657d225)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50d35aa8c15f7210fe76de64b1940100b588bcae
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 50d35aa8c15f7210fe76de64b1940100b588bcae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/phy/cadence/phy-cadence-salvo.c:213:6: warning: variable 'value' set but not used [-Wunused-but-set-variable]
u16 value;
^
1 warning generated.


vim +/value +213 drivers/phy/cadence/phy-cadence-salvo.c

207
208 static int cdns_salvo_phy_power_on(struct phy *phy)
209 {
210 struct cdns_salvo_phy *salvo_phy = phy_get_drvdata(phy);
211 struct cdns_salvo_data *data = salvo_phy->data;
212 int ret, i;
> 213 u16 value;
214
215 ret = clk_prepare_enable(salvo_phy->clk);
216 if (ret)
217 return ret;
218
219 for (i = 0; i < data->init_sequence_length; i++) {
220 struct cdns_reg_pairs *reg_pair = data->init_sequence_val + i;
221
222 cdns_salvo_write(salvo_phy, reg_pair->off, reg_pair->val);
223 }
224
225 /* RXDET_IN_P3_32KHZ, Receiver detect slow clock enable */
226 value = cdns_salvo_read(salvo_phy, TB_ADDR_TX_RCVDETSC_CTRL);
227 value |= RXDET_IN_P3_32KHZ;
228 cdns_salvo_write(salvo_phy, TB_ADDR_TX_RCVDETSC_CTRL,
229 RXDET_IN_P3_32KHZ);
230
231 udelay(10);
232
233 return ret;
234 }
235

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip