From: kernel test robot <lkp@intel.com>
To: "João Paulo Gonçalves" <jpaulo.silvagoncalves@gmail.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Guenter Roeck" <linux@roeck-us.net>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Farouk Bouabid" <farouk.bouabid@cherry.de>,
"Quentin Schulz" <quentin.schulz@cherry.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
"João Paulo Gonçalves" <joao.goncalves@toradex.com>
Subject: Re: [PATCH v3 3/3] hwmon: (amc6821) Add cooling device support
Date: Fri, 13 Jun 2025 12:39:07 +0800 [thread overview]
Message-ID: <202506131212.4UdngOz7-lkp@intel.com> (raw)
In-Reply-To: <20250612-b4-amc6821-cooling-device-support-v3-3-360681a7652c@toradex.com>
Hi João,
kernel test robot noticed the following build warnings:
[auto build test WARNING on b43674a549ed17319cb08ede9e0909ff6198ea70]
url: https://github.com/intel-lab-lkp/linux/commits/Jo-o-Paulo-Gon-alves/dt-bindings-hwmon-amc6821-Add-cooling-levels/20250613-013059
base: b43674a549ed17319cb08ede9e0909ff6198ea70
patch link: https://lore.kernel.org/r/20250612-b4-amc6821-cooling-device-support-v3-3-360681a7652c%40toradex.com
patch subject: [PATCH v3 3/3] hwmon: (amc6821) Add cooling device support
config: hexagon-randconfig-002-20250613 (https://download.01.org/0day-ci/archive/20250613/202506131212.4UdngOz7-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250613/202506131212.4UdngOz7-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/202506131212.4UdngOz7-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hwmon/amc6821.c:1053:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
1053 | if (fan_np)
| ^~~~~~
drivers/hwmon/amc6821.c:1056:6: note: uninitialized use occurs here
1056 | if (err)
| ^~~
drivers/hwmon/amc6821.c:1053:2: note: remove the 'if' if its condition is always true
1053 | if (fan_np)
| ^~~~~~~~~~~
1054 | err = amc6821_of_fan_read_data(client, data, fan_np);
drivers/hwmon/amc6821.c:1040:9: note: initialize the variable 'err' to silence this warning
1040 | int err;
| ^
| = 0
1 warning generated.
vim +1053 drivers/hwmon/amc6821.c
b5430a04e99508 Tomaz Mertelj 2010-01-08 1032
6748703856d461 Stephen Kitt 2020-08-13 1033 static int amc6821_probe(struct i2c_client *client)
b5430a04e99508 Tomaz Mertelj 2010-01-08 1034 {
1276fae2a93142 Axel Lin 2014-06-29 1035 struct device *dev = &client->dev;
28e6274d8fa67e Axel Lin 2014-06-29 1036 struct amc6821_data *data;
1276fae2a93142 Axel Lin 2014-06-29 1037 struct device *hwmon_dev;
a051d507ba1718 Guenter Roeck 2024-06-27 1038 struct regmap *regmap;
194be60020ab02 João Paulo Gonçalves 2025-06-12 1039 struct device_node *fan_np __free(device_node) = NULL;
28e6274d8fa67e Axel Lin 2014-06-29 1040 int err;
b5430a04e99508 Tomaz Mertelj 2010-01-08 1041
1276fae2a93142 Axel Lin 2014-06-29 1042 data = devm_kzalloc(dev, sizeof(struct amc6821_data), GFP_KERNEL);
28e6274d8fa67e Axel Lin 2014-06-29 1043 if (!data)
28e6274d8fa67e Axel Lin 2014-06-29 1044 return -ENOMEM;
b5430a04e99508 Tomaz Mertelj 2010-01-08 1045
a051d507ba1718 Guenter Roeck 2024-06-27 1046 regmap = devm_regmap_init_i2c(client, &amc6821_regmap_config);
a051d507ba1718 Guenter Roeck 2024-06-27 1047 if (IS_ERR(regmap))
a051d507ba1718 Guenter Roeck 2024-06-27 1048 return dev_err_probe(dev, PTR_ERR(regmap),
a051d507ba1718 Guenter Roeck 2024-06-27 1049 "Failed to initialize regmap\n");
a051d507ba1718 Guenter Roeck 2024-06-27 1050 data->regmap = regmap;
b5430a04e99508 Tomaz Mertelj 2010-01-08 1051
194be60020ab02 João Paulo Gonçalves 2025-06-12 1052 fan_np = of_get_child_by_name(dev->of_node, "fan");
194be60020ab02 João Paulo Gonçalves 2025-06-12 @1053 if (fan_np)
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1054 err = amc6821_of_fan_read_data(client, data, fan_np);
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1055
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1056 if (err)
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1057 return dev_err_probe(dev, err,
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1058 "Failed to read fan device tree data\n");
194be60020ab02 João Paulo Gonçalves 2025-06-12 1059
cd17587272e284 Francesco Dolcini 2025-04-02 1060 err = amc6821_init_client(client, data);
28e6274d8fa67e Axel Lin 2014-06-29 1061 if (err)
28e6274d8fa67e Axel Lin 2014-06-29 1062 return err;
b5430a04e99508 Tomaz Mertelj 2010-01-08 1063
8f38236de689af Farouk Bouabid 2024-09-06 1064 if (of_device_is_compatible(dev->of_node, "tsd,mule")) {
8f38236de689af Farouk Bouabid 2024-09-06 1065 err = devm_of_platform_populate(dev);
8f38236de689af Farouk Bouabid 2024-09-06 1066 if (err)
8f38236de689af Farouk Bouabid 2024-09-06 1067 return dev_err_probe(dev, err,
8f38236de689af Farouk Bouabid 2024-09-06 1068 "Failed to create sub-devices\n");
8f38236de689af Farouk Bouabid 2024-09-06 1069 }
8f38236de689af Farouk Bouabid 2024-09-06 1070
e98ab50e1f2dd6 Guenter Roeck 2024-06-26 1071 hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
e98ab50e1f2dd6 Guenter Roeck 2024-06-26 1072 data, &amc6821_chip_info,
1276fae2a93142 Axel Lin 2014-06-29 1073 amc6821_groups);
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1074 if (IS_ERR(hwmon_dev))
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1075 return dev_err_probe(dev, PTR_ERR(hwmon_dev),
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1076 "Failed to initialize hwmon\n");
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1077
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1078 if (IS_ENABLED(CONFIG_THERMAL) && fan_np && data->fan_cooling_levels)
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1079 return PTR_ERR_OR_ZERO(devm_thermal_of_cooling_device_register(dev,
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1080 fan_np,
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1081 client->name,
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1082 data,
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1083 &amc6821_cooling_ops));
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1084
6364a7ce37ccd1 João Paulo Gonçalves 2025-06-12 1085 return 0;
b5430a04e99508 Tomaz Mertelj 2010-01-08 1086 }
b5430a04e99508 Tomaz Mertelj 2010-01-08 1087
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-06-13 4:39 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250612-b4-amc6821-cooling-device-support-v3-3-360681a7652c@toradex.com>]
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=202506131212.4UdngOz7-lkp@intel.com \
--to=lkp@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=farouk.bouabid@cherry.de \
--cc=jdelvare@suse.com \
--cc=joao.goncalves@toradex.com \
--cc=jpaulo.silvagoncalves@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quentin.schulz@cherry.de \
--cc=robh@kernel.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).