[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508211640.8MtPueLL-lkp@intel.com>
Date: Thu, 21 Aug 2025 16:41:06 +0800
From: kernel test robot <lkp@...el.com>
To: Antheas Kapenekakis <lkml@...heas.dev>,
platform-driver-x86@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
Hans de Goede <hansg@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Derek John Clark <derekjohn.clark@...il.com>,
Joaquín Ignacio Aramendía <samsagax@...il.com>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Antheas Kapenekakis <lkml@...heas.dev>
Subject: Re: [PATCH v1 4/5] platform/x86: ayaneo-ec: Add controller power and
modules attributes
Hi Antheas,
kernel test robot noticed the following build warnings:
[auto build test WARNING on c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9]
url: https://github.com/intel-lab-lkp/linux/commits/Antheas-Kapenekakis/platform-x86-ayaneo-ec-Add-Ayaneo-Embedded-Controller-platform-driver/20250821-002525
base: c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
patch link: https://lore.kernel.org/r/20250820160628.99678-5-lkml%40antheas.dev
patch subject: [PATCH v1 4/5] platform/x86: ayaneo-ec: Add controller power and modules attributes
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250821/202508211640.8MtPueLL-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250821/202508211640.8MtPueLL-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/202508211640.8MtPueLL-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/platform/x86/ayaneo-ec.c:395:12: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
395 | else if (sysfs_streq(buf, "off"))
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/ayaneo-ec.c:397:7: note: uninitialized use occurs here
397 | if (ret)
| ^~~
drivers/platform/x86/ayaneo-ec.c:395:8: note: remove the 'if' if its condition is always true
395 | else if (sysfs_streq(buf, "off"))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
396 | ret = ec_write(AYANEO_POWER_REG, AYANEO_POWER_OFF);
drivers/platform/x86/ayaneo-ec.c:389:9: note: initialize the variable 'ret' to silence this warning
389 | int ret;
| ^
| = 0
1 warning generated.
vim +395 drivers/platform/x86/ayaneo-ec.c
382
383 static ssize_t current_value_store(struct kobject *kobj,
384 struct kobj_attribute *attr, const char *buf,
385 size_t count)
386 {
387 struct ayaneo_fw_attr *fw_attr =
388 container_of(attr, struct ayaneo_fw_attr, current_value);
389 int ret;
390
391 switch (fw_attr->fw_attr_id) {
392 case AYANEO_ATTR_CONTROLLER_POWER:
393 if (sysfs_streq(buf, "on"))
394 ret = ec_write(AYANEO_POWER_REG, AYANEO_POWER_ON);
> 395 else if (sysfs_streq(buf, "off"))
396 ret = ec_write(AYANEO_POWER_REG, AYANEO_POWER_OFF);
397 if (ret)
398 return ret;
399 return count;
400 case AYANEO_ATTR_CONTROLLER_MODULES:
401 return -EINVAL;
402 }
403 return -EINVAL;
404 }
405
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists