From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEBDD2C85 for ; Tue, 16 Nov 2021 14:26:03 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10169"; a="319914161" X-IronPort-AV: E=Sophos;i="5.87,239,1631602800"; d="scan'208";a="319914161" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2021 06:26:02 -0800 X-IronPort-AV: E=Sophos;i="5.87,239,1631602800"; d="scan'208";a="494472564" Received: from rli9-dbox.sh.intel.com (HELO rli9-dbox) ([10.239.159.142]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2021 06:26:00 -0800 Date: Tue, 16 Nov 2021 22:26:57 +0800 From: Philip Li To: Hans de Goede Cc: kernel test robot , Nathan Chancellor , llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Nick Desaulniers Subject: Re: [kbuild-all] Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' Message-ID: References: <202111141153.mtggZgGq-lkp@intel.com> <009706db-230a-1e49-0a42-447a0ff97fbb@redhat.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > >>> > >>> 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 > >>> :::::: CC: Andy Shevchenko > >>> > >>> --- > >>> 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 > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0191839881239655855==" MIME-Version: 1.0 From: Philip Li To: kbuild-all@lists.01.org Subject: Re: drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' Date: Tue, 16 Nov 2021 22:26:57 +0800 Message-ID: In-Reply-To: List-Id: --===============0191839881239655855== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/linu= x.git master > >>> head: c8c109546a19613d323a319d0c921cb1f317e629 > >>> commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkp= ad_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=3D1 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/li= nux.git/commit/?id=3Dfd96e35ea7b95f1e216277805be89d66e4ae962d > >>> git remote add linus https://git.kernel.org/pub/scm/linux/ker= nel/git/torvalds/linux.git > >>> git fetch --no-tags linus master > >>> git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d > >>> # save the attached .config to linux build tree > >>> COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cros= s W=3D1 ARCH=3Di386 = > >>> > >>> If you fix the issue, kindly add following tag as appropriate > >>> Reported-by: kernel test robot > >>> > >>> All errors (new ones prefixed by >>): > >>> > >>>>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variabl= e 'fwbug_cards_ids' [-Werror,-Wunused-const-variable] > >>> static const struct pci_device_id fwbug_cards_ids[] __initconst = =3D { > >>> ^ > >>> 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=3D1 related build issues? > = > Thank you. > = > W=3D1 is know to cause many many warnings, so to me it seems that > combining W=3D1 with CONFIG_WERROR=3D1 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=3Dn 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 =3D { > >>> 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: thinkpa= d_acpi: Disable Bluetooth for some machines > >>> > >>> :::::: TO: Jiaxun Yang > >>> :::::: CC: Andy Shevchenko > >>> > >>> --- > >>> 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 > > = >=20 --===============0191839881239655855==--