[hwmon:hwmon-next 6/27] drivers/hwmon/ina3221.c:492:9: error: implicit declaration of function 'pm_runtime_resume_and_get'; did you mean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head:   bb077c79ffcab5f044c8172825f05fa122fbe7d0
commit: 5452ef62fbc3c5ac86f8c80ce1201a07618abc9c [6/27] hwmon: (ina3221) Fix PM usage counter unbalance in ina3221_write_enable
config: i386-randconfig-r003-20201129 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?id=5452ef62fbc3c5ac86f8c80ce1201a07618abc9c
        git remote add hwmon https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
        git fetch --no-tags hwmon hwmon-next
        git checkout 5452ef62fbc3c5ac86f8c80ce1201a07618abc9c
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/hwmon/ina3221.c: In function 'ina3221_write_enable':
>> drivers/hwmon/ina3221.c:492:9: error: implicit declaration of function 'pm_runtime_resume_and_get'; did you mean 'pm_runtime_resume'? [-Werror=implicit-function-declaration]
     492 |   ret = pm_runtime_resume_and_get(ina->pm_dev);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
         |         pm_runtime_resume
   cc1: some warnings being treated as errors

vim +492 drivers/hwmon/ina3221.c

   475	
   476	static int ina3221_write_enable(struct device *dev, int channel, bool enable)
   477	{
   478		struct ina3221_data *ina = dev_get_drvdata(dev);
   479		u16 config, mask = INA3221_CONFIG_CHx_EN(channel);
   480		u16 config_old = ina->reg_config & mask;
   481		u32 tmp;
   482		int ret;
   483	
   484		config = enable ? mask : 0;
   485	
   486		/* Bypass if enable status is not being changed */
   487		if (config_old == config)
   488			return 0;
   489	
   490		/* For enabling routine, increase refcount and resume() at first */
   491		if (enable) {
 > 492			ret = pm_runtime_resume_and_get(ina->pm_dev);
   493			if (ret < 0) {
   494				dev_err(dev, "Failed to get PM runtime\n");
   495				return ret;
   496			}
   497		}
   498	
   499		/* Enable or disable the channel */
   500		tmp = (ina->reg_config & ~mask) | (config & mask);
   501		ret = regmap_write(ina->regmap, INA3221_CONFIG, tmp);
   502		if (ret)
   503			goto fail;
   504	
   505		/* Cache the latest config register value */
   506		ina->reg_config = tmp;
   507	
   508		/* For disabling routine, decrease refcount or suspend() at last */
   509		if (!enable)
   510			pm_runtime_put_sync(ina->pm_dev);
   511	
   512		return 0;
   513	
   514	fail:
   515		if (enable) {
   516			dev_err(dev, "Failed to enable channel %d: error %d\n",
   517				channel, ret);
   518			pm_runtime_put_sync(ina->pm_dev);
   519		}
   520	
   521		return ret;
   522	}
   523	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux