[PATCH 01/78] media: atmel: properly get pm_runtime

kernel test robot lkp at intel.com
Sat Apr 24 10:36:57 BST 2021


Hi Mauro,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on rockchip/for-next tegra/for-next v5.12-rc8 next-20210423]
[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/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-use-pm_runtime_resume_and_get-instead-of-pm_runtime_get_sync/20210424-145029
base:   git://linuxtv.org/media_tree.git master
config: nios2-randconfig-s031-20210424 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/40fc496edfa42498090c5a0d8230ec732b82bdc9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mauro-Carvalho-Chehab/media-use-pm_runtime_resume_and_get-instead-of-pm_runtime_get_sync/20210424-145029
        git checkout 40fc496edfa42498090c5a0d8230ec732b82bdc9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=nios2 

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

All errors (new ones prefixed by >>):

   drivers/media/platform/atmel/atmel-isc-base.c: In function 'isc_awb_work':
>> drivers/media/platform/atmel/atmel-isc-base.c:1844:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
    1844 |  ret = pm_runtime_resume_and_get(isc->dev);
         |  ^~~
         |  net
   drivers/media/platform/atmel/atmel-isc-base.c:1844:2: note: each undeclared identifier is reported only once for each function it appears in

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
   Depends on TTY && HAS_IOMEM
   Selected by
   - EARLY_PRINTK


vim +1844 drivers/media/platform/atmel/atmel-isc-base.c

  1811	
  1812	static void isc_awb_work(struct work_struct *w)
  1813	{
  1814		struct isc_device *isc =
  1815			container_of(w, struct isc_device, awb_work);
  1816		struct regmap *regmap = isc->regmap;
  1817		struct isc_ctrls *ctrls = &isc->ctrls;
  1818		u32 hist_id = ctrls->hist_id;
  1819		u32 baysel;
  1820		unsigned long flags;
  1821		u32 min, max;
  1822	
  1823		/* streaming is not active anymore */
  1824		if (isc->stop)
  1825			return;
  1826	
  1827		if (ctrls->hist_stat != HIST_ENABLED)
  1828			return;
  1829	
  1830		isc_hist_count(isc, &min, &max);
  1831		ctrls->hist_minmax[hist_id][HIST_MIN_INDEX] = min;
  1832		ctrls->hist_minmax[hist_id][HIST_MAX_INDEX] = max;
  1833	
  1834		if (hist_id != ISC_HIS_CFG_MODE_B) {
  1835			hist_id++;
  1836		} else {
  1837			isc_wb_update(ctrls);
  1838			hist_id = ISC_HIS_CFG_MODE_GR;
  1839		}
  1840	
  1841		ctrls->hist_id = hist_id;
  1842		baysel = isc->config.sd_format->cfa_baycfg << ISC_HIS_CFG_BAYSEL_SHIFT;
  1843	
> 1844		ret = pm_runtime_resume_and_get(isc->dev);
  1845		if (ret < 0)
  1846			return;
  1847	
  1848		/*
  1849		 * only update if we have all the required histograms and controls
  1850		 * if awb has been disabled, we need to reset registers as well.
  1851		 */
  1852		if (hist_id == ISC_HIS_CFG_MODE_GR || ctrls->awb == ISC_WB_NONE) {
  1853			/*
  1854			 * It may happen that DMA Done IRQ will trigger while we are
  1855			 * updating white balance registers here.
  1856			 * In that case, only parts of the controls have been updated.
  1857			 * We can avoid that by locking the section.
  1858			 */
  1859			spin_lock_irqsave(&isc->awb_lock, flags);
  1860			isc_update_awb_ctrls(isc);
  1861			spin_unlock_irqrestore(&isc->awb_lock, flags);
  1862	
  1863			/*
  1864			 * if we are doing just the one time white balance adjustment,
  1865			 * we are basically done.
  1866			 */
  1867			if (ctrls->awb == ISC_WB_ONETIME) {
  1868				v4l2_info(&isc->v4l2_dev,
  1869					  "Completed one time white-balance adjustment.\n");
  1870				/* update the v4l2 controls values */
  1871				isc_update_v4l2_ctrls(isc);
  1872				ctrls->awb = ISC_WB_NONE;
  1873			}
  1874		}
  1875		regmap_write(regmap, ISC_HIS_CFG, hist_id | baysel | ISC_HIS_CFG_RAR);
  1876		isc_update_profile(isc);
  1877		/* if awb has been disabled, we don't need to start another histogram */
  1878		if (ctrls->awb)
  1879			regmap_write(regmap, ISC_CTRLEN, ISC_CTRL_HISREQ);
  1880	
  1881		pm_runtime_put_sync(isc->dev);
  1882	}
  1883	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34795 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210424/f45bd0b0/attachment-0001.gz>


More information about the linux-arm-kernel mailing list