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]
Date:   Wed, 8 Sep 2021 20:32:40 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Luke D. Jones" <luke@...nes.dev>, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, hdegoede@...hat.com, pobrn@...tonmail.com,
        hadess@...ess.net, linux@...ck-us.net,
        platform-driver-x86@...r.kernel.org,
        "Luke D. Jones" <luke@...nes.dev>
Subject: Re: [PATCH v11] asus-wmi: Add support for custom fan curves

Hi "Luke,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on next-20210908]
[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/20210908-072520
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 626bf91a292e2035af5b9d9cce35c5c138dfe06d
config: x86_64-rhel-8.3-kselftests (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/3f17887090cfe852531995edb96ad6a3580a6a55
        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/20210908-072520
        git checkout 3f17887090cfe852531995edb96ad6a3580a6a55
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/platform/x86/asus-wmi.c: In function 'fan_curve_store':
>> drivers/platform/x86/asus-wmi.c:2332:12: warning: variable 'old_value' set but not used [-Wunused-but-set-variable]
    2332 |  u8 value, old_value;
         |            ^~~~~~~~~


vim +/old_value +2332 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, old_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@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (42021 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ