[PATCH v2 3/4] thermal: devfreq_cooling: Refactor code and switch to use Energy Model

kbuild test robot lkp at intel.com
Sat Feb 8 09:51:16 UTC 2020


Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on linus/master next-20200207]
[cannot apply to tip/sched/core linux/master v5.5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/lukasz-luba-arm-com/Add-support-for-devices-in-the-Energy-Model/20200208-123516
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-a003-20200208 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/thermal/devfreq_cooling.c: In function 'freq_get_state':
>> drivers/thermal/devfreq_cooling.c:207:2: warning: overflow in implicit constant conversion [-Woverflow]
     return THERMAL_CSTATE_INVALID;
     ^

vim +207 drivers/thermal/devfreq_cooling.c

a76caf55e5b356b Ørjan Eide  2015-09-10  188  
a76caf55e5b356b Ørjan Eide  2015-09-10  189  /**
ed9aa27ba36cc93 Lukasz Luba 2020-02-06  190   * freq_get_state() - get the performance index corresponding to a frequency
a76caf55e5b356b Ørjan Eide  2015-09-10  191   * @dfc:	Pointer to devfreq cooling device
ed9aa27ba36cc93 Lukasz Luba 2020-02-06  192   * @freq:	frequency in kHz
a76caf55e5b356b Ørjan Eide  2015-09-10  193   *
ed9aa27ba36cc93 Lukasz Luba 2020-02-06  194   * Return: the performance index associated with the @freq, or
a76caf55e5b356b Ørjan Eide  2015-09-10  195   * THERMAL_CSTATE_INVALID if it wasn't found.
a76caf55e5b356b Ørjan Eide  2015-09-10  196   */
ed9aa27ba36cc93 Lukasz Luba 2020-02-06  197  static int
a76caf55e5b356b Ørjan Eide  2015-09-10  198  freq_get_state(struct devfreq_cooling_device *dfc, unsigned long freq)
a76caf55e5b356b Ørjan Eide  2015-09-10  199  {
a76caf55e5b356b Ørjan Eide  2015-09-10  200  	int i;
a76caf55e5b356b Ørjan Eide  2015-09-10  201  
ed9aa27ba36cc93 Lukasz Luba 2020-02-06  202  	for (i = 0; i <= dfc->max_level; i++) {
ed9aa27ba36cc93 Lukasz Luba 2020-02-06  203  		if (dfc->em->table[i].frequency == freq)
a76caf55e5b356b Ørjan Eide  2015-09-10  204  			return i;
a76caf55e5b356b Ørjan Eide  2015-09-10  205  	}
a76caf55e5b356b Ørjan Eide  2015-09-10  206  
a76caf55e5b356b Ørjan Eide  2015-09-10 @207  	return THERMAL_CSTATE_INVALID;
a76caf55e5b356b Ørjan Eide  2015-09-10  208  }
a76caf55e5b356b Ørjan Eide  2015-09-10  209  

:::::: The code at line 207 was first introduced by commit
:::::: a76caf55e5b356ba20a5a43ac4d9f7a04b20941d thermal: Add devfreq cooling

:::::: TO: Ørjan Eide <orjan.eide at arm.com>
:::::: CC: Eduardo Valentin <edubezval at gmail.com>

---
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: 31556 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200208/3059769e/attachment-0001.gz>


More information about the dri-devel mailing list