lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 11 Oct 2022 00:44:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     Qibo Huang <huangqibo.tech@...il.com>, rafael@...nel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org, amitk@...nel.org,
        rui.zhang@...el.com, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, daniel.lezcano@...aro.org,
        Qibo Huang <huangqibo.tech@...il.com>
Subject: Re: [PATCH] thermal/of: Initialize the thermal governor for
 configuring thermal zones.

Hi Qibo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master next-20221010]
[cannot apply to v6.0]
[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/Qibo-Huang/thermal-of-Initialize-the-thermal-governor-for-configuring-thermal-zones/20221010-182004
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
config: powerpc-randconfig-r006-20221010
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/12bc487799000aec6ff68d4ba0e2bcfba9359730
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Qibo-Huang/thermal-of-Initialize-the-thermal-governor-for-configuring-thermal-zones/20221010-182004
        git checkout 12bc487799000aec6ff68d4ba0e2bcfba9359730
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/thermal/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/thermal/thermal_of.c:407:31: error: use of undeclared identifier 'child'; did you mean 'while'?
           if (!of_property_read_string(child, "thermal-governor",
                                        ^~~~~
                                        while
>> drivers/thermal/thermal_of.c:407:31: error: expected expression
>> drivers/thermal/thermal_of.c:408:7: error: use of undeclared identifier 'governor_name'; did you mean 'kernfs_name'?
                                           &governor_name))
                                            ^~~~~~~~~~~~~
                                            kernfs_name
   include/linux/kernfs.h:392:5: note: 'kernfs_name' declared here
   int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen);
       ^
   drivers/thermal/thermal_of.c:409:31: error: use of undeclared identifier 'governor_name'; did you mean 'kernfs_name'?
                   strscpy(tzp->governor_name, governor_name,
                                               ^~~~~~~~~~~~~
                                               kernfs_name
   include/linux/kernfs.h:392:5: note: 'kernfs_name' declared here
   int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen);
       ^
   4 errors generated.


vim +407 drivers/thermal/thermal_of.c

   395	
   396	static struct thermal_zone_params *thermal_of_parameters_init(struct device_node *np)
   397	{
   398		struct thermal_zone_params *tzp;
   399		int coef[2];
   400		int ncoef = ARRAY_SIZE(coef);
   401		int prop, ret;
   402	
   403		tzp = kzalloc(sizeof(*tzp), GFP_KERNEL);
   404		if (!tzp)
   405			return ERR_PTR(-ENOMEM);
   406	
 > 407		if (!of_property_read_string(child, "thermal-governor",
 > 408						&governor_name))
   409			strscpy(tzp->governor_name, governor_name,
   410					THERMAL_NAME_LENGTH);
   411	
   412		tzp->no_hwmon = true;
   413	
   414		if (!of_property_read_u32(np, "sustainable-power", &prop))
   415			tzp->sustainable_power = prop;
   416	
   417		/*
   418		 * For now, the thermal framework supports only one sensor per
   419		 * thermal zone. Thus, we are considering only the first two
   420		 * values as slope and offset.
   421		 */
   422		ret = of_property_read_u32_array(np, "coefficients", coef, ncoef);
   423		if (ret) {
   424			coef[0] = 1;
   425			coef[1] = 0;
   426		}
   427	
   428		tzp->slope = coef[0];
   429		tzp->offset = coef[1];
   430	
   431		return tzp;
   432	}
   433	

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

View attachment "config" of type "text/plain" (147384 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ