On Tue, May 23, 2023 at 11:31 AM Lopez, Jorge A (Security) jorge.lopez2@hp.com wrote:
I investigate the compile failure and appears the latest patch reverted the code to an older version. The latest code shows the proper implementation and compiling the code does not report any failures.
enum hp_wmi_radio r = (long)data;
instead of
enum hp_wmi_radio r = (enum hp_wmi_radio) data;
Looks like commit ce95010ef62d ("platform/x86: hp-wmi: Fix cast to smaller integer type warning")
is the fixup necessary for 5.15.y.
Dear stable kernel maintainers, please consider cherry-picking the above commit to linux-5.15.y to avoid the new compiler diagnostic introduced by commit 6e9b8992b122 ("platform/x86: Move existing HP drivers to a new hp subdir")
Hans, thanks for the fix. You may need to additionally add Fixes tag to such commits to help out automation for stable. (or perhaps ce95010ef62d failed to apply to linux-5.15.y? I think an email gets sent when that's the case).
Regards,
Jorge Lopez
Regards,
Jorge Lopez HP Inc
"Once you stop learning, you start dying" Albert Einstein
From: kernel test robot lkp@intel.com Sent: Saturday, May 20, 2023 4:30 PM To: Lopez, Jorge A (Security) jorge.lopez2@hp.com Cc: llvm@lists.linux.dev; oe-kbuild-all@lists.linux.dev; Sasha Levin sashal@kernel.org; Hans de Goede hdegoede@redhat.com Subject: [linux-stable-rc:queue/5.15 105/106] drivers/platform/x86/hp/hp-wmi.c:342:24: warning: cast to smaller integer type 'enum hp_wmi_radio' from 'void *'
CAUTION: External Email tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git queue/5.15 head: 632aeb02f8e831197a9a01b1e93cb00b4363be05 commit: 8d6ed410e942fa6f60e434729e1cbbc9ce0ccd54 [105/106] platform/x86: Move existing HP drivers to a new hp subdir config: x86_64-randconfig-x052 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/c... git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git git fetch --no-tags linux-stable-rc queue/5.15 git checkout 8d6ed410e942fa6f60e434729e1cbbc9ce0ccd54 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/platform/x86/hp/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot mailto:lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202305210504.yw7qgOom-lkp@intel.com
All warnings (new ones prefixed by >>):
drivers/platform/x86/hp/hp-wmi.c:342:24: warning: cast to smaller integer type 'enum hp_wmi_radio' from 'void *' [-Wvoid-pointer-to-enum-cast]
enum hp_wmi_radio r = (enum hp_wmi_radio) data; ^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.
vim +342 drivers/platform/x86/hp/hp-wmi.c
f82bdd0d77b6bf drivers/platform/x86/hp-wmi.c Kyle Evans 2014-06-09 339 19d337dff95cbf drivers/platform/x86/hp-wmi.c Johannes Berg 2009-06-02 340 static int hp_wmi_set_block(void *data, bool blocked) 62ec30d45ecbb8 drivers/misc/hp-wmi.c Matthew Garrett 2008-07-25 341 { e5fbba85a7acc2 drivers/platform/x86/hp-wmi.c Alan Jenkins 2009-07-21 @342 enum hp_wmi_radio r = (enum hp_wmi_radio) data; e5fbba85a7acc2 drivers/platform/x86/hp-wmi.c Alan Jenkins 2009-07-21 343 int query = BIT(r + 8) | ((!blocked) << r); 6d96e00cef3503 drivers/platform/x86/hp-wmi.c Thomas Renninger 2010-05-21 344 int ret; 62ec30d45ecbb8 drivers/misc/hp-wmi.c Matthew Garrett 2008-07-25 345 d8193cff33906e drivers/platform/x86/hp-wmi.c Darren Hart (VMware 2017-04-19 346) ret = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, HPWMI_WRITE, c3021ea1beeeb1 drivers/platform/x86/hp-wmi.c Anssi Hannula 2011-02-20 347 &query, sizeof(query), 0); 527376c89caf59 drivers/platform/x86/hp-wmi.c Darren Hart (VMware 2017-04-19 348) 527376c89caf59 drivers/platform/x86/hp-wmi.c Darren Hart (VMware 2017-04-19 349) return ret <= 0 ? ret : -EINVAL; 62ec30d45ecbb8 drivers/misc/hp-wmi.c Matthew Garrett 2008-07-25 350 } 62ec30d45ecbb8 drivers/misc/hp-wmi.c Matthew Garrett 2008-07-25 351
:::::: The code at line 342 was first introduced by commit :::::: e5fbba85a7acc2626d4fe14501816811d702f3e9 hp-wmi: improve rfkill support
:::::: TO: Alan Jenkins mailto:alan-jenkins@tuffmail.co.uk :::::: CC: Len Brown mailto:len.brown@intel.com
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
On Tue, May 23, 2023 at 11:55:54AM -0700, Nick Desaulniers wrote:
On Tue, May 23, 2023 at 11:31 AM Lopez, Jorge A (Security) jorge.lopez2@hp.com wrote:
I investigate the compile failure and appears the latest patch reverted the code to an older version. The latest code shows the proper implementation and compiling the code does not report any failures.
enum hp_wmi_radio r = (long)data;
instead of
enum hp_wmi_radio r = (enum hp_wmi_radio) data;
Looks like commit ce95010ef62d ("platform/x86: hp-wmi: Fix cast to smaller integer type warning")
is the fixup necessary for 5.15.y.
Dear stable kernel maintainers, please consider cherry-picking the above commit to linux-5.15.y to avoid the new compiler diagnostic introduced by commit 6e9b8992b122 ("platform/x86: Move existing HP drivers to a new hp subdir")
Now queued up, thanks.
greg k-h
linux-stable-mirror@lists.linaro.org