Re: [PATCH v1] UPSTREAM: media: ov8856: skip OTP read in non-zero ACPI D state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jimmy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on v5.18-rc6 next-20220509]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Jimmy-Su/UPSTREAM-media-ov8856-skip-OTP-read-in-non-zero-ACPI-D-state/20220510-161148
base:   git://linuxtv.org/media_tree.git master
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220510/202205101712.zAVVObID-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 11.3.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://github.com/intel-lab-lkp/linux/commit/7c73f80b49c8ffc328209b21fa3c85ac8b9295d2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jimmy-Su/UPSTREAM-media-ov8856-skip-OTP-read-in-non-zero-ACPI-D-state/20220510-161148
        git checkout 7c73f80b49c8ffc328209b21fa3c85ac8b9295d2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/media/i2c/

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

All warnings (new ones prefixed by >>):

   drivers/media/i2c/ov8856.c: In function 'ov8856_identify_module':
>> drivers/media/i2c/ov8856.c:1715:44: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
    1715 |         if (ov8856->acpi_skip_otp & (width == 3280 | width == 1640))
         |                                      ~~~~~~^~~~~~~


vim +1715 drivers/media/i2c/ov8856.c

  1693	
  1694	static int ov8856_identify_module(struct ov8856 *ov8856)
  1695	{
  1696		struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
  1697		int ret;
  1698		u32 val, width;
  1699	
  1700		if (ov8856->identified)
  1701			return 0;
  1702	
  1703		ret = ov8856_read_reg(ov8856, OV8856_REG_CHIP_ID,
  1704				      OV8856_REG_VALUE_24BIT, &val);
  1705		if (ret)
  1706			return ret;
  1707	
  1708		if (val != OV8856_CHIP_ID) {
  1709			dev_err(&client->dev, "chip id mismatch: %x!=%x",
  1710				OV8856_CHIP_ID, val);
  1711			return -ENXIO;
  1712		}
  1713	
  1714		width = ov8856->cur_mode->width;
> 1715		if (ov8856->acpi_skip_otp & (width == 3280 | width == 1640))
  1716			goto otp_skip;
  1717	
  1718		ret = ov8856_write_reg(ov8856, OV8856_REG_MODE_SELECT,
  1719				       OV8856_REG_VALUE_08BIT, OV8856_MODE_STREAMING);
  1720		if (ret)
  1721			return ret;
  1722	
  1723		ret = ov8856_write_reg(ov8856, OV8856_OTP_MODE_CTRL,
  1724				       OV8856_REG_VALUE_08BIT, OV8856_OTP_MODE_AUTO);
  1725		if (ret) {
  1726			dev_err(&client->dev, "failed to set otp mode");
  1727			return ret;
  1728		}
  1729	
  1730		ret = ov8856_write_reg(ov8856, OV8856_OTP_LOAD_CTRL,
  1731				       OV8856_REG_VALUE_08BIT,
  1732				       OV8856_OTP_LOAD_CTRL_ENABLE);
  1733		if (ret) {
  1734			dev_err(&client->dev, "failed to enable load control");
  1735			return ret;
  1736		}
  1737	
  1738		ret = ov8856_read_reg(ov8856, OV8856_MODULE_REVISION,
  1739				      OV8856_REG_VALUE_08BIT, &val);
  1740		if (ret) {
  1741			dev_err(&client->dev, "failed to read module revision");
  1742			return ret;
  1743		}
  1744	
  1745		dev_info(&client->dev, "OV8856 revision %x (%s) at address 0x%02x\n",
  1746			 val,
  1747			 val == OV8856_2A_MODULE ? "2A" :
  1748			 val == OV8856_1B_MODULE ? "1B" : "unknown revision",
  1749			 client->addr);
  1750	
  1751		ret = ov8856_write_reg(ov8856, OV8856_REG_MODE_SELECT,
  1752				       OV8856_REG_VALUE_08BIT, OV8856_MODE_STANDBY);
  1753		if (ret) {
  1754			dev_err(&client->dev, "failed to exit streaming mode");
  1755			return ret;
  1756		}
  1757	
  1758		ov8856->identified = true;
  1759	
  1760		return 0;
  1761	
  1762	otp_skip:
  1763		ov8856->identified = true;
  1764	
  1765		return 0;
  1766	}
  1767	

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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux