All of lore.kernel.org
 help / color / mirror / Atom feed
* [anolis-intel-cloud:devel-6.6 608/608] arch/x86/kernel/cpu/proc.c:113:9: warning: 'total' is used uninitialized
@ 2026-10-27  9:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-27  9:25 UTC (permalink / raw)
  To: aubrey.li; +Cc: oe-kbuild-all

Hi Brian,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://gitee.com/anolis/intel-cloud-kernel.git devel-6.6
head:   e8129feece4324195ea94555f0d752df963558bf
commit: da4c1b079fbce0a30e6d4e7a8577ed7726933d97 [608/608] cpumask: Switch from inline to __always_inline
config: x86_64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20261027/202610271000.AO08hBry-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261027/202610271000.AO08hBry-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610271000.AO08hBry-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/kernel/cpu/proc.c: In function 'show_cpuinfo':
>> arch/x86/kernel/cpu/proc.c:113:9: warning: 'total' is used uninitialized [-Wuninitialized]
     113 |         show_cpuinfo_core(m, c, cpu, index, rich_container, total);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/proc.c:74:34: note: 'total' was declared here
      74 |         unsigned int cpu, index, total;
         |                                  ^~~~~


vim +/total +113 arch/x86/kernel/cpu/proc.c

a967ceac01cd384 arch/x86/kernel/cpu/proc.c  Hiroshi Shimamoto   2008-02-20   70  
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   71  static int show_cpuinfo(struct seq_file *m, void *v)
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   72  {
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   73  	struct cpuinfo_x86 *c = v;
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   74  	unsigned int cpu, index, total;
a967ceac01cd384 arch/x86/kernel/cpu/proc.c  Hiroshi Shimamoto   2008-02-20   75  	int i;
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   76  	bool rich_container = false;
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   77  
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   78  	index = cpu = c->cpu_index;
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   79  	if (check_rich_container(cpu, &index, &rich_container, &total))
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   80  		return 0;
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   81  
a967ceac01cd384 arch/x86/kernel/cpu/proc.c  Hiroshi Shimamoto   2008-02-20   82  	seq_printf(m, "processor\t: %u\n"
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   83  		   "vendor_id\t: %s\n"
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   84  		   "cpu family\t: %d\n"
a967ceac01cd384 arch/x86/kernel/cpu/proc.c  Hiroshi Shimamoto   2008-02-20   85  		   "model\t\t: %u\n"
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   86  		   "model name\t: %s\n",
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04   87  		   index,
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   88  		   c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   89  		   c->x86,
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   90  		   c->x86_model,
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   91  		   c->x86_model_id[0] ? c->x86_model_id : "unknown");
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   92  
b399151cb48db30 arch/x86/kernel/cpu/proc.c  Jia Zhang           2018-01-01   93  	if (c->x86_stepping || c->cpuid_level >= 0)
b399151cb48db30 arch/x86/kernel/cpu/proc.c  Jia Zhang           2018-01-01   94  		seq_printf(m, "stepping\t: %d\n", c->x86_stepping);
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   95  	else
3736708f034ae1e arch/x86/kernel/cpu/proc.c  Rasmus Villemoes    2014-11-28   96  		seq_puts(m, "stepping\t: unknown\n");
506ed6b53e00ba3 arch/x86/kernel/cpu/proc.c  Andi Kleen          2011-10-12   97  	if (c->microcode)
881e23e56764808 arch/x86/kernel/cpu/proc.c  Borislav Petkov     2011-10-17   98  		seq_printf(m, "microcode\t: 0x%x\n", c->microcode);
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16   99  
890da9cf098364b arch/x86/kernel/cpu/proc.c  Linus Torvalds      2017-11-02  100  	if (cpu_has(c, X86_FEATURE_TSC)) {
6f181c2c1bfc198 arch/x86/kernel/cpu/proc.c  Beata Michalska     2025-01-31  101  		int freq = arch_freq_get_on_cpu(cpu);
890da9cf098364b arch/x86/kernel/cpu/proc.c  Linus Torvalds      2017-11-02  102  
6f181c2c1bfc198 arch/x86/kernel/cpu/proc.c  Beata Michalska     2025-01-31  103  		if (freq < 0)
6f181c2c1bfc198 arch/x86/kernel/cpu/proc.c  Beata Michalska     2025-01-31  104  			seq_puts(m, "cpu MHz\t\t: Unknown\n");
6f181c2c1bfc198 arch/x86/kernel/cpu/proc.c  Beata Michalska     2025-01-31  105  		else
fb4c77c21aba036 arch/x86/kernel/cpu/proc.c  Thomas Gleixner     2022-04-25  106  			seq_printf(m, "cpu MHz\t\t: %u.%03u\n", freq / 1000, (freq % 1000));
890da9cf098364b arch/x86/kernel/cpu/proc.c  Linus Torvalds      2017-11-02  107  	}
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  108  
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  109  	/* Cache size */
24dbc6000f4b9b0 arch/x86/kernel/cpu/proc.c  Gustavo A. R. Silva 2018-02-13  110  	if (c->x86_cache_size)
24dbc6000f4b9b0 arch/x86/kernel/cpu/proc.c  Gustavo A. R. Silva 2018-02-13  111  		seq_printf(m, "cache size\t: %u KB\n", c->x86_cache_size);
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  112  
2f68182fc99aca0 arch/x86/kernel/cpu/proc.c  Xunlei Pang         2021-06-04 @113  	show_cpuinfo_core(m, c, cpu, index, rich_container, total);
a967ceac01cd384 arch/x86/kernel/cpu/proc.c  Hiroshi Shimamoto   2008-02-20  114  	show_cpuinfo_misc(m, c);
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  115  
3736708f034ae1e arch/x86/kernel/cpu/proc.c  Rasmus Villemoes    2014-11-28  116  	seq_puts(m, "flags\t\t:");
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  117  	for (i = 0; i < 32*NCAPINTS; i++)
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  118  		if (cpu_has(c, i) && x86_cap_flags[i] != NULL) {
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  119  			if (c->x86_vendor == X86_VENDOR_HYGON)
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  120  				seq_printf(m, " %s", i == X86_FEATURE_SEV ? "csv" :
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  121  					   (i == X86_FEATURE_SEV_ES ? "csv2" :
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  122  					    x86_cap_flags[i]));
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  123  			else
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  124  				seq_printf(m, " %s", x86_cap_flags[i]);
48894cdb70531ca arch/x86/kernel/cpu/proc.c  hanliyang           2023-07-31  125  		}
^1da177e4c3f415 arch/i386/kernel/cpu/proc.c Linus Torvalds      2005-04-16  126  

:::::: The code at line 113 was first introduced by commit
:::::: 2f68182fc99aca08e0002998ef5825e3338d468b anolis: x86: cpuinfo: Add cpuinfo support for rich container

:::::: TO: Xunlei Pang <xlpang@linux.alibaba.com>
:::::: CC: Yinan Liu <yinan@linux.alibaba.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-27  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27  9:25 [anolis-intel-cloud:devel-6.6 608/608] arch/x86/kernel/cpu/proc.c:113:9: warning: 'total' is used uninitialized kernel test robot

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.