All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/media/i2c/hi846.c:1494:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
Date: Sat, 19 Mar 2022 02:16:32 +0800	[thread overview]
Message-ID: <202203190247.dEZtfdcm-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 19945 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Martin Kepplinger <martin.kepplinger@puri.sm>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Pavel Machek <pavel@ucw.cz>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   551acdc3c3d2b6bc97f11e31dcf960bc36343bfc
commit: e8c0882685f9152f0d729664a12bcbe749cb7736 media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera
date:   5 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 5 months ago
config: riscv-randconfig-c006-20220307 (https://download.01.org/0day-ci/archive/20220319/202203190247.dEZtfdcm-lkp(a)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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c0882685f9152f0d729664a12bcbe749cb7736
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e8c0882685f9152f0d729664a12bcbe749cb7736
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer 

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


clang-analyzer warnings: (new ones prefixed by >>)
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   drivers/soc/qcom/qmi_encdec.c:332:4: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]
                           rc = qmi_encode_basic_elem(&opt_flag_value, buf_src,
                           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/soc/qcom/qmi_encdec.c:332:4: note: Value stored to 'rc' is never read
                           rc = qmi_encode_basic_elem(&opt_flag_value, buf_src,
                           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   Suppressed 15 warnings (15 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   11 warnings generated.
   Suppressed 11 warnings (11 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   Suppressed 15 warnings (15 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   drivers/accessibility/speakup/speakup_apollo.c:147:3: warning: Value stored to 'jiffy_delta_val' is never read [clang-analyzer-deadcode.DeadStores]
                   jiffy_delta_val = jiffy_delta->u.n.value;
                   ^                 ~~~~~~~~~~~~~~~~~~~~~~
   drivers/accessibility/speakup/speakup_apollo.c:147:3: note: Value stored to 'jiffy_delta_val' is never read
                   jiffy_delta_val = jiffy_delta->u.n.value;
                   ^                 ~~~~~~~~~~~~~~~~~~~~~~
   drivers/accessibility/speakup/speakup_apollo.c:148:3: warning: Value stored to 'full_time_val' is never read [clang-analyzer-deadcode.DeadStores]
                   full_time_val = full_time->u.n.value;
                   ^               ~~~~~~~~~~~~~~~~~~~~
   drivers/accessibility/speakup/speakup_apollo.c:148:3: note: Value stored to 'full_time_val' is never read
                   full_time_val = full_time->u.n.value;
                   ^               ~~~~~~~~~~~~~~~~~~~~
   drivers/accessibility/speakup/speakup_apollo.c:149:3: warning: Value stored to 'delay_time_val' is never read [clang-analyzer-deadcode.DeadStores]
                   delay_time_val = delay_time->u.n.value;
                   ^                ~~~~~~~~~~~~~~~~~~~~~
   drivers/accessibility/speakup/speakup_apollo.c:149:3: note: Value stored to 'delay_time_val' is never read
                   delay_time_val = delay_time->u.n.value;
                   ^                ~~~~~~~~~~~~~~~~~~~~~
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   drivers/media/i2c/ccs-pll.c:93:15: warning: Value stored to 's' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
                   const char *s = pll_string(br->which);
                               ^   ~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/ccs-pll.c:93:15: note: Value stored to 's' during its initialization is never read
                   const char *s = pll_string(br->which);
                               ^   ~~~~~~~~~~~~~~~~~~~~~
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   12 warnings generated.
>> drivers/media/i2c/hi846.c:1494:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
                              ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/hi846.c:1494:21: note: Value stored to 'client' during its initialization is never read
           struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
                              ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/hi846.c:1764:2: warning: Value stored to 'tgt_fps' is never read [clang-analyzer-deadcode.DeadStores]
           tgt_fps = hi846->cur_mode->fps;
           ^         ~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/hi846.c:1764:2: note: Value stored to 'tgt_fps' is never read
           tgt_fps = hi846->cur_mode->fps;
           ^         ~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/hi846.c:1805:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct i2c_client *client = v4l2_get_subdevdata(sd);
                              ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/hi846.c:1805:21: note: Value stored to 'client' during its initialization is never read
           struct i2c_client *client = v4l2_get_subdevdata(sd);
                              ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   10 warnings generated.
   drivers/media/i2c/imx258.c:781:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                   ret = imx258_write_reg(imx258, IMX258_REG_TEST_PATTERN,
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/imx258.c:781:3: note: Value stored to 'ret' is never read
                   ret = imx258_write_reg(imx258, IMX258_REG_TEST_PATTERN,
                   ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (6 in non-user code, 3 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   12 warnings generated.
   lib/zstd/decompress.c:1557:4: warning: Value stored to 'remainingSize' is never read [clang-analyzer-deadcode.DeadStores]
                           remainingSize -= 4;
                           ^                ~
   lib/zstd/decompress.c:1557:4: note: Value stored to 'remainingSize' is never read
                           remainingSize -= 4;
                           ^                ~
   Suppressed 11 warnings (6 in non-user code, 5 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   10 warnings generated.
   Suppressed 10 warnings (10 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   7 warnings generated.
   Suppressed 7 warnings (5 in non-user code, 2 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   6 warnings generated.
   drivers/media/mc/mc-request.c:190:23: warning: Value stored to 'mdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct media_device *mdev = req->mdev;
                                ^~~~   ~~~~~~~~~
   drivers/media/mc/mc-request.c:190:23: note: Value stored to 'mdev' during its initialization is never read
           struct media_device *mdev = req->mdev;
                                ^~~~   ~~~~~~~~~
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   Suppressed 15 warnings (15 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   Suppressed 15 warnings (15 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   15 warnings generated.
   Suppressed 15 warnings (15 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

vim +/client +1494 drivers/media/i2c/hi846.c

e8c0882685f915 Martin Kepplinger 2021-09-06  1491  
e8c0882685f915 Martin Kepplinger 2021-09-06  1492  static int hi846_set_video_mode(struct hi846 *hi846, int fps)
e8c0882685f915 Martin Kepplinger 2021-09-06  1493  {
e8c0882685f915 Martin Kepplinger 2021-09-06 @1494  	struct i2c_client *client = v4l2_get_subdevdata(&hi846->sd);
e8c0882685f915 Martin Kepplinger 2021-09-06  1495  	u64 frame_length;
e8c0882685f915 Martin Kepplinger 2021-09-06  1496  	int ret = 0;
e8c0882685f915 Martin Kepplinger 2021-09-06  1497  	int dummy_lines;
e8c0882685f915 Martin Kepplinger 2021-09-06  1498  	u64 link_freq = hi846_get_link_freq(hi846);
e8c0882685f915 Martin Kepplinger 2021-09-06  1499  
e8c0882685f915 Martin Kepplinger 2021-09-06  1500  	dev_dbg(&client->dev, "%s: link freq: %llu\n", __func__,
e8c0882685f915 Martin Kepplinger 2021-09-06  1501  		hi846_get_link_freq(hi846));
e8c0882685f915 Martin Kepplinger 2021-09-06  1502  
e8c0882685f915 Martin Kepplinger 2021-09-06  1503  	do_div(link_freq, fps);
e8c0882685f915 Martin Kepplinger 2021-09-06  1504  	frame_length = link_freq;
e8c0882685f915 Martin Kepplinger 2021-09-06  1505  	do_div(frame_length, HI846_LINE_LENGTH);
e8c0882685f915 Martin Kepplinger 2021-09-06  1506  
e8c0882685f915 Martin Kepplinger 2021-09-06  1507  	dummy_lines = (frame_length > hi846->cur_mode->frame_len) ?
e8c0882685f915 Martin Kepplinger 2021-09-06  1508  			(frame_length - hi846->cur_mode->frame_len) : 0;
e8c0882685f915 Martin Kepplinger 2021-09-06  1509  
e8c0882685f915 Martin Kepplinger 2021-09-06  1510  	frame_length = hi846->cur_mode->frame_len + dummy_lines;
e8c0882685f915 Martin Kepplinger 2021-09-06  1511  
e8c0882685f915 Martin Kepplinger 2021-09-06  1512  	dev_dbg(&client->dev, "%s: frame length calculated: %llu\n", __func__,
e8c0882685f915 Martin Kepplinger 2021-09-06  1513  		frame_length);
e8c0882685f915 Martin Kepplinger 2021-09-06  1514  
e8c0882685f915 Martin Kepplinger 2021-09-06  1515  	hi846_write_reg_16(hi846, HI846_REG_FLL, frame_length & 0xFFFF, &ret);
e8c0882685f915 Martin Kepplinger 2021-09-06  1516  	hi846_write_reg_16(hi846, HI846_REG_LLP,
e8c0882685f915 Martin Kepplinger 2021-09-06  1517  			   HI846_LINE_LENGTH & 0xFFFF, &ret);
e8c0882685f915 Martin Kepplinger 2021-09-06  1518  
e8c0882685f915 Martin Kepplinger 2021-09-06  1519  	return ret;
e8c0882685f915 Martin Kepplinger 2021-09-06  1520  }
e8c0882685f915 Martin Kepplinger 2021-09-06  1521  

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2022-03-18 18:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 18:16 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-16 14:14 drivers/media/i2c/hi846.c:1494:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2022-03-12 23:58 kernel test robot
2022-02-27  4:25 kernel test robot

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=202203190247.dEZtfdcm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.