Messages in this thread | | | Date | Thu, 21 Apr 2022 14:42:59 +0800 | From | kernel test robot <> | Subject | arch/parisc/kernel/traps.c:806:14: warning: variable 'hpmcp' set but not used |
| |
Hi Sven,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: b253435746d9a4a701b5f09211b9c14d3370d0da commit: c70919bd9d0782a6078ccd37d7f861d514f5481e parisc: Fix IVT checksum calculation wrt HPMC date: 1 year, 2 months ago config: parisc-randconfig-r031-20220420 (https://download.01.org/0day-ci/archive/20220421/202204210504.e7yvq7aa-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 11.2.0 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=c70919bd9d0782a6078ccd37d7f861d514f5481e git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout c70919bd9d0782a6078ccd37d7f861d514f5481e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/parisc/kernel/traps.c: In function 'initialize_ivt': >> arch/parisc/kernel/traps.c:806:14: warning: variable 'hpmcp' set but not used [-Wunused-but-set-variable] 806 | u32 *hpmcp; | ^~~~~
vim +/hpmcp +806 arch/parisc/kernel/traps.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 797 ^1da177e4c3f415 Linus Torvalds 2005-04-16 798 4182d0cdf853fb0 Helge Deller 2015-11-20 799 void __init initialize_ivt(const void *iva) ^1da177e4c3f415 Linus Torvalds 2005-04-16 800 { c3d4ed4e3e5aa8d Kyle McMartin 2007-06-04 801 extern const u32 os_hpmc[]; c3d4ed4e3e5aa8d Kyle McMartin 2007-06-04 802 ^1da177e4c3f415 Linus Torvalds 2005-04-16 803 int i; ^1da177e4c3f415 Linus Torvalds 2005-04-16 804 u32 check = 0; ^1da177e4c3f415 Linus Torvalds 2005-04-16 805 u32 *ivap; ^1da177e4c3f415 Linus Torvalds 2005-04-16 @806 u32 *hpmcp; c70919bd9d0782a Sven Schnelle 2020-10-02 807 u32 instr; ^1da177e4c3f415 Linus Torvalds 2005-04-16 808 4182d0cdf853fb0 Helge Deller 2015-11-20 809 if (strcmp((const char *)iva, "cows can fly")) 4182d0cdf853fb0 Helge Deller 2015-11-20 810 panic("IVT invalid"); ^1da177e4c3f415 Linus Torvalds 2005-04-16 811 ^1da177e4c3f415 Linus Torvalds 2005-04-16 812 ivap = (u32 *)iva; ^1da177e4c3f415 Linus Torvalds 2005-04-16 813 ^1da177e4c3f415 Linus Torvalds 2005-04-16 814 for (i = 0; i < 8; i++) ^1da177e4c3f415 Linus Torvalds 2005-04-16 815 *ivap++ = 0; ^1da177e4c3f415 Linus Torvalds 2005-04-16 816 8d771b143fe2e39 Helge Deller 2017-09-17 817 /* 8d771b143fe2e39 Helge Deller 2017-09-17 818 * Use PDC_INSTR firmware function to get instruction that invokes 8d771b143fe2e39 Helge Deller 2017-09-17 819 * PDCE_CHECK in HPMC handler. See programming note at page 1-31 of 8d771b143fe2e39 Helge Deller 2017-09-17 820 * the PA 1.1 Firmware Architecture document. 8d771b143fe2e39 Helge Deller 2017-09-17 821 */ 8d771b143fe2e39 Helge Deller 2017-09-17 822 if (pdc_instr(&instr) == PDC_OK) 8d771b143fe2e39 Helge Deller 2017-09-17 823 ivap[0] = instr; 8d771b143fe2e39 Helge Deller 2017-09-17 824 41dbee81c875300 Helge Deller 2018-04-18 825 /* 41dbee81c875300 Helge Deller 2018-04-18 826 * Rules for the checksum of the HPMC handler: 41dbee81c875300 Helge Deller 2018-04-18 827 * 1. The IVA does not point to PDC/PDH space (ie: the OS has installed 41dbee81c875300 Helge Deller 2018-04-18 828 * its own IVA). 41dbee81c875300 Helge Deller 2018-04-18 829 * 2. The word at IVA + 32 is nonzero. 41dbee81c875300 Helge Deller 2018-04-18 830 * 3. If Length (IVA + 60) is not zero, then Length (IVA + 60) and 41dbee81c875300 Helge Deller 2018-04-18 831 * Address (IVA + 56) are word-aligned. 41dbee81c875300 Helge Deller 2018-04-18 832 * 4. The checksum of the 8 words starting at IVA + 32 plus the sum of 41dbee81c875300 Helge Deller 2018-04-18 833 * the Length/4 words starting at Address is zero. 41dbee81c875300 Helge Deller 2018-04-18 834 */ 41dbee81c875300 Helge Deller 2018-04-18 835 1138b6718ff74d2 John David Anglin 2018-10-06 836 /* Setup IVA and compute checksum for HPMC handler */ 1138b6718ff74d2 John David Anglin 2018-10-06 837 ivap[6] = (u32)__pa(os_hpmc); ^1da177e4c3f415 Linus Torvalds 2005-04-16 838 ^1da177e4c3f415 Linus Torvalds 2005-04-16 839 hpmcp = (u32 *)os_hpmc; ^1da177e4c3f415 Linus Torvalds 2005-04-16 840 ^1da177e4c3f415 Linus Torvalds 2005-04-16 841 for (i=0; i<8; i++) ^1da177e4c3f415 Linus Torvalds 2005-04-16 842 check += ivap[i]; ^1da177e4c3f415 Linus Torvalds 2005-04-16 843 ^1da177e4c3f415 Linus Torvalds 2005-04-16 844 ivap[5] = -check; c70919bd9d0782a Sven Schnelle 2020-10-02 845 pr_debug("initialize_ivt: IVA[6] = 0x%08x\n", ivap[6]); ^1da177e4c3f415 Linus Torvalds 2005-04-16 846 } ^1da177e4c3f415 Linus Torvalds 2005-04-16 847 4182d0cdf853fb0 Helge Deller 2015-11-20 848
:::::: The code at line 806 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org> :::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |