[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202208132140.7Y3f2Xhn-lkp@intel.com>
Date: Sat, 13 Aug 2022 21:37:49 +0800
From: kernel test robot <lkp@...el.com>
To: "Luke D. Jones" <luke@...nes.dev>, hdegoede@...hat.com
Cc: kbuild-all@...ts.01.org, markgross@...nel.org,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
"Luke D. Jones" <luke@...nes.dev>
Subject: Re: [PATCH] asus-wmi: Add support for TUF laptop keyboard RGB
Hi "Luke,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.19]
[cannot apply to next-20220812]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Luke-D-Jones/asus-wmi-Add-support-for-TUF-laptop-keyboard-RGB/20220804-071716
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 526942b8134cc34d25d27f95dfff98b8ce2f6fcd
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220813/202208132140.7Y3f2Xhn-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/e25083de01260bb6c1b3070f7f3e6915de07c44c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Luke-D-Jones/asus-wmi-Add-support-for-TUF-laptop-keyboard-RGB/20220804-071716
git checkout e25083de01260bb6c1b3070f7f3e6915de07c44c
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/platform/x86/asus-wmi.c: In function 'tuf_krgb_mode_store':
>> drivers/platform/x86/asus-wmi.c:782:15: warning: variable 'data' set but not used [-Wunused-but-set-variable]
782 | char *data, *part, *end;
| ^~~~
vim +/data +782 drivers/platform/x86/asus-wmi.c
777
778 static ssize_t tuf_krgb_mode_store(struct device *device,
779 struct device_attribute *attr,
780 const char *buf, size_t count)
781 {
> 782 char *data, *part, *end;
783 u8 res, tmp, arg_num;
784 int err;
785
786 struct asus_wmi *asus = dev_get_drvdata(device);
787 struct led_classdev *cdev = &asus->tuf_krgb_mode.dev.led_cdev;
788
789 data = end = kstrdup(buf, GFP_KERNEL);
790 arg_num = 0;
791
792 while ((part = strsep(&end, " ")) != NULL) {
793 if (part == NULL)
794 return -1;
795
796 res = kstrtou8(part, 10, &tmp);
797 if (res)
798 return -1;
799
800 if (arg_num == 0)
801 asus->tuf_krgb_mode.save = tmp;
802 else if (arg_num == 1)
803 /* These are the known usable modes across all TUF/ROG */
804 asus->tuf_krgb_mode.mode = tmp < 12 && tmp != 9 ? tmp : 0x0a;
805 else if (arg_num == 2) {
806 if (tmp == 0)
807 asus->tuf_krgb_mode.speed = 0xe1;
808 else if (tmp == 1)
809 asus->tuf_krgb_mode.speed = 0xeb;
810 else if (tmp == 2)
811 asus->tuf_krgb_mode.speed = 0xf5;
812 else
813 asus->tuf_krgb_mode.speed = 0xeb;
814 }
815
816 arg_num += 1;
817 }
818
819 err = tuf_rgb_brightness_set(cdev, cdev->brightness);
820 if (err)
821 return err;
822 return 0;
823 }
824
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists