All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-14  3:10 ` kernel test robot
  0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-11-14  3:10 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: llvm, kbuild-all, linux-kernel, Hans de Goede, Nick Desaulniers

[-- Attachment #1: Type: text/plain, Size: 2577 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c8c109546a19613d323a319d0c921cb1f317e629
commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
date:   4 weeks ago
config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
   static const struct pci_device_id fwbug_cards_ids[] __initconst = {
                                     ^
   1 error generated.


vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c

f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
f7db839fccf087 Jiaxun Yang 2019-03-07  4482  

:::::: The code at line 4475 was first introduced by commit
:::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines

:::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
:::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33718 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-14  3:10 ` kernel test robot
  0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2021-11-14  3:10 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c8c109546a19613d323a319d0c921cb1f317e629
commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
date:   4 weeks ago
config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
   static const struct pci_device_id fwbug_cards_ids[] __initconst = {
                                     ^
   1 error generated.


vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c

f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
f7db839fccf087 Jiaxun Yang 2019-03-07  4482  

:::::: The code at line 4475 was first introduced by commit
:::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines

:::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
:::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33718 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
  2021-11-14  3:10 ` kernel test robot
@ 2021-11-14 11:42   ` Andy Shevchenko
  -1 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2021-11-14 11:42 UTC (permalink / raw)
  To: kernel test robot
  Cc: Nathan Chancellor, llvm, kbuild-all, Linux Kernel Mailing List,
	Hans de Goede, Nick Desaulniers

On Sun, Nov 14, 2021 at 5:15 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   c8c109546a19613d323a319d0c921cb1f317e629
> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> date:   4 weeks ago
> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>                                      ^
>    1 error generated.

Perhaps something like

  if (!dmi_check_system(bt_fwbug_list))
    return 0;
  if (!pci_dev_present(fwbug_cards_ids))
    return 0;

  vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL, FW_BUG "disable
bluetooth subdriver for Intel cards\n");
  return 1;

would work?

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-14 11:42   ` Andy Shevchenko
  0 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2021-11-14 11:42 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]

On Sun, Nov 14, 2021 at 5:15 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   c8c109546a19613d323a319d0c921cb1f317e629
> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> date:   4 weeks ago
> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>                                      ^
>    1 error generated.

Perhaps something like

  if (!dmi_check_system(bt_fwbug_list))
    return 0;
  if (!pci_dev_present(fwbug_cards_ids))
    return 0;

  vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL, FW_BUG "disable
bluetooth subdriver for Intel cards\n");
  return 1;

would work?

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
  2021-11-14 11:42   ` Andy Shevchenko
@ 2021-11-14 11:46     ` Andy Shevchenko
  -1 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2021-11-14 11:46 UTC (permalink / raw)
  To: kernel test robot
  Cc: Nathan Chancellor, llvm, kbuild-all, Linux Kernel Mailing List,
	Hans de Goede, Nick Desaulniers

On Sun, Nov 14, 2021 at 1:42 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sun, Nov 14, 2021 at 5:15 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   c8c109546a19613d323a319d0c921cb1f317e629
> > commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> > date:   4 weeks ago
> > config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> > 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > >> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
> >    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >                                      ^
> >    1 error generated.
>
> Perhaps something like
>
>   if (!dmi_check_system(bt_fwbug_list))
>     return 0;
>   if (!pci_dev_present(fwbug_cards_ids))
>     return 0;
>
>   vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL, FW_BUG "disable
> bluetooth subdriver for Intel cards\n");
>   return 1;
>
> would work?

From the code perspective the complaint by the compiler is false
positive in a sense that it tries to aggressively optimize (which is
fine) followed by "oops, after above we found some unused stuff". I
think it may be hard to see for the compiler the difference between if
(0 && func(x)) and if (0).


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-14 11:46     ` Andy Shevchenko
  0 siblings, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2021-11-14 11:46 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2429 bytes --]

On Sun, Nov 14, 2021 at 1:42 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sun, Nov 14, 2021 at 5:15 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   c8c109546a19613d323a319d0c921cb1f317e629
> > commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> > date:   4 weeks ago
> > config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> > 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > >> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
> >    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >                                      ^
> >    1 error generated.
>
> Perhaps something like
>
>   if (!dmi_check_system(bt_fwbug_list))
>     return 0;
>   if (!pci_dev_present(fwbug_cards_ids))
>     return 0;
>
>   vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL, FW_BUG "disable
> bluetooth subdriver for Intel cards\n");
>   return 1;
>
> would work?

>From the code perspective the complaint by the compiler is false
positive in a sense that it tries to aggressively optimize (which is
fine) followed by "oops, after above we found some unused stuff". I
think it may be hard to see for the compiler the difference between if
(0 && func(x)) and if (0).


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
  2021-11-14  3:10 ` kernel test robot
@ 2021-11-16 10:26   ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2021-11-16 10:26 UTC (permalink / raw)
  To: kernel test robot, Nathan Chancellor
  Cc: llvm, kbuild-all, linux-kernel, Nick Desaulniers

Hi,

On 11/14/21 04:10, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   c8c109546a19613d323a319d0c921cb1f317e629
> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> date:   4 weeks ago
> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>                                      ^
>    1 error generated.

So this *again* has absolutely nothing to do with the:

"platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"

commit, the problem is that:

1. the .config does not have CONFIG_PCI set; combined with:
2. include/pci.h using a #define instead of a
   static inline for pci_dev_present() when this is the case
3. This is a clang WERROR build

I'll submit a fix for 2. upstream which should also fix
similar errors in a lot of other drivers.

Again I must say that as a maintainer I'm unhappy about the amount
of noise being generated by clang WERROR builds here though,
is it really necessary for the kernel test robot to do builds
of this type ?

Regards,

Hans


> 
> 
> vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
> 
> f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
> f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
> f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
> f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
> f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
> f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
> f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
> 
> :::::: The code at line 4475 was first introduced by commit
> :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
> 
> :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
> :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-16 10:26   ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2021-11-16 10:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3476 bytes --]

Hi,

On 11/14/21 04:10, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   c8c109546a19613d323a319d0c921cb1f317e629
> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> date:   4 weeks ago
> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>                                      ^
>    1 error generated.

So this *again* has absolutely nothing to do with the:

"platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"

commit, the problem is that:

1. the .config does not have CONFIG_PCI set; combined with:
2. include/pci.h using a #define instead of a
   static inline for pci_dev_present() when this is the case
3. This is a clang WERROR build

I'll submit a fix for 2. upstream which should also fix
similar errors in a lot of other drivers.

Again I must say that as a maintainer I'm unhappy about the amount
of noise being generated by clang WERROR builds here though,
is it really necessary for the kernel test robot to do builds
of this type ?

Regards,

Hans


> 
> 
> vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
> 
> f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
> f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
> f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
> f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
> f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
> f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
> f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
> 
> :::::: The code at line 4475 was first introduced by commit
> :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
> 
> :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
> :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [kbuild-all] Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
  2021-11-16 10:26   ` Hans de Goede
@ 2021-11-16 12:34     ` Philip Li
  -1 siblings, 0 replies; 14+ messages in thread
From: Philip Li @ 2021-11-16 12:34 UTC (permalink / raw)
  To: Hans de Goede
  Cc: kernel test robot, Nathan Chancellor, llvm, kbuild-all,
	linux-kernel, Nick Desaulniers

On Tue, Nov 16, 2021 at 11:26:48AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/14/21 04:10, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   c8c109546a19613d323a319d0c921cb1f317e629
> > commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> > date:   4 weeks ago
> > config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> > 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> >>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
> >    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >                                      ^
> >    1 error generated.
> 
> So this *again* has absolutely nothing to do with the:
> 
> "platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"
> 
> commit, the problem is that:
> 
> 1. the .config does not have CONFIG_PCI set; combined with:
> 2. include/pci.h using a #define instead of a
>    static inline for pci_dev_present() when this is the case
> 3. This is a clang WERROR build
> 
> I'll submit a fix for 2. upstream which should also fix
> similar errors in a lot of other drivers.
> 
> Again I must say that as a maintainer I'm unhappy about the amount
> of noise being generated by clang WERROR builds here though,
> is it really necessary for the kernel test robot to do builds
> of this type ?
Sorry Hans for the noise, we will look into this to consider the
solution. And want to consult, do you specially have concern about
-Wunused-const-variable or all W=1 related build issues?

Thanks

> 
> Regards,
> 
> Hans
> 
> 
> > 
> > 
> > vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
> > 
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
> > f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
> > 
> > :::::: The code at line 4475 was first introduced by commit
> > :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
> > 
> > :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
> > :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> > 
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-16 12:34     ` Philip Li
  0 siblings, 0 replies; 14+ messages in thread
From: Philip Li @ 2021-11-16 12:34 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4070 bytes --]

On Tue, Nov 16, 2021 at 11:26:48AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/14/21 04:10, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   c8c109546a19613d323a319d0c921cb1f317e629
> > commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> > date:   4 weeks ago
> > config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> > 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> >>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
> >    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >                                      ^
> >    1 error generated.
> 
> So this *again* has absolutely nothing to do with the:
> 
> "platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"
> 
> commit, the problem is that:
> 
> 1. the .config does not have CONFIG_PCI set; combined with:
> 2. include/pci.h using a #define instead of a
>    static inline for pci_dev_present() when this is the case
> 3. This is a clang WERROR build
> 
> I'll submit a fix for 2. upstream which should also fix
> similar errors in a lot of other drivers.
> 
> Again I must say that as a maintainer I'm unhappy about the amount
> of noise being generated by clang WERROR builds here though,
> is it really necessary for the kernel test robot to do builds
> of this type ?
Sorry Hans for the noise, we will look into this to consider the
solution. And want to consult, do you specially have concern about
-Wunused-const-variable or all W=1 related build issues?

Thanks

> 
> Regards,
> 
> Hans
> 
> 
> > 
> > 
> > vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
> > 
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
> > f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
> > f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
> > 
> > :::::: The code at line 4475 was first introduced by commit
> > :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
> > 
> > :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
> > :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> > 
> _______________________________________________
> kbuild-all mailing list -- kbuild-all(a)lists.01.org
> To unsubscribe send an email to kbuild-all-leave(a)lists.01.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [kbuild-all] Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
  2021-11-16 12:34     ` Philip Li
@ 2021-11-16 12:40       ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2021-11-16 12:40 UTC (permalink / raw)
  To: Philip Li
  Cc: kernel test robot, Nathan Chancellor, llvm, kbuild-all,
	linux-kernel, Nick Desaulniers

Hi,

On 11/16/21 13:34, Philip Li wrote:
> On Tue, Nov 16, 2021 at 11:26:48AM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 11/14/21 04:10, kernel test robot wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   c8c109546a19613d323a319d0c921cb1f317e629
>>> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
>>> date:   4 weeks ago
>>> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
>>> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
>>> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
>>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>         git fetch --no-tags linus master
>>>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
>>>         # save the attached .config to linux build tree
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
>>>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>>>                                      ^
>>>    1 error generated.
>>
>> So this *again* has absolutely nothing to do with the:
>>
>> "platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"
>>
>> commit, the problem is that:
>>
>> 1. the .config does not have CONFIG_PCI set; combined with:
>> 2. include/pci.h using a #define instead of a
>>    static inline for pci_dev_present() when this is the case
>> 3. This is a clang WERROR build
>>
>> I'll submit a fix for 2. upstream which should also fix
>> similar errors in a lot of other drivers.
>>
>> Again I must say that as a maintainer I'm unhappy about the amount
>> of noise being generated by clang WERROR builds here though,
>> is it really necessary for the kernel test robot to do builds
>> of this type ?
> Sorry Hans for the noise, we will look into this to consider the
> solution. And want to consult, do you specially have concern about
> -Wunused-const-variable or all W=1 related build issues?

Thank you.

W=1 is know to cause many many warnings, so to me it seems that
combining W=1 with CONFIG_WERROR=1 is a bad idea.

If it would be possible to avoid that combination then that would
be great.

Regards,

Hans






>>> vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
>>>
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
>>> f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
>>>
>>> :::::: The code at line 4475 was first introduced by commit
>>> :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
>>>
>>> :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>>
>>> ---
>>> 0-DAY CI Kernel Test Service, Intel Corporation
>>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>>>
>> _______________________________________________
>> kbuild-all mailing list -- kbuild-all@lists.01.org
>> To unsubscribe send an email to kbuild-all-leave@lists.01.org
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-16 12:40       ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2021-11-16 12:40 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4322 bytes --]

Hi,

On 11/16/21 13:34, Philip Li wrote:
> On Tue, Nov 16, 2021 at 11:26:48AM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 11/14/21 04:10, kernel test robot wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   c8c109546a19613d323a319d0c921cb1f317e629
>>> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
>>> date:   4 weeks ago
>>> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
>>> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
>>> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
>>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>         git fetch --no-tags linus master
>>>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
>>>         # save the attached .config to linux build tree
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
>>>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>>>                                      ^
>>>    1 error generated.
>>
>> So this *again* has absolutely nothing to do with the:
>>
>> "platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"
>>
>> commit, the problem is that:
>>
>> 1. the .config does not have CONFIG_PCI set; combined with:
>> 2. include/pci.h using a #define instead of a
>>    static inline for pci_dev_present() when this is the case
>> 3. This is a clang WERROR build
>>
>> I'll submit a fix for 2. upstream which should also fix
>> similar errors in a lot of other drivers.
>>
>> Again I must say that as a maintainer I'm unhappy about the amount
>> of noise being generated by clang WERROR builds here though,
>> is it really necessary for the kernel test robot to do builds
>> of this type ?
> Sorry Hans for the noise, we will look into this to consider the
> solution. And want to consult, do you specially have concern about
> -Wunused-const-variable or all W=1 related build issues?

Thank you.

W=1 is know to cause many many warnings, so to me it seems that
combining W=1 with CONFIG_WERROR=1 is a bad idea.

If it would be possible to avoid that combination then that would
be great.

Regards,

Hans






>>> vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
>>>
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
>>> f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
>>> f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
>>>
>>> :::::: The code at line 4475 was first introduced by commit
>>> :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
>>>
>>> :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>>
>>> ---
>>> 0-DAY CI Kernel Test Service, Intel Corporation
>>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>>>
>> _______________________________________________
>> kbuild-all mailing list -- kbuild-all(a)lists.01.org
>> To unsubscribe send an email to kbuild-all-leave(a)lists.01.org
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [kbuild-all] Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
  2021-11-16 12:40       ` Hans de Goede
@ 2021-11-16 14:26         ` Philip Li
  -1 siblings, 0 replies; 14+ messages in thread
From: Philip Li @ 2021-11-16 14:26 UTC (permalink / raw)
  To: Hans de Goede
  Cc: kernel test robot, Nathan Chancellor, llvm, kbuild-all,
	linux-kernel, Nick Desaulniers

On Tue, Nov 16, 2021 at 01:40:50PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/16/21 13:34, Philip Li wrote:
> > On Tue, Nov 16, 2021 at 11:26:48AM +0100, Hans de Goede wrote:
> >> Hi,
> >>
> >> On 11/14/21 04:10, kernel test robot wrote:
> >>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>> head:   c8c109546a19613d323a319d0c921cb1f317e629
> >>> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> >>> date:   4 weeks ago
> >>> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> >>> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> >>> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
> >>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >>>         git fetch --no-tags linus master
> >>>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
> >>>         # save the attached .config to linux build tree
> >>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
> >>>
> >>> If you fix the issue, kindly add following tag as appropriate
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>>
> >>> All errors (new ones prefixed by >>):
> >>>
> >>>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
> >>>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >>>                                      ^
> >>>    1 error generated.
> >>
> >> So this *again* has absolutely nothing to do with the:
> >>
> >> "platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"
> >>
> >> commit, the problem is that:
> >>
> >> 1. the .config does not have CONFIG_PCI set; combined with:
> >> 2. include/pci.h using a #define instead of a
> >>    static inline for pci_dev_present() when this is the case
> >> 3. This is a clang WERROR build
> >>
> >> I'll submit a fix for 2. upstream which should also fix
> >> similar errors in a lot of other drivers.
> >>
> >> Again I must say that as a maintainer I'm unhappy about the amount
> >> of noise being generated by clang WERROR builds here though,
> >> is it really necessary for the kernel test robot to do builds
> >> of this type ?
> > Sorry Hans for the noise, we will look into this to consider the
> > solution. And want to consult, do you specially have concern about
> > -Wunused-const-variable or all W=1 related build issues?
> 
> Thank you.
> 
> W=1 is know to cause many many warnings, so to me it seems that
> combining W=1 with CONFIG_WERROR=1 is a bad idea.
> 
> If it would be possible to avoid that combination then that would
> be great.
thanks, got it, we will get this fixed to set WERROR=n for
all the randconfigs we use.

> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
> 
> >>> vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
> >>>
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
> >>>
> >>> :::::: The code at line 4475 was first introduced by commit
> >>> :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
> >>>
> >>> :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
> >>> :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >>>
> >>> ---
> >>> 0-DAY CI Kernel Test Service, Intel Corporation
> >>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> >>>
> >> _______________________________________________
> >> kbuild-all mailing list -- kbuild-all@lists.01.org
> >> To unsubscribe send an email to kbuild-all-leave@lists.01.org
> > 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
@ 2021-11-16 14:26         ` Philip Li
  0 siblings, 0 replies; 14+ messages in thread
From: Philip Li @ 2021-11-16 14:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4675 bytes --]

On Tue, Nov 16, 2021 at 01:40:50PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/16/21 13:34, Philip Li wrote:
> > On Tue, Nov 16, 2021 at 11:26:48AM +0100, Hans de Goede wrote:
> >> Hi,
> >>
> >> On 11/14/21 04:10, kernel test robot wrote:
> >>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>> head:   c8c109546a19613d323a319d0c921cb1f317e629
> >>> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
> >>> date:   4 weeks ago
> >>> config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
> >>> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
> >>> 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/torvalds/linux.git/commit/?id=fd96e35ea7b95f1e216277805be89d66e4ae962d
> >>>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >>>         git fetch --no-tags linus master
> >>>         git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
> >>>         # save the attached .config to linux build tree
> >>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 
> >>>
> >>> If you fix the issue, kindly add following tag as appropriate
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>>
> >>> All errors (new ones prefixed by >>):
> >>>
> >>>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
> >>>    static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >>>                                      ^
> >>>    1 error generated.
> >>
> >> So this *again* has absolutely nothing to do with the:
> >>
> >> "platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning"
> >>
> >> commit, the problem is that:
> >>
> >> 1. the .config does not have CONFIG_PCI set; combined with:
> >> 2. include/pci.h using a #define instead of a
> >>    static inline for pci_dev_present() when this is the case
> >> 3. This is a clang WERROR build
> >>
> >> I'll submit a fix for 2. upstream which should also fix
> >> similar errors in a lot of other drivers.
> >>
> >> Again I must say that as a maintainer I'm unhappy about the amount
> >> of noise being generated by clang WERROR builds here though,
> >> is it really necessary for the kernel test robot to do builds
> >> of this type ?
> > Sorry Hans for the noise, we will look into this to consider the
> > solution. And want to consult, do you specially have concern about
> > -Wunused-const-variable or all W=1 related build issues?
> 
> Thank you.
> 
> W=1 is know to cause many many warnings, so to me it seems that
> combining W=1 with CONFIG_WERROR=1 is a bad idea.
> 
> If it would be possible to avoid that combination then that would
> be great.
thanks, got it, we will get this fixed to set WERROR=n for
all the randconfigs we use.

> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
> 
> >>> vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
> >>>
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4474  
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07 @4475  static const struct pci_device_id fwbug_cards_ids[] __initconst = {
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4476  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4477  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4478  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4479  	{}
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4480  };
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4481  
> >>> f7db839fccf087 Jiaxun Yang 2019-03-07  4482  
> >>>
> >>> :::::: The code at line 4475 was first introduced by commit
> >>> :::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
> >>>
> >>> :::::: TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
> >>> :::::: CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >>>
> >>> ---
> >>> 0-DAY CI Kernel Test Service, Intel Corporation
> >>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> >>>
> >> _______________________________________________
> >> kbuild-all mailing list -- kbuild-all(a)lists.01.org
> >> To unsubscribe send an email to kbuild-all-leave(a)lists.01.org
> > 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-16 14:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14  3:10 drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' kernel test robot
2021-11-14  3:10 ` kernel test robot
2021-11-14 11:42 ` Andy Shevchenko
2021-11-14 11:42   ` Andy Shevchenko
2021-11-14 11:46   ` Andy Shevchenko
2021-11-14 11:46     ` Andy Shevchenko
2021-11-16 10:26 ` Hans de Goede
2021-11-16 10:26   ` Hans de Goede
2021-11-16 12:34   ` [kbuild-all] " Philip Li
2021-11-16 12:34     ` Philip Li
2021-11-16 12:40     ` [kbuild-all] " Hans de Goede
2021-11-16 12:40       ` Hans de Goede
2021-11-16 14:26       ` [kbuild-all] " Philip Li
2021-11-16 14:26         ` Philip Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.