oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chen-Yu Tsai <wenst@chromium.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, Chen-Yu Tsai <wenst@chromium.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Balsam CHIHI <bchihi@baylibre.com>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] thermal/drivers/mediatek/lvts_thermal: Register thermal zones as hwmon sensors
Date: Fri, 17 Mar 2023 02:02:15 +0800	[thread overview]
Message-ID: <202303170104.d4JG4Rmo-lkp@intel.com> (raw)
In-Reply-To: <20230315034449.2604197-1-wenst@chromium.org>

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@intel.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

           reply	other threads:[~2023-03-16 18:03 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230315034449.2604197-1-wenst@chromium.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202303170104.d4JG4Rmo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amitk@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bchihi@baylibre.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).