From: kernel test robot <lkp@intel.com>
To: Jamie Iles <quic_jiles@quicinc.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [linux-next:master 10020/11353] drivers/i3c/master.c:2200:3: warning: variable 'i2cdev' is uninitialized when used here
Date: Tue, 8 Mar 2022 21:15:38 +0800 [thread overview]
Message-ID: <202203082147.hks5e2ec-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cb153b68ff91cbc434f3de70ac549e110543e1bb
commit: 31b9887c7258ca47d9c665a80f19f006c86756b1 [10020/11353] i3c: remove i2c board info from i2c_dev_desc
config: hexagon-randconfig-r041-20220307 (https://download.01.org/0day-ci/archive/20220308/202203082147.hks5e2ec-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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/next/linux-next.git/commit/?id=31b9887c7258ca47d9c665a80f19f006c86756b1
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 31b9887c7258ca47d9c665a80f19f006c86756b1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/i3c/
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/i3c/master.c:2200:3: warning: variable 'i2cdev' is uninitialized when used here [-Wuninitialized]
i2cdev->dev = i2c_new_client_device(adap, &i2cboardinfo->base);
^~~~~~
drivers/i3c/master.c:2178:29: note: initialize the variable 'i2cdev' to silence this warning
struct i2c_dev_desc *i2cdev;
^
= NULL
1 warning generated.
vim +/i2cdev +2200 drivers/i3c/master.c
2174
2175 static int i3c_master_i2c_adapter_init(struct i3c_master_controller *master)
2176 {
2177 struct i2c_adapter *adap = i3c_master_to_i2c_adapter(master);
2178 struct i2c_dev_desc *i2cdev;
2179 struct i2c_dev_boardinfo *i2cboardinfo;
2180 int ret;
2181
2182 adap->dev.parent = master->dev.parent;
2183 adap->owner = master->dev.parent->driver->owner;
2184 adap->algo = &i3c_master_i2c_algo;
2185 strncpy(adap->name, dev_name(master->dev.parent), sizeof(adap->name));
2186
2187 /* FIXME: Should we allow i3c masters to override these values? */
2188 adap->timeout = 1000;
2189 adap->retries = 3;
2190
2191 ret = i2c_add_adapter(adap);
2192 if (ret)
2193 return ret;
2194
2195 /*
2196 * We silently ignore failures here. The bus should keep working
2197 * correctly even if one or more i2c devices are not registered.
2198 */
2199 list_for_each_entry(i2cboardinfo, &master->boardinfo.i2c, node)
> 2200 i2cdev->dev = i2c_new_client_device(adap, &i2cboardinfo->base);
2201
2202 return 0;
2203 }
2204
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2022-03-08 13:16 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=202203082147.hks5e2ec-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=quic_jiles@quicinc.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 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.