Re: [PATCH v12] asus-wmi: Add support for custom fan curves
From: kernel test robot
Date: Sun Sep 12 2021 - 02:19:02 EST
Hi "Luke,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20210910]
[cannot apply to linux/master v5.14]
[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]
url: https://github.com/0day-ci/linux/commits/Luke-D-Jones/asus-wmi-Add-support-for-custom-fan-curves/20210912-094248
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c605c39677b9842b0566013e0cf30bc13e90bdbc
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/2142349dddbba87624d073f580614b46b2e8fb74
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luke-D-Jones/asus-wmi-Add-support-for-custom-fan-curves/20210912-094248
git checkout 2142349dddbba87624d073f580614b46b2e8fb74
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
drivers/platform/x86/asus-wmi.c: In function 'fan_curve_store':
>> drivers/platform/x86/asus-wmi.c:2346:3: error: 'old_value' undeclared (first use in this function); did you mean 'si_value'?
2346 | old_value = data->percents[index];
| ^~~~~~~~~
| si_value
drivers/platform/x86/asus-wmi.c:2346:3: note: each undeclared identifier is reported only once for each function it appears in
vim +2346 drivers/platform/x86/asus-wmi.c
2325
2326 static ssize_t fan_curve_store(struct device *dev,
2327 struct device_attribute *attr, const char *buf,
2328 size_t count)
2329 {
2330 struct asus_wmi *asus = dev_get_drvdata(dev);
2331 struct fan_curve_data *data;
2332 u8 value;
2333 int err;
2334
2335 int index = to_sensor_dev_attr_2(attr)->index;
2336 int nr = to_sensor_dev_attr_2(attr)->nr;
2337 int pwm = nr & FAN_CURVE_PWM_MASK;
2338
2339 data = fan_curve_data_select(asus, attr);
2340
2341 err = kstrtou8(buf, 10, &value);
2342 if (err < 0)
2343 return err;
2344
2345 if (pwm) {
> 2346 old_value = data->percents[index];
2347 data->percents[index] = value;
2348 } else {
2349 old_value = data->temps[index];
2350 data->temps[index] = value;
2351 }
2352
2353 /*
2354 * Mark as disabled so the user has to explicitly enable to apply a
2355 * changed fan curve. This prevents potential lockups from writing out
2356 * many changes as one-write-per-change.
2357 */
2358 data->enabled = false;
2359
2360 return count;
2361 }
2362
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip