All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jimmy Su <jimmy.su@intel.com>, linux-media@vger.kernel.org
Cc: kbuild-all@lists.01.org, sakari.ailus@linux.intel.com,
	andy.yeh@intel.com, jimmy.su@intel.com, yhuang@ovt.com,
	akeem.chen@ovt.com
Subject: Re: [PATCH v1] UPSTREAM: media: ov8856: skip OTP read in non-zero ACPI D state
Date: Tue, 10 May 2022 17:36:54 +0800	[thread overview]
Message-ID: <202205101712.zAVVObID-lkp@intel.com> (raw)
In-Reply-To: <20220510080850.4306-1-jimmy.su@intel.com>

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@intel.com/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@intel.com>

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

      reply	other threads:[~2022-05-10  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  8:08 [PATCH v1] UPSTREAM: media: ov8856: skip OTP read in non-zero ACPI D state Jimmy Su
2022-05-10  9:36 ` kernel test robot [this message]

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=202205101712.zAVVObID-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akeem.chen@ovt.com \
    --cc=andy.yeh@intel.com \
    --cc=jimmy.su@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=yhuang@ovt.com \
    /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.