[openeuler:OLK-6.6 2320/2320] arch/x86/kernel/cpu/proc.c:63:5: warning: no previous prototype for function 'show_cpuinfo'

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 9a55d4a78730623072ee5a82518e7c094296b8b6 commit: 9d3b0e8891b8b3450a7cd6d1367946a1c69e4eb9 [2320/2320] bpf: Add cpuinfo_x86 iterator target config: x86_64-buildonly-randconfig-002-20250528 (https://download.01.org/0day-ci/archive/20250528/202505281457.ZzTKocMO-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) rustc: rustc 1.73.0 (cc66ad468 2023-10-03) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250528/202505281457.ZzTKocMO-lkp@i...) 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/202505281457.ZzTKocMO-lkp@intel.com/ All warnings (new ones prefixed by >>):
arch/x86/kernel/cpu/proc.c:63:5: warning: no previous prototype for function 'show_cpuinfo' [-Wmissing-prototypes] 63 | int show_cpuinfo(struct seq_file *m, void *v) | ^ arch/x86/kernel/cpu/proc.c:63:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 63 | int show_cpuinfo(struct seq_file *m, void *v) | ^ | static 1 warning generated.
vim +/show_cpuinfo +63 arch/x86/kernel/cpu/proc.c 62
63 int show_cpuinfo(struct seq_file *m, void *v) 64 { 65 struct cpuinfo_x86 *c = v; 66 unsigned int cpu; 67 int i; 68 69 cpu = c->cpu_index; 70 seq_printf(m, "processor\t: %u\n" 71 "vendor_id\t: %s\n" 72 "cpu family\t: %d\n" 73 "model\t\t: %u\n" 74 "model name\t: %s\n", 75 cpu, 76 c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", 77 c->x86, 78 c->x86_model, 79 c->x86_model_id[0] ? c->x86_model_id : "unknown"); 80 81 if (c->x86_stepping || c->cpuid_level >= 0) 82 seq_printf(m, "stepping\t: %d\n", c->x86_stepping); 83 else 84 seq_puts(m, "stepping\t: unknown\n"); 85 if (c->microcode) 86 seq_printf(m, "microcode\t: 0x%x\n", c->microcode); 87 88 if (cpu_has(c, X86_FEATURE_TSC)) { 89 unsigned int freq = arch_freq_get_on_cpu(cpu); 90 91 seq_printf(m, "cpu MHz\t\t: %u.%03u\n", freq / 1000, (freq % 1000)); 92 } 93 94 /* Cache size */ 95 if (c->x86_cache_size) 96 seq_printf(m, "cache size\t: %u KB\n", c->x86_cache_size); 97 98 show_cpuinfo_core(m, c, cpu); 99 show_cpuinfo_misc(m, c); 100 101 seq_puts(m, "flags\t\t:"); 102 for (i = 0; i < 32*NCAPINTS; i++) 103 if (cpu_has(c, i) && x86_cap_flags[i] != NULL) { 104 if (c->x86_vendor == X86_VENDOR_HYGON) 105 seq_printf(m, " %s", i == X86_FEATURE_SEV ? "csv" : 106 (i == X86_FEATURE_SEV_ES ? "csv2" : 107 x86_cap_flags[i])); 108 else 109 seq_printf(m, " %s", x86_cap_flags[i]); 110 } 111
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot