linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/media/i2c/adv748x/adv748x-core.c:132:10: warning: Identical inner 'return' condition is always true.
@ 2020-08-19 18:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-19 18:56 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: kbuild-all, linux-kernel, linux-media

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   18445bf405cb331117bc98427b1ba6f12418ad17
commit: 32a363d0b0b142f35512848dc646ee53e0926723 media: Kconfig files: use select for V4L2 subdevs and MC
date:   4 months ago
compiler: h8300-linux-gcc (GCC) 9.3.0

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


cppcheck warnings: (new ones prefixed by >>)

>> drivers/media/i2c/adv748x/adv748x-core.c:132:10: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
     return *error;
            ^
   drivers/media/i2c/adv748x/adv748x-core.c:131:6: note: outer condition: *error
    if (*error)
        ^
   drivers/media/i2c/adv748x/adv748x-core.c:132:10: note: identical inner condition: *error
     return *error;
            ^
>> drivers/media/i2c/tda1997x.c:2108:6: warning: Variable 'reg' is reassigned a value before the old one has been used. [redundantAssignment]
    reg = io_read(sd, REG_CMTP_REG10);
        ^
   drivers/media/i2c/tda1997x.c:2106:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = io_read(sd, REG_VERSION);
        ^
   drivers/media/i2c/tda1997x.c:2108:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = io_read(sd, REG_CMTP_REG10);
        ^
   drivers/media/i2c/tda1997x.c:2176:6: warning: Variable 'reg' is reassigned a value before the old one has been used. [redundantAssignment]
    reg = HDMI_CTRL_MUTE_AUTO << HDMI_CTRL_MUTE_SHIFT;
        ^
   drivers/media/i2c/tda1997x.c:2108:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = io_read(sd, REG_CMTP_REG10);
        ^
   drivers/media/i2c/tda1997x.c:2176:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = HDMI_CTRL_MUTE_AUTO << HDMI_CTRL_MUTE_SHIFT;
        ^
>> drivers/media/i2c/tda1997x.c:2539:34: warning: Local variable pdata shadows outer variable [shadowVar]
     struct tda1997x_platform_data *pdata =
                                    ^
   drivers/media/i2c/tda1997x.c:2508:33: note: Shadowed declaration
    struct tda1997x_platform_data *pdata;
                                   ^
   drivers/media/i2c/tda1997x.c:2539:34: note: Shadow variable
     struct tda1997x_platform_data *pdata =
                                    ^

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=32a363d0b0b142f35512848dc646ee53e0926723
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 32a363d0b0b142f35512848dc646ee53e0926723
vim +/return +132 drivers/media/i2c/adv748x/adv748x-core.c

3e89586a64dfd2 Kieran Bingham   2017-07-06  127  
0ad5b80cff5093 Niklas Söderlund 2018-11-28  128  static int adv748x_write_check(struct adv748x_state *state, u8 page, u8 reg,
0ad5b80cff5093 Niklas Söderlund 2018-11-28  129  			       u8 value, int *error)
0ad5b80cff5093 Niklas Söderlund 2018-11-28  130  {
0ad5b80cff5093 Niklas Söderlund 2018-11-28  131  	if (*error)
0ad5b80cff5093 Niklas Söderlund 2018-11-28 @132  		return *error;
0ad5b80cff5093 Niklas Söderlund 2018-11-28  133  
0ad5b80cff5093 Niklas Söderlund 2018-11-28  134  	*error = adv748x_write(state, page, reg, value);
0ad5b80cff5093 Niklas Söderlund 2018-11-28  135  	return *error;
0ad5b80cff5093 Niklas Söderlund 2018-11-28  136  }
0ad5b80cff5093 Niklas Söderlund 2018-11-28  137  

:::::: The code at line 132 was first introduced by commit
:::::: 0ad5b80cff509360ef9953ac7ce5a56964210c30 media: i2c: adv748x: configure number of lanes used for TXA CSI-2 transmitter

:::::: TO: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
:::::: CC: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-19 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 18:56 drivers/media/i2c/adv748x/adv748x-core.c:132:10: warning: Identical inner 'return' condition is always true kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).