From: kernel test robot <lkp@intel.com>
To: Anil Kumar Mamidala <anil.mamidala@xilinx.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Stefan Hladnik <stefan.hladnik@gmail.com>,
Florian Rebaudo <frebaudo@witekio.com>
Subject: [xilinx-xlnx:xlnx_rebase_v5.15_LTS 794/1181] drivers/media/i2c/ap1302.c:1829:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true
Date: Mon, 20 Jun 2022 23:44:10 +0800 [thread overview]
Message-ID: <202206202317.ugyVbIJa-lkp@intel.com> (raw)
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 59523b5c4aca0174f1f8cba2a07d3b3328b7c80e
commit: b0d8c0539b1bde057e9dafa153ffc0e98d7631e8 [794/1181] media: i2c: Add ON Semiconductor AP1302 ISP driver
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20220620/202206202317.ugyVbIJa-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af6d2a0b6825e71965f3e2701a63c239fa0ad70f)
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/Xilinx/linux-xlnx/commit/b0d8c0539b1bde057e9dafa153ffc0e98d7631e8
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15_LTS
git checkout b0d8c0539b1bde057e9dafa153ffc0e98d7631e8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/media/i2c/ drivers/phy/xilinx/ drivers/staging/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/ap1302.c:1829:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (enable == ap1302->streaming)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ap1302.c:1845:6: note: uninitialized use occurs here
if (ret < 0)
^~~
drivers/media/i2c/ap1302.c:1829:2: note: remove the 'if' if its condition is always false
if (enable == ap1302->streaming)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ap1302.c:1825:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +1829 drivers/media/i2c/ap1302.c
1821
1822 static int ap1302_s_stream(struct v4l2_subdev *sd, int enable)
1823 {
1824 struct ap1302_device *ap1302 = to_ap1302(sd);
1825 int ret;
1826
1827 mutex_lock(&ap1302->lock);
1828
> 1829 if (enable == ap1302->streaming)
1830 goto done;
1831
1832 if (enable) {
1833 ret = ap1302_configure(ap1302);
1834 if (ret < 0)
1835 goto done;
1836
1837 ret = ap1302_stall(ap1302, false);
1838 } else {
1839 ret = ap1302_stall(ap1302, true);
1840 }
1841
1842 done:
1843 mutex_unlock(&ap1302->lock);
1844
1845 if (ret < 0)
1846 dev_err(ap1302->dev, "Failed to %s stream: %d\n",
1847 enable ? "start" : "stop", ret);
1848
1849 return ret;
1850 }
1851
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-06-20 15:44 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=202206202317.ugyVbIJa-lkp@intel.com \
--to=lkp@intel.com \
--cc=anil.mamidala@xilinx.com \
--cc=frebaudo@witekio.com \
--cc=kbuild-all@lists.01.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=monstr@monstr.eu \
--cc=stefan.hladnik@gmail.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