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]
Message-ID: <202306210717.OFFdFt8Q-lkp@intel.com>
Date:   Wed, 21 Jun 2023 07:49:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Luke D. Jones" <luke@...nes.dev>, hdegoede@...hat.com
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        corentin.chary@...il.com, acpi4asus-user@...ts.sourceforge.net,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hwmon@...r.kernel.org, markgross@...nel.org,
        jdelvare@...e.com, linux@...ck-us.net,
        "Luke D. Jones" <luke@...nes.dev>
Subject: Re: [PATCH v3 1/1] platform/x86: asus-wmi: add support for ASUS
 screenpad

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ