All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [hverkuil-media-tree:tegrav8 2/7] drivers/media/i2c/tc358840.c:320:13: warning: use of uninitialized value '<unknown>' [CWE-457]
Date: Thu, 04 Aug 2022 04:10:47 +0800	[thread overview]
Message-ID: <202208040403.Pyz3NxBi-lkp@intel.com> (raw)

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

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: Manual check reason: "low confidence static check warning: drivers/media/i2c/tc358840.c:320:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]"
:::::: 

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Hans Verkuil <hverkuil@xs4all.nl>

tree:   git://linuxtv.org/hverkuil/media_tree.git tegrav8
head:   386823032a34ce7926c18033b0ca34de9145a206
commit: f51f9140626da0e72ade6bd437ac2fe13e9b0425 [2/7] tc358840: add Toshiba tc358840 HDMI-to-CSI bridge.
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: arm-randconfig-c002-20220731 (https://download.01.org/0day-ci/archive/20220804/202208040403.Pyz3NxBi-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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
        git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
        git fetch --no-tags hverkuil-media-tree tegrav8
        git checkout f51f9140626da0e72ade6bd437ac2fe13e9b0425
        # save the config file
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' 

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

gcc-analyzer warnings: (new ones prefixed by >>)
   In function 'i2c_rd16',
       inlined from 'i2c_wr16_and_or' at drivers/media/i2c/tc358840.c:334:21:
>> drivers/media/i2c/tc358840.c:320:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
     320 |         u16 val;
         |             ^~~
     'enable_audio_block_and_i2s': events 1-2
       |
       | 3332 | static void enable_audio_block_and_i2s(struct v4l2_subdev *sd)
       |      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
       |      |             |
       |      |             (1) entry to 'enable_audio_block_and_i2s'
       |......
       | 3335 |         i2c_wr16_and_or(sd, I2S_PUDCTL, 0, 0);
       |      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       |      |         |
       |      |         (2) calling 'i2c_wr16_and_or' from 'enable_audio_block_and_i2s'
       |
       +--> 'i2c_wr16_and_or': events 3-4
              |
              |  320 |         u16 val;
              |      |             ~~~
              |      |             |
              |      |             (4) use of uninitialized value '<unknown>' here
              |......
              |  332 | static void i2c_wr16_and_or(struct v4l2_subdev *sd, u16 reg, u16 mask, u16 val)
              |      |             ^~~~~~~~~~~~~~~
              |      |             |
              |      |             (3) entry to 'i2c_wr16_and_or'
              |

vim +320 drivers/media/i2c/tc358840.c

f51f9140626da0e Hans Verkuil 2020-02-21  317  
f51f9140626da0e Hans Verkuil 2020-02-21  318  static u16 i2c_rd16(struct v4l2_subdev *sd, u16 reg)
f51f9140626da0e Hans Verkuil 2020-02-21  319  {
f51f9140626da0e Hans Verkuil 2020-02-21 @320  	u16 val;
f51f9140626da0e Hans Verkuil 2020-02-21  321  
f51f9140626da0e Hans Verkuil 2020-02-21  322  	i2c_rd(sd, reg, (u8 *)&val, 2);
f51f9140626da0e Hans Verkuil 2020-02-21  323  
f51f9140626da0e Hans Verkuil 2020-02-21  324  	return val;
f51f9140626da0e Hans Verkuil 2020-02-21  325  }
f51f9140626da0e Hans Verkuil 2020-02-21  326  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-03 20:10 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=202208040403.Pyz3NxBi-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.