* [openeuler:OLK-6.6 3508/3508] drivers/acpi/pptt.c:309:5: warning: no previous prototype for function 'acpi_pptt_for_each_container'
@ 2025-12-11 13:49 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-12-11 13:49 UTC (permalink / raw)
To: kernel, Zeng Heng; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 5930fa3740c518a9f6ba688fd0c1873d6f3adbce
commit: 1ab6383ee94e788fe424d7eac10dc8ec3bfa6828 [3508/3508] ACPI / PPTT: Provide a helper to walk processor containers
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20251211/202512111416.5evNsB79-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 4125e73cdc6188cca4c1c72b72e2b2d85c157483)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251211/202512111416.5evNsB79-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/202512111416.5evNsB79-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:3:
In file included from ././include/linux/compiler_types.h:150:
./include/linux/compiler-clang.h:33:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined]
33 | #define __SANITIZE_ADDRESS__
| ^
<built-in>:367:9: note: previous definition is here
367 | #define __SANITIZE_ADDRESS__ 1
| ^
In file included from drivers/acpi/pptt.c:20:
In file included from ./include/linux/acpi.h:37:
In file included from ./include/acpi/acpi_io.h:7:
In file included from ./arch/arm64/include/asm/acpi.h:14:
In file included from ./include/linux/memblock.h:12:
In file included from ./include/linux/mm.h:2181:
./include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
./include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
./include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
./include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
./include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/acpi/pptt.c:309:5: warning: no previous prototype for function 'acpi_pptt_for_each_container' [-Wmissing-prototypes]
309 | int acpi_pptt_for_each_container(acpi_pptt_cpu_callback_t callback, void *arg)
| ^
drivers/acpi/pptt.c:309:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
309 | int acpi_pptt_for_each_container(acpi_pptt_cpu_callback_t callback, void *arg)
| ^
| static
7 warnings generated.
--
>> drivers/acpi/pptt.c:310: warning: Function parameter or member 'callback' not described in 'acpi_pptt_for_each_container'
>> drivers/acpi/pptt.c:310: warning: Function parameter or member 'arg' not described in 'acpi_pptt_for_each_container'
vim +/acpi_pptt_for_each_container +309 drivers/acpi/pptt.c
297
298 /**
299 * acpi_pptt_for_each_container() - Iterate over all processor containers
300 *
301 * Not all 'Processor' entries in the PPTT are either a CPU or a Processor
302 * Container, they may exist purely to describe a Private resource. CPUs
303 * have to be leaves, so a Processor Container is a non-leaf that has the
304 * 'ACPI Processor ID valid' flag set.
305 *
306 * Return: 0 for a complete walk, or the first non-zero value from the callback
307 * that stopped the walk.
308 */
> 309 int acpi_pptt_for_each_container(acpi_pptt_cpu_callback_t callback, void *arg)
> 310 {
311 struct acpi_pptt_processor *cpu_node;
312 struct acpi_table_header *table_hdr;
313 struct acpi_subtable_header *entry;
314 bool leaf_flag, has_leaf_flag = false;
315 unsigned long table_end;
316 acpi_status status;
317 u32 proc_sz;
318 int ret = 0;
319
320 status = acpi_get_table(ACPI_SIG_PPTT, 0, &table_hdr);
321 if (ACPI_FAILURE(status))
322 return 0;
323
324 if (table_hdr->revision > 1)
325 has_leaf_flag = true;
326
327 table_end = (unsigned long)table_hdr + table_hdr->length;
328 entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
329 sizeof(struct acpi_table_pptt));
330 proc_sz = sizeof(struct acpi_pptt_processor);
331 while ((unsigned long)entry + proc_sz < table_end) {
332 cpu_node = (struct acpi_pptt_processor *)entry;
333 if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
334 cpu_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID)
335 {
336 leaf_flag = cpu_node->flags & ACPI_PPTT_ACPI_LEAF_NODE;
337 if ((has_leaf_flag && !leaf_flag) ||
338 (!has_leaf_flag && !acpi_pptt_leaf_node(table_hdr, cpu_node)))
339 {
340 ret = callback(cpu_node, arg);
341 if (ret)
342 break;
343 }
344 }
345 entry = ACPI_ADD_PTR(struct acpi_subtable_header, entry,
346 entry->length);
347 }
348
349 acpi_put_table(table_hdr);
350
351 return ret;
352 }
353
--
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:[~2025-12-11 13:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11 13:49 [openeuler:OLK-6.6 3508/3508] drivers/acpi/pptt.c:309:5: warning: no previous prototype for function 'acpi_pptt_for_each_container' 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.