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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210271806.qEkcnm2I-lkp@intel.com>
Date:   Thu, 27 Oct 2022 19:01:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     Qibo Huang <huangqibo.tech@...il.com>, rafael@...nel.org,
        daniel.lezcano@...aro.org, amitk@...nel.org, rui.zhang@...el.com
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Qibo Huang <huangqibo.tech@...il.com>
Subject: Re: [PATCH] thermal/core: cooling device duplicate creation check

Hi Qibo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on rafael-pm/thermal]
[also build test WARNING on linus/master v6.1-rc2 next-20221027]
[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-core-cooling-device-duplicate-creation-check/20221027-111751
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link:    https://lore.kernel.org/r/20221027031648.2452-1-huangqibo.tech%40gmail.com
patch subject: [PATCH] thermal/core: cooling device duplicate creation check
config: x86_64-randconfig-a016
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/a48c9aab70c31e06e9e02f82cb2283153012dfa0
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Qibo-Huang/thermal-core-cooling-device-duplicate-creation-check/20221027-111751
        git checkout a48c9aab70c31e06e9e02f82cb2283153012dfa0
        # 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=x86_64 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 warnings (new ones prefixed by >>):

>> drivers/thermal/thermal_core.c:847:32: warning: no previous prototype for function 'thermal_cdev_get_zone_by_name' [-Wmissing-prototypes]
   struct thermal_cooling_device *thermal_cdev_get_zone_by_name(const char *name)
                                  ^
   drivers/thermal/thermal_core.c:847:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   struct thermal_cooling_device *thermal_cdev_get_zone_by_name(const char *name)
   ^
   static 
   1 warning generated.


vim +/thermal_cdev_get_zone_by_name +847 drivers/thermal/thermal_core.c

   846	
 > 847	struct thermal_cooling_device *thermal_cdev_get_zone_by_name(const char *name)
   848	{
   849		struct thermal_cooling_device *pos = NULL, *ref = ERR_PTR(-EINVAL);
   850		unsigned int found = 0;
   851	
   852		if (!name)
   853			goto exit;
   854	
   855		mutex_lock(&thermal_list_lock);
   856		list_for_each_entry(pos, &thermal_cdev_list, node)
   857			if (!strncasecmp(name, pos->type, THERMAL_NAME_LENGTH)) {
   858				found++;
   859				ref = pos;
   860			}
   861		mutex_unlock(&thermal_list_lock);
   862	
   863		/* nothing has been found, thus an error code for it */
   864		if (found == 0)
   865			ref = ERR_PTR(-ENODEV);
   866		else if (found > 1)
   867		/* Success only when an unique zone is found */
   868			ref = ERR_PTR(-EEXIST);
   869	
   870	exit:
   871		return ref;
   872	}
   873	EXPORT_SYMBOL_GPL(thermal_cdev_get_zone_by_name);
   874	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ