[robh:mpam/cache-id 12/12] arch/x86/kernel/devicetree.c:142:6: error: unused variable 'ret'

From: kernel test robot
Date: Sat Nov 06 2021 - 11:01:18 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git mpam/cache-id
head: 4dec66d0c19165b654cca2ce8810615f61709693
commit: 4dec66d0c19165b654cca2ce8810615f61709693 [12/12] x86: Use of_get_cpu_hwid()
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?id=4dec66d0c19165b654cca2ce8810615f61709693
git remote add robh https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
git fetch --no-tags robh mpam/cache-id
git checkout 4dec66d0c19165b654cca2ce8810615f61709693
# save the attached .config to linux build tree
make W=1 ARCH=i386

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

All errors (new ones prefixed by >>):

arch/x86/kernel/devicetree.c: In function 'dtb_cpu_setup':
>> arch/x86/kernel/devicetree.c:142:6: error: unused variable 'ret' [-Werror=unused-variable]
142 | int ret;
| ^~~
cc1: all warnings being treated as errors


vim +/ret +142 arch/x86/kernel/devicetree.c

4e07db9c8db87e Ivan Gorinov 2018-03-22 137
4e07db9c8db87e Ivan Gorinov 2018-03-22 138 static void __init dtb_cpu_setup(void)
4e07db9c8db87e Ivan Gorinov 2018-03-22 139 {
4e07db9c8db87e Ivan Gorinov 2018-03-22 140 struct device_node *dn;
4e07db9c8db87e Ivan Gorinov 2018-03-22 141 u32 apic_id, version;
4e07db9c8db87e Ivan Gorinov 2018-03-22 @142 int ret;
4e07db9c8db87e Ivan Gorinov 2018-03-22 143
4e07db9c8db87e Ivan Gorinov 2018-03-22 144 version = GET_APIC_VERSION(apic_read(APIC_LVR));
7de8f4aa2f3558 Rob Herring 2018-08-27 145 for_each_of_cpu_node(dn) {
4dec66d0c19165 Rob Herring 2021-10-05 146 apic_id = of_get_cpu_hwid(dn, 0);
4dec66d0c19165 Rob Herring 2021-10-05 147 if (apic_id == ~0U) {
4e07db9c8db87e Ivan Gorinov 2018-03-22 148 pr_warn("%pOF: missing local APIC ID\n", dn);
4e07db9c8db87e Ivan Gorinov 2018-03-22 149 continue;
4e07db9c8db87e Ivan Gorinov 2018-03-22 150 }
4e07db9c8db87e Ivan Gorinov 2018-03-22 151 generic_processor_info(apic_id, version);
4e07db9c8db87e Ivan Gorinov 2018-03-22 152 }
4e07db9c8db87e Ivan Gorinov 2018-03-22 153 }
4e07db9c8db87e Ivan Gorinov 2018-03-22 154

:::::: The code at line 142 was first introduced by commit
:::::: 4e07db9c8db87e3b71be4c3cd626ddc9bacd5a1e x86/devicetree: Use CPU description from Device Tree

:::::: TO: Ivan Gorinov <ivan.gorinov@xxxxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip