linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Luke D. Jones" <luke@ljones.dev>, hdegoede@redhat.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	corentin.chary@gmail.com, acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
	markgross@kernel.org, jdelvare@suse.com, linux@roeck-us.net,
	"Luke D. Jones" <luke@ljones.dev>
Subject: Re: [PATCH v3 1/1] platform/x86: asus-wmi: add support for ASUS screenpad
Date: Wed, 21 Jun 2023 07:49:02 +0800	[thread overview]
Message-ID: <202306210717.OFFdFt8Q-lkp@intel.com> (raw)
In-Reply-To: <20230620030033.55033-2-luke@ljones.dev>

Hi Luke,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.4-rc7 next-20230620]
[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/platform-x86-asus-wmi-add-support-for-ASUS-screenpad/20230620-110305
base:   linus/master
patch link:    https://lore.kernel.org/r/20230620030033.55033-2-luke%40ljones.dev
patch subject: [PATCH v3 1/1] platform/x86: asus-wmi: add support for ASUS screenpad
config: x86_64-randconfig-a001-20230620 (https://download.01.org/0day-ci/archive/20230621/202306210717.OFFdFt8Q-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230621/202306210717.OFFdFt8Q-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/202306210717.OFFdFt8Q-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/asus-wmi.c:3293:41: warning: variable 'bd' is uninitialized when used here [-Wuninitialized]
           brightness = read_screenpad_brightness(bd);
                                                  ^~
   drivers/platform/x86/asus-wmi.c:3285:29: note: initialize the variable 'bd' to silence this warning
           struct backlight_device *bd;
                                      ^
                                       = NULL
   1 warning generated.


vim +/bd +3293 drivers/platform/x86/asus-wmi.c

  3282	
  3283	static int asus_screenpad_init(struct asus_wmi *asus)
  3284	{
  3285		struct backlight_device *bd;
  3286		struct backlight_properties props;
  3287		int power, brightness;
  3288	
  3289		power = read_screenpad_backlight_power(asus);
  3290		if (power < 0)
  3291			return power;
  3292	
> 3293		brightness = read_screenpad_brightness(bd);
  3294		if (brightness < 0)
  3295			return brightness;
  3296	
  3297		memset(&props, 0, sizeof(struct backlight_properties));
  3298		props.type = BACKLIGHT_RAW; /* ensure this bd is last to be picked */
  3299		props.max_brightness = 255;
  3300		bd = backlight_device_register("asus_screenpad",
  3301					       &asus->platform_device->dev, asus,
  3302					       &asus_screenpad_bl_ops, &props);
  3303		if (IS_ERR(bd)) {
  3304			pr_err("Could not register backlight device\n");
  3305			return PTR_ERR(bd);
  3306		}
  3307	
  3308		asus->screenpad_backlight_device = bd;
  3309		/*
  3310		 * Counter an odd behaviour where default is set to < 13 if it was 0 on boot.
  3311		 * 60 is subjective, but accepted as a good compromise to retain visibility.
  3312		 */
  3313		if (brightness < 60)
  3314			brightness = 60;
  3315	
  3316		asus->driver->screenpad_brightness = brightness;
  3317		bd->props.brightness = brightness;
  3318		bd->props.power = power;
  3319		backlight_update_status(bd);
  3320	
  3321		return 0;
  3322	}
  3323	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-06-20 23:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  3:00 [PATCH v3 0/1] asus-wmi: add support for ASUS screenpad Luke D. Jones
2023-06-20  3:00 ` [PATCH v3 1/1] platform/x86: " Luke D. Jones
2023-06-20 23:49   ` kernel test robot [this message]
2023-06-26 21:51   ` Luke 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=202306210717.OFFdFt8Q-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=llvm@lists.linux.dev \
    --cc=luke@ljones.dev \
    --cc=markgross@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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;
as well as URLs for NNTP newsgroup(s).