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]
Message-ID: <202303170104.d4JG4Rmo-lkp@intel.com>
Date:   Fri, 17 Mar 2023 02:02:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Chen-Yu Tsai <wenst@...omium.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>
Cc:     oe-kbuild-all@...ts.linux.dev, Chen-Yu Tsai <wenst@...omium.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Balsam CHIHI <bchihi@...libre.com>, linux-pm@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register
 thermal zones as hwmon sensors

Hi Chen-Yu,

I love your patch! Yet something to improve:

[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master v6.3-rc2 next-20230316]
[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/Chen-Yu-Tsai/thermal-drivers-mediatek-lvts_thermal-Register-thermal-zones-as-hwmon-sensors/20230315-114601
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link:    https://lore.kernel.org/r/20230315034449.2604197-1-wenst%40chromium.org
patch subject: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20230317/202303170104.d4JG4Rmo-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.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/1f9bbeb9645230bb309c589d8bea6bf066628b44
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Chen-Yu-Tsai/thermal-drivers-mediatek-lvts_thermal-Register-thermal-zones-as-hwmon-sensors/20230315-114601
        git checkout 1f9bbeb9645230bb309c589d8bea6bf066628b44
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/misc/ drivers/net/mdio/ drivers/pci/controller/ drivers/rtc/ drivers/thermal/mediatek/ drivers/tty/serial/ drivers/usb/host/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303170104.d4JG4Rmo-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/thermal/mediatek/lvts_thermal.c: In function 'lvts_ctrl_start':
>> drivers/thermal/mediatek/lvts_thermal.c:997:55: error: 'chip' undeclared (first use in this function)
     997 |                 if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
         |                                                       ^~~~
   drivers/thermal/mediatek/lvts_thermal.c:997:55: note: each undeclared identifier is reported only once for each function it appears in


vim +/chip +997 drivers/thermal/mediatek/lvts_thermal.c

   971	
   972	static int lvts_ctrl_start(struct device *dev, struct lvts_ctrl *lvts_ctrl)
   973	{
   974		struct lvts_sensor *lvts_sensors = lvts_ctrl->sensors;
   975		struct thermal_zone_device *tz;
   976		u32 sensor_map = 0;
   977		int i;
   978	
   979		for (i = 0; i < lvts_ctrl->num_lvts_sensor; i++) {
   980	
   981			int dt_id = lvts_sensors[i].dt_id;
   982	
   983			tz = devm_thermal_of_zone_register(dev, dt_id, &lvts_sensors[i],
   984							   &lvts_ops);
   985			if (IS_ERR(tz)) {
   986				/*
   987				 * This thermal zone is not described in the
   988				 * device tree. It is not an error from the
   989				 * thermal OF code POV, we just continue.
   990				 */
   991				if (PTR_ERR(tz) == -ENODEV)
   992					continue;
   993	
   994				return PTR_ERR(tz);
   995			}
   996	
 > 997			if (devm_thermal_add_hwmon_sysfs(dev, chip->tz_dev))
   998				dev_warn(dev, "zone %d: Failed to add hwmon sysfs attributes\n", dt_id);
   999	
  1000			/*
  1001			 * The thermal zone pointer will be needed in the
  1002			 * interrupt handler, we store it in the sensor
  1003			 * structure. The thermal domain structure will be
  1004			 * passed to the interrupt handler private data as the
  1005			 * interrupt is shared for all the controller
  1006			 * belonging to the thermal domain.
  1007			 */
  1008			lvts_sensors[i].tz = tz;
  1009	
  1010			/*
  1011			 * This sensor was correctly associated with a thermal
  1012			 * zone, let's set the corresponding bit in the sensor
  1013			 * map, so we can enable the temperature monitoring in
  1014			 * the hardware thermal controller.
  1015			 */
  1016			sensor_map |= BIT(i);
  1017		}
  1018	
  1019		/*
  1020		 * Bits:
  1021		 *      9: Single point access flow
  1022		 *    0-3: Enable sensing point 0-3
  1023		 *
  1024		 * The initialization of the thermal zones give us
  1025		 * which sensor point to enable. If any thermal zone
  1026		 * was not described in the device tree, it won't be
  1027		 * enabled here in the sensor map.
  1028		 */
  1029		writel(sensor_map | BIT(9), LVTS_MONCTL0(lvts_ctrl->base));
  1030	
  1031		return 0;
  1032	}
  1033	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ