Hi Mukesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on remoteproc/rproc-next]
[also build test WARNING on linus/master v6.12-rc3 next-20241015]
[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#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Mukesh-Ojha/remoteproc-Add-a-new-remoteproc-state-RPROC_DEFUNCT/20241015-043318
base:   https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git 
rproc-next
patch link:    
https://lore.kernel.org/r/20241014203118.1580024-1-quic_mojha%40quicinc.com
patch subject: [PATCH v2] remoteproc: Add a new remoteproc state RPROC_DEFUNCT
config: x86_64-buildonly-randconfig-002-20241016 
(https://download.01.org/0day-ci/archive/20241016/202410161104.5zibsmlv-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20241016/202410161104.5zibsmlv-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202410161104.5zibsmlv-...@intel.com/

All warnings (new ones prefixed by >>):

   drivers/remoteproc/remoteproc_core.c: In function 'rproc_trigger_recovery':
>> drivers/remoteproc/remoteproc_core.c:1843:25: warning: comparison between 
>> pointer and integer
    1843 |         if (rproc_start == RPROC_DEFUNCT || rproc->state != 
RPROC_CRASHED)
         |                         ^~


vim +1843 drivers/remoteproc/remoteproc_core.c

  1820  
  1821  /**
  1822   * rproc_trigger_recovery() - recover a remoteproc
  1823   * @rproc: the remote processor
  1824   *
  1825   * The recovery is done by resetting all the virtio devices, that way 
all the
  1826   * rpmsg drivers will be reseted along with the remote processor making 
the
  1827   * remoteproc functional again.
  1828   *
  1829   * This function can sleep, so it cannot be called from atomic context.
  1830   *
  1831   * Return: 0 on success or a negative value upon failure
  1832   */
  1833  int rproc_trigger_recovery(struct rproc *rproc)
  1834  {
  1835          struct device *dev = &rproc->dev;
  1836          int ret;
  1837  
  1838          ret = mutex_lock_interruptible(&rproc->lock);
  1839          if (ret)
  1840                  return ret;
  1841  
  1842          /* State could have changed before we got the mutex */
> 1843          if (rproc_start == RPROC_DEFUNCT || rproc->state != 
> RPROC_CRASHED)
  1844                  goto unlock_mutex;
  1845  
  1846          dev_err(dev, "recovering %s\n", rproc->name);
  1847  
  1848          if (rproc_has_feature(rproc, RPROC_FEAT_ATTACH_ON_RECOVERY))
  1849                  ret = rproc_attach_recovery(rproc);
  1850          else
  1851                  ret = rproc_boot_recovery(rproc);
  1852  
  1853  unlock_mutex:
  1854          mutex_unlock(&rproc->lock);
  1855          return ret;
  1856  }
  1857  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to