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/hi847.c:2295:13: warning: use of uninitialized value '<unknown>' [CWE-457]
Date: Thu, 21 Jul 2022 02:28:15 +0800	[thread overview]
Message-ID: <202207210243.hLC0zAII-lkp@intel.com> (raw)

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

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: Manual check reason: "low confidence static check warning: drivers/media/i2c/hi847.c:2295: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: Shawn Tu <shawnx.tu@intel.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Sakari Ailus <sakari.ailus@linux.intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ca85855bdcae8f84f1512e88b4c75009ea17ea2f
commit: da15b409ef4c56e9741deddb91798370802d1d02 media: hi847: Add support for Hi-847 sensor
date:   6 months ago
:::::: branch date: 2 days ago
:::::: commit date: 6 months ago
config: arm-randconfig-c002-20220718 (https://download.01.org/0day-ci/archive/20220721/202207210243.hLC0zAII-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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da15b409ef4c56e9741deddb91798370802d1d02
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout da15b409ef4c56e9741deddb91798370802d1d02
        # save the config file
         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 >>)
   drivers/media/i2c/hi847.c: In function 'hi847_test_pattern':
>> drivers/media/i2c/hi847.c:2295:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    2295 |         u32 val;
         |             ^~~
     'hi847_test_pattern': event 1
       |
       | 2295 |         u32 val;
       |      |             ^~~
       |      |             |
       |      |             (1) use of uninitialized value '<unknown>' here
       |
   drivers/media/i2c/hi847.c: In function 'hi847_set_ctrl_hflip':
   drivers/media/i2c/hi847.c:2375:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    2375 |         u32 val;
         |             ^~~
     'hi847_set_ctrl_hflip': event 1
       |
       | 2375 |         u32 val;
       |      |             ^~~
       |      |             |
       |      |             (1) use of uninitialized value '<unknown>' here
       |
   drivers/media/i2c/hi847.c: In function 'hi847_set_ctrl_vflip':
   drivers/media/i2c/hi847.c:2394:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    2394 |         u32 val;
         |             ^~~
     'hi847_set_ctrl_vflip': event 1
       |
       | 2394 |         u32 val;
       |      |             ^~~
       |      |             |
       |      |             (1) use of uninitialized value '<unknown>' here
       |
   drivers/media/i2c/hi847.c: In function 'hi847_identify_module':
   drivers/media/i2c/hi847.c:2822:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    2822 |         u32 val;
         |             ^~~
     'hi847_identify_module': event 1
       |
       | 2822 |         u32 val;
       |      |             ^~~
       |      |             |
       |      |             (1) use of uninitialized value '<unknown>' here
       |
   drivers/media/i2c/hi847.c: In function 'hi847_check_hwcfg':
   drivers/media/i2c/hi847.c:2845:13: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    2845 |         u32 mclk;
         |             ^~~~
     'hi847_check_hwcfg': event 1
       |
       | 2845 |         u32 mclk;
       |      |             ^~~~
       |      |             |
       |      |             (1) use of uninitialized value '<unknown>' here
       |

vim +2295 drivers/media/i2c/hi847.c

da15b409ef4c56 Shawn Tu 2022-01-11  2291  
da15b409ef4c56 Shawn Tu 2022-01-11  2292  static int hi847_test_pattern(struct hi847 *hi847, u32 pattern)
da15b409ef4c56 Shawn Tu 2022-01-11  2293  {
da15b409ef4c56 Shawn Tu 2022-01-11  2294  	int ret;
da15b409ef4c56 Shawn Tu 2022-01-11 @2295  	u32 val;
da15b409ef4c56 Shawn Tu 2022-01-11  2296  
da15b409ef4c56 Shawn Tu 2022-01-11  2297  	if (pattern) {
da15b409ef4c56 Shawn Tu 2022-01-11  2298  		ret = hi847_read_reg(hi847, HI847_REG_ISP,
da15b409ef4c56 Shawn Tu 2022-01-11  2299  				     HI847_REG_VALUE_16BIT, &val);
da15b409ef4c56 Shawn Tu 2022-01-11  2300  		if (ret)
da15b409ef4c56 Shawn Tu 2022-01-11  2301  			return ret;
da15b409ef4c56 Shawn Tu 2022-01-11  2302  
da15b409ef4c56 Shawn Tu 2022-01-11  2303  		ret = hi847_write_reg(hi847, HI847_REG_ISP,
da15b409ef4c56 Shawn Tu 2022-01-11  2304  				      HI847_REG_VALUE_16BIT,
da15b409ef4c56 Shawn Tu 2022-01-11  2305  				      val | HI847_REG_ISP_TPG_EN);
da15b409ef4c56 Shawn Tu 2022-01-11  2306  		if (ret)
da15b409ef4c56 Shawn Tu 2022-01-11  2307  			return ret;
da15b409ef4c56 Shawn Tu 2022-01-11  2308  	}
da15b409ef4c56 Shawn Tu 2022-01-11  2309  
da15b409ef4c56 Shawn Tu 2022-01-11  2310  	ret = hi847_read_reg(hi847, HI847_REG_TEST_PATTERN,
da15b409ef4c56 Shawn Tu 2022-01-11  2311  			     HI847_REG_VALUE_16BIT, &val);
da15b409ef4c56 Shawn Tu 2022-01-11  2312  	if (ret)
da15b409ef4c56 Shawn Tu 2022-01-11  2313  		return ret;
da15b409ef4c56 Shawn Tu 2022-01-11  2314  
da15b409ef4c56 Shawn Tu 2022-01-11  2315  	return hi847_write_reg(hi847, HI847_REG_TEST_PATTERN,
da15b409ef4c56 Shawn Tu 2022-01-11  2316  			       HI847_REG_VALUE_16BIT, val | pattern << 8);
da15b409ef4c56 Shawn Tu 2022-01-11  2317  }
da15b409ef4c56 Shawn Tu 2022-01-11  2318  

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

             reply	other threads:[~2022-07-20 18:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 18:28 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 12:32 drivers/media/i2c/hi847.c:2295:13: warning: use of uninitialized value '<unknown>' [CWE-457] 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=202207210243.hLC0zAII-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.