[soc:starfive/jh7100 9/16] drivers/reset/reset-starfive-jh7100.c:81:17: error: implicit declaration of function 'readq'; did you mean 'readb'?

kernel test robot lkp at intel.com
Thu Dec 16 15:07:58 PST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git starfive/jh7100
head:   a43676272a6e0b398781bc5337ca4cc187ba923d
commit: 0be3a1595bf8c7f39153be02c9aae61dd2108576 [9/16] reset: starfive-jh7100: Add StarFive JH7100 reset driver
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20211217/202112170604.7G6suhnh-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?id=0be3a1595bf8c7f39153be02c9aae61dd2108576
        git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
        git fetch --no-tags soc starfive/jh7100
        git checkout 0be3a1595bf8c7f39153be02c9aae61dd2108576
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash

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/reset/reset-starfive-jh7100.c: In function 'jh7100_reset_update':
>> drivers/reset/reset-starfive-jh7100.c:81:17: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Werror=implicit-function-declaration]
      81 |         value = readq(reg_assert);
         |                 ^~~~~
         |                 readb
>> drivers/reset/reset-starfive-jh7100.c:86:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
      86 |         writeq(value, reg_assert);
         |         ^~~~~~
         |         writeb
   cc1: some warnings being treated as errors


vim +81 drivers/reset/reset-starfive-jh7100.c

    62	
    63	static int jh7100_reset_update(struct reset_controller_dev *rcdev,
    64				       unsigned long id, bool assert)
    65	{
    66		struct jh7100_reset *data = jh7100_reset_from(rcdev);
    67		unsigned long offset = BIT_ULL_WORD(id);
    68		u64 mask = BIT_ULL_MASK(id);
    69		void __iomem *reg_assert = data->base + JH7100_RESET_ASSERT0 + offset * sizeof(u64);
    70		void __iomem *reg_status = data->base + JH7100_RESET_STATUS0 + offset * sizeof(u64);
    71		u64 done = jh7100_reset_asserted[offset] & mask;
    72		u64 value;
    73		unsigned long flags;
    74		int ret;
    75	
    76		if (!assert)
    77			done ^= mask;
    78	
    79		spin_lock_irqsave(&data->lock, flags);
    80	
  > 81		value = readq(reg_assert);
    82		if (assert)
    83			value |= mask;
    84		else
    85			value &= ~mask;
  > 86		writeq(value, reg_assert);
    87	
    88		/* if the associated clock is gated, deasserting might otherwise hang forever */
    89		ret = readq_poll_timeout_atomic(reg_status, value, (value & mask) == done, 0, 1000);
    90	
    91		spin_unlock_irqrestore(&data->lock, flags);
    92		return ret;
    93	}
    94	

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



More information about the linux-arm-kernel mailing list