mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Luke D. Jones" <luke@ljones.dev>, hdegoede@redhat.com
Cc: kbuild-all@lists.01.org, markgross@kernel.org,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Luke D. Jones" <luke@ljones.dev>
Subject: Re: [PATCH] asus-wmi: Add support for TUF laptop keyboard RGB
Date: Sat, 13 Aug 2022 21:37:49 +0800	[thread overview]
Message-ID: <202208132140.7Y3f2Xhn-lkp@intel.com> (raw)
In-Reply-To: <20220803231631.49924-1-luke@ljones.dev>

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@intel.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

  parent reply	other threads:[~2022-08-13 13:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 23:16 Luke D. Jones
2022-08-04 13:36 ` Hans de Goede
2022-08-13 13:37 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-02  4:59 Luke D. Jones
2022-08-02  5:43 ` Luke Jones
2022-08-02 11:09 ` Hans de Goede
2022-08-02 12:13   ` Hans de Goede
2022-08-02 22:26     ` Luke Jones
2022-08-04 13:03       ` Hans de Goede
2022-08-02  4:57 Luke D. Jones

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=202208132140.7Y3f2Xhn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.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

all inboxes | Powered by JetHome®