[PATCH] soc: rockchip: Fix compile-testing SoC drivers

kernel test robot lkp at intel.com
Fri Apr 22 20:45:43 PDT 2022


Hi Brian,

I love your patch! Yet something to improve:

[auto build test ERROR on rockchip/for-next]
[also build test ERROR on soc/for-next linus/master v5.18-rc3 next-20220422]
[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/Brian-Norris/soc-rockchip-Fix-compile-testing-SoC-drivers/20220423-022353
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220423/202204231158.8u0SOzm6-lkp@intel.com/config)
compiler: sh4-linux-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://github.com/intel-lab-lkp/linux/commit/bb37a0dd33d08baf273f38dbea4951d50f020588
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Brian-Norris/soc-rockchip-Fix-compile-testing-SoC-drivers/20220423-022353
        git checkout bb37a0dd33d08baf273f38dbea4951d50f020588
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/soc/

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/soc/rockchip/pm_domains.c: In function 'rockchip_pmu_set_idle_request':
>> drivers/soc/rockchip/pm_domains.c:181:9: error: implicit declaration of function 'dsb' [-Werror=implicit-function-declaration]
     181 |         dsb(sy);
         |         ^~~
>> drivers/soc/rockchip/pm_domains.c:181:13: error: 'sy' undeclared (first use in this function); did you mean 's8'?
     181 |         dsb(sy);
         |             ^~
         |             s8
   drivers/soc/rockchip/pm_domains.c:181:13: note: each undeclared identifier is reported only once for each function it appears in
   drivers/soc/rockchip/pm_domains.c: In function 'rockchip_do_pmu_set_power_domain':
   drivers/soc/rockchip/pm_domains.c:288:13: error: 'sy' undeclared (first use in this function); did you mean 's8'?
     288 |         dsb(sy);
         |             ^~
         |             s8
   cc1: some warnings being treated as errors


vim +/dsb +181 drivers/soc/rockchip/pm_domains.c

e4c8cd82d5e114 Caesar Wang  2016-10-13  159  
7c696693a4f54d Caesar Wang  2015-09-08  160  static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
7c696693a4f54d Caesar Wang  2015-09-08  161  					 bool idle)
7c696693a4f54d Caesar Wang  2015-09-08  162  {
7c696693a4f54d Caesar Wang  2015-09-08  163  	const struct rockchip_domain_info *pd_info = pd->info;
e4c8cd82d5e114 Caesar Wang  2016-10-13  164  	struct generic_pm_domain *genpd = &pd->genpd;
7c696693a4f54d Caesar Wang  2015-09-08  165  	struct rockchip_pmu *pmu = pd->pmu;
e4c8cd82d5e114 Caesar Wang  2016-10-13  166  	unsigned int target_ack;
7c696693a4f54d Caesar Wang  2015-09-08  167  	unsigned int val;
e4c8cd82d5e114 Caesar Wang  2016-10-13  168  	bool is_idle;
e4c8cd82d5e114 Caesar Wang  2016-10-13  169  	int ret;
7c696693a4f54d Caesar Wang  2015-09-08  170  
6aa841c8097fee Elaine Zhang 2016-03-10  171  	if (pd_info->req_mask == 0)
6aa841c8097fee Elaine Zhang 2016-03-10  172  		return 0;
79bb17ce8edb31 Elaine Zhang 2016-12-23  173  	else if (pd_info->req_w_mask)
79bb17ce8edb31 Elaine Zhang 2016-12-23  174  		regmap_write(pmu->regmap, pmu->info->req_offset,
79bb17ce8edb31 Elaine Zhang 2016-12-23  175  			     idle ? (pd_info->req_mask | pd_info->req_w_mask) :
79bb17ce8edb31 Elaine Zhang 2016-12-23  176  			     pd_info->req_w_mask);
79bb17ce8edb31 Elaine Zhang 2016-12-23  177  	else
7c696693a4f54d Caesar Wang  2015-09-08  178  		regmap_update_bits(pmu->regmap, pmu->info->req_offset,
7c696693a4f54d Caesar Wang  2015-09-08  179  				   pd_info->req_mask, idle ? -1U : 0);
7c696693a4f54d Caesar Wang  2015-09-08  180  
7c696693a4f54d Caesar Wang  2015-09-08 @181  	dsb(sy);
7c696693a4f54d Caesar Wang  2015-09-08  182  
e4c8cd82d5e114 Caesar Wang  2016-10-13  183  	/* Wait util idle_ack = 1 */
e4c8cd82d5e114 Caesar Wang  2016-10-13  184  	target_ack = idle ? pd_info->ack_mask : 0;
e4c8cd82d5e114 Caesar Wang  2016-10-13  185  	ret = readx_poll_timeout_atomic(rockchip_pmu_read_ack, pmu, val,
e4c8cd82d5e114 Caesar Wang  2016-10-13  186  					(val & pd_info->ack_mask) == target_ack,
e4c8cd82d5e114 Caesar Wang  2016-10-13  187  					0, 10000);
e4c8cd82d5e114 Caesar Wang  2016-10-13  188  	if (ret) {
e4c8cd82d5e114 Caesar Wang  2016-10-13  189  		dev_err(pmu->dev,
e4c8cd82d5e114 Caesar Wang  2016-10-13  190  			"failed to get ack on domain '%s', val=0x%x\n",
e4c8cd82d5e114 Caesar Wang  2016-10-13  191  			genpd->name, val);
e4c8cd82d5e114 Caesar Wang  2016-10-13  192  		return ret;
e4c8cd82d5e114 Caesar Wang  2016-10-13  193  	}
7c696693a4f54d Caesar Wang  2015-09-08  194  
e4c8cd82d5e114 Caesar Wang  2016-10-13  195  	ret = readx_poll_timeout_atomic(rockchip_pmu_domain_is_idle, pd,
e4c8cd82d5e114 Caesar Wang  2016-10-13  196  					is_idle, is_idle == idle, 0, 10000);
e4c8cd82d5e114 Caesar Wang  2016-10-13  197  	if (ret) {
e4c8cd82d5e114 Caesar Wang  2016-10-13  198  		dev_err(pmu->dev,
e4c8cd82d5e114 Caesar Wang  2016-10-13  199  			"failed to set idle on domain '%s', val=%d\n",
e4c8cd82d5e114 Caesar Wang  2016-10-13  200  			genpd->name, is_idle);
e4c8cd82d5e114 Caesar Wang  2016-10-13  201  		return ret;
e4c8cd82d5e114 Caesar Wang  2016-10-13  202  	}
7c696693a4f54d Caesar Wang  2015-09-08  203  
7c696693a4f54d Caesar Wang  2015-09-08  204  	return 0;
7c696693a4f54d Caesar Wang  2015-09-08  205  }
7c696693a4f54d Caesar Wang  2015-09-08  206  

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



More information about the Linux-rockchip mailing list