From: kernel test robot <lkp@intel.com>
To: Ramiro Oliveira <ramiro.oliveira@advantech.com>,
Lee Jones <lee@kernel.org>, Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Andi Shyti <andi.shyti@kernel.org>,
Daniel Thompson <danielt@kernel.org>,
Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-i2c@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-watchdog@vger.kernel.org,
linux-pm@vger.kernel.org,
Wenkai Chung <wenkai.chung@advantech.com.tw>,
Francisco Aragon-Trivino <francisco.aragon-trivino@advantech.com>,
Hongzhi Wang <hongzhi.wang@advantech.com>,
Mikhail Tsukerman <mikhail.tsukerman@advantech.com>,
Thomas Kastner <thomas.kastner@advantech.com>,
Ramiro Oliveira <ramiro.oliveira@advantech.com>
Subject: Re: [PATCH 8/8] Add Advantech EIO Fan driver
Date: Sun, 14 Dec 2025 01:33:55 +0800 [thread overview]
Message-ID: <202512140153.dNgpAKJt-lkp@intel.com> (raw)
In-Reply-To: <20251212-upstream-v1-v1-8-d50d40ec8d8a@advantech.com>
Hi Ramiro,
kernel test robot noticed the following build warnings:
[auto build test WARNING on d9771d0dbe18dd643760431870a6abf9b0866bb0]
url: https://github.com/intel-lab-lkp/linux/commits/Ramiro-Oliveira/Add-Advantech-EIO-MFD-driver/20251213-004905
base: d9771d0dbe18dd643760431870a6abf9b0866bb0
patch link: https://lore.kernel.org/r/20251212-upstream-v1-v1-8-d50d40ec8d8a%40advantech.com
patch subject: [PATCH 8/8] Add Advantech EIO Fan driver
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20251214/202512140153.dNgpAKJt-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251214/202512140153.dNgpAKJt-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512140153.dNgpAKJt-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/thermal/eio_fan.c: In function 'eio_fan_probe':
>> drivers/thermal/eio_fan.c:391:21: warning: variable 'temps_mc' set but not used [-Wunused-but-set-variable]
391 | int temps_mc[TRIP_NUM];
| ^~~~~~~~
vim +/temps_mc +391 drivers/thermal/eio_fan.c
375
376 static int eio_fan_probe(struct platform_device *pdev)
377 {
378 struct device *dev = &pdev->dev;
379 unsigned int fan_id;
380 int ret;
381
382 if (!dev_get_drvdata(dev->parent)) {
383 dev_err(dev, "eio_core not present\n");
384 return -ENODEV;
385 }
386
387 for (fan_id = 0; fan_id < FAN_MAX; fan_id++) {
388 u8 state = 0, name = 0;
389 int trip_hi = 0, trip_lo = 0, trip_stop = 0;
390 int pwm_hi = 0, pwm_lo = 0;
> 391 int temps_mc[TRIP_NUM];
392 struct eio_fan_dev *fan;
393 struct thermal_zone_device *tzd;
394 struct thermal_cooling_device *cdev;
395
396 if (pmc_read(dev->parent, CTRL_STATE, fan_id, &state) ||
397 pmc_read(dev->parent, CTRL_TYPE, fan_id, &name) ||
398 pmc_read(dev->parent, CTRL_THERM_HIGH, fan_id, &trip_hi) ||
399 pmc_read(dev->parent, CTRL_THERM_LOW, fan_id, &trip_lo) ||
400 pmc_read(dev->parent, CTRL_THERM_STOP, fan_id, &trip_stop) ||
401 pmc_read(dev->parent, CTRL_PWM_HIGH, fan_id, &pwm_hi) ||
402 pmc_read(dev->parent, CTRL_PWM_LOW, fan_id, &pwm_lo)) {
403 dev_info(dev, "fan%u: pmc read error, skipping\n", fan_id);
404 continue;
405 }
406
407 if (!(state & 0x1)) {
408 dev_info(dev, "fan%u: firmware reports disabled\n", fan_id);
409 continue;
410 }
411
412 if (!fan_name[name][0]) {
413 dev_info(dev, "fan%u: unknown name index %u\n", fan_id, name);
414 continue;
415 }
416
417 temps_mc[TRIP_HIGH] = DECI_KELVIN_TO_MILLI_CELSIUS(trip_hi);
418 temps_mc[TRIP_LOW] = DECI_KELVIN_TO_MILLI_CELSIUS(trip_lo);
419 temps_mc[TRIP_STOP] = DECI_KELVIN_TO_MILLI_CELSIUS(trip_stop);
420
421 fan = devm_kzalloc(dev, sizeof(*fan), GFP_KERNEL);
422 if (!fan)
423 return -ENOMEM;
424
425 fan->mfd = dev->parent;
426 fan->id = (u8)fan_id;
427
428 fan->trip_priv[TRIP_HIGH].trip_ctl = CTRL_THERM_HIGH;
429 fan->trip_priv[TRIP_LOW].trip_ctl = CTRL_THERM_LOW;
430 fan->trip_priv[TRIP_STOP].trip_ctl = CTRL_THERM_STOP;
431
432 struct thermal_trip trips[TRIP_NUM] = {
433 [TRIP_HIGH] = {
434 .type = THERMAL_TRIP_ACTIVE,
435 .temperature = DECI_KELVIN_TO_MILLI_CELSIUS(trip_hi),
436 .flags = THERMAL_TRIP_FLAG_RW_TEMP,
437 .priv = &fan->trip_priv[TRIP_HIGH],
438 },
439 [TRIP_LOW] = {
440 .type = THERMAL_TRIP_ACTIVE,
441 .temperature = DECI_KELVIN_TO_MILLI_CELSIUS(trip_lo),
442 .flags = THERMAL_TRIP_FLAG_RW_TEMP,
443 .priv = &fan->trip_priv[TRIP_LOW],
444 },
445 [TRIP_STOP] = {
446 .type = THERMAL_TRIP_ACTIVE,
447 .temperature = DECI_KELVIN_TO_MILLI_CELSIUS(trip_stop),
448 .flags = THERMAL_TRIP_FLAG_RW_TEMP,
449 .priv = &fan->trip_priv[TRIP_STOP],
450 },
451 };
452
453 tzd = thermal_zone_device_register_with_trips(fan_name[name],
454 trips, TRIP_NUM,
455 fan,
456 &zone_ops,
457 NULL,
458 0, 0);
459 if (IS_ERR(tzd))
460 return PTR_ERR(tzd);
461
462 cdev = thermal_cooling_device_register(fan_name[name], fan, &cooling_ops);
463 if (IS_ERR(cdev)) {
464 thermal_zone_device_unregister(tzd);
465 dev_err(dev, "fan%u: cdev register failed: %ld\n",
466 fan_id, PTR_ERR(cdev));
467 return PTR_ERR(cdev);
468 }
469
470 dev_set_drvdata(thermal_zone_device(tzd), tzd);
471 ret = device_create_file(thermal_zone_device(tzd), &dev_attr_fan_mode);
472 if (ret)
473 dev_warn(dev, "Error create thermal zone fan_mode sysfs\n");
474 }
475 return 0;
476 }
477
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-12-13 17:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 16:40 [PATCH 0/8] Add support for Advantech EIO MFD series devices Ramiro Oliveira
2025-12-12 16:40 ` [PATCH 1/8] Add Advantech EIO MFD driver Ramiro Oliveira
2025-12-13 15:19 ` kernel test robot
2026-01-08 14:45 ` Lee Jones
2025-12-12 16:40 ` [PATCH 2/8] Add Advantech EIO GPIO driver Ramiro Oliveira
2025-12-14 0:54 ` Bartosz Golaszewski
2025-12-12 16:40 ` [PATCH 3/8] Add Advantech EIO Hardware Monitor driver Ramiro Oliveira
2025-12-12 18:21 ` Guenter Roeck
2025-12-12 16:40 ` [PATCH 4/8] Add Advantech EIO I2C driver Ramiro Oliveira
2025-12-12 16:40 ` [PATCH 5/8] Add Advantech EIO Backlight driver Ramiro Oliveira
2025-12-12 17:59 ` Daniel Thompson
2025-12-12 16:40 ` [PATCH 6/8] Add Advantech EIO Watchdog driver Ramiro Oliveira
2025-12-12 18:43 ` Guenter Roeck
2025-12-12 16:40 ` [PATCH 7/8] Add Advantech EIO Thermal driver Ramiro Oliveira
2025-12-12 16:40 ` [PATCH 8/8] Add Advantech EIO Fan driver Ramiro Oliveira
2025-12-13 17:33 ` kernel test robot [this message]
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=202512140153.dNgpAKJt-lkp@intel.com \
--to=lkp@intel.com \
--cc=andi.shyti@kernel.org \
--cc=brgl@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=francisco.aragon-trivino@advantech.com \
--cc=hongzhi.wang@advantech.com \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lukasz.luba@arm.com \
--cc=mikhail.tsukerman@advantech.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=ramiro.oliveira@advantech.com \
--cc=rui.zhang@intel.com \
--cc=thomas.kastner@advantech.com \
--cc=wenkai.chung@advantech.com.tw \
--cc=wim@linux-watchdog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.