[krzk-github:n/nfc-debug-cleanups 5/15] drivers/nfc/pn533/i2c.c:131:28: warning: variable 'client' set but not used

From: kernel test robot
Date: Tue Sep 07 2021 - 11:57:34 EST


tree: https://github.com/krzk/linux n/nfc-debug-cleanups
head: dbe5edac004defef47a57b386da49028e5409519
commit: b62f625ba810cda9ce18ab67d332b030ce372129 [5/15] nfc: pn533: drop unneeded debug prints
config: nds32-randconfig-r012-20210906 (attached as .config)
compiler: nds32le-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/krzk/linux/commit/b62f625ba810cda9ce18ab67d332b030ce372129
git remote add krzk-github https://github.com/krzk/linux
git fetch --no-tags krzk-github n/nfc-debug-cleanups
git checkout b62f625ba810cda9ce18ab67d332b030ce372129
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32

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/nfc/pn533/i2c.c: In function 'pn533_i2c_irq_thread_fn':
>> drivers/nfc/pn533/i2c.c:131:28: warning: variable 'client' set but not used [-Wunused-but-set-variable]
131 | struct i2c_client *client;
| ^~~~~~


vim +/client +131 drivers/nfc/pn533/i2c.c

dd7bedcd2673e4 Michael Thalmeier 2016-03-25 127
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 128 static irqreturn_t pn533_i2c_irq_thread_fn(int irq, void *data)
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 129 {
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 130 struct pn533_i2c_phy *phy = data;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 @131 struct i2c_client *client;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 132 struct sk_buff *skb = NULL;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 133 int r;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 134
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 135 if (!phy || irq != phy->i2c_dev->irq) {
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 136 WARN_ON_ONCE(1);
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 137 return IRQ_NONE;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 138 }
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 139
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 140 client = phy->i2c_dev;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 141
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 142 if (phy->hard_fault != 0)
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 143 return IRQ_HANDLED;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 144
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 145 r = pn533_i2c_read(phy, &skb);
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 146 if (r == -EREMOTEIO) {
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 147 phy->hard_fault = r;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 148
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 149 pn533_recv_frame(phy->priv, NULL, -EREMOTEIO);
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 150
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 151 return IRQ_HANDLED;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 152 } else if ((r == -ENOMEM) || (r == -EBADMSG) || (r == -EBUSY)) {
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 153 return IRQ_HANDLED;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 154 }
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 155
30f98489f54e02 Michael Thalmeier 2016-04-21 156 if (!phy->aborted)
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 157 pn533_recv_frame(phy->priv, skb, 0);
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 158
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 159 return IRQ_HANDLED;
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 160 }
dd7bedcd2673e4 Michael Thalmeier 2016-03-25 161

:::::: The code at line 131 was first introduced by commit
:::::: dd7bedcd2673e4c8957d15d7e6e649fc6fa40206 NFC: pn533: add I2C phy driver

:::::: TO: Michael Thalmeier <michael.thalmeier@xxxxxxx>
:::::: CC: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip