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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202512140153.dNgpAKJt-lkp@intel.com>
Date: Sun, 14 Dec 2025 01:33:55 +0800
From: kernel test robot <lkp@...el.com>
To: Ramiro Oliveira <ramiro.oliveira@...antech.com>,
	Lee Jones <lee@...nel.org>, Linus Walleij <linusw@...nel.org>,
	Bartosz Golaszewski <brgl@...nel.org>,
	Guenter Roeck <linux@...ck-us.net>,
	Andi Shyti <andi.shyti@...nel.org>,
	Daniel Thompson <danielt@...nel.org>,
	Jingoo Han <jingoohan1@...il.com>, Helge Deller <deller@....de>,
	Wim Van Sebroeck <wim@...ux-watchdog.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	linux-gpio@...r.kernel.org, linux-hwmon@...r.kernel.org,
	linux-i2c@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	linux-fbdev@...r.kernel.org, linux-watchdog@...r.kernel.org,
	linux-pm@...r.kernel.org,
	Wenkai Chung <wenkai.chung@...antech.com.tw>,
	Francisco Aragon-Trivino <francisco.aragon-trivino@...antech.com>,
	Hongzhi Wang <hongzhi.wang@...antech.com>,
	Mikhail Tsukerman <mikhail.tsukerman@...antech.com>,
	Thomas Kastner <thomas.kastner@...antech.com>,
	Ramiro Oliveira <ramiro.oliveira@...antech.com>
Subject: Re: [PATCH 8/8] Add Advantech EIO Fan driver

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ