* [avpatel:riscv_trace_acpi_support_v1 69/87] drivers/hwtracing/gtrace/gtrace-core.c:590:10: error: call to undeclared function 'kzalloc_obj'; ISO C99 and later do not support implicit function declarations
@ 2026-10-02 12:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-02 12:03 UTC (permalink / raw)
To: Anup Patel; +Cc: oe-kbuild-all, Mayuresh Chitale
tree: https://github.com/avpatel/linux.git riscv_trace_acpi_support_v1
head: dc5b9586f90cc15314085bdaa74661fc00d1688f
commit: e66280cd072805f1d20509bf41ea75382a4c1fc6 [69/87] gtrace: Add functions to create/destroy a trace component path
config: i386-randconfig-r2304-20261002 (https://download.01.org/0day-ci/archive/20261002/202610021442.SFwk0lIK-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261002/202610021442.SFwk0lIK-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/202610021442.SFwk0lIK-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/hwtracing/gtrace/gtrace-core.c:372:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
372 | kfree(cpriv);
| ^
drivers/hwtracing/gtrace/gtrace-core.c:416:10: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
416 | cpriv = kzalloc(sizeof(*cpriv), GFP_KERNEL);
| ^
drivers/hwtracing/gtrace/gtrace-core.c:416:8: error: incompatible integer to pointer conversion assigning to 'struct gtrace_comp_priv *' from 'int' [-Wint-conversion]
416 | cpriv = kzalloc(sizeof(*cpriv), GFP_KERNEL);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/gtrace/gtrace-core.c:426:3: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
426 | kfree(cpriv);
| ^
>> drivers/hwtracing/gtrace/gtrace-core.c:590:10: error: call to undeclared function 'kzalloc_obj'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
590 | node = kzalloc_obj(*node);
| ^
>> drivers/hwtracing/gtrace/gtrace-core.c:590:8: error: incompatible integer to pointer conversion assigning to 'struct gtrace_path_node *' from 'int' [-Wint-conversion]
590 | node = kzalloc_obj(*node);
| ^ ~~~~~~~~~~~~~~~~~~
drivers/hwtracing/gtrace/gtrace-core.c:610:3: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
610 | kfree(node);
| ^
drivers/hwtracing/gtrace/gtrace-core.c:627:9: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
627 | path = kzalloc(sizeof(*path), GFP_KERNEL);
| ^
>> drivers/hwtracing/gtrace/gtrace-core.c:627:7: error: incompatible integer to pointer conversion assigning to 'struct gtrace_path *' from 'int' [-Wint-conversion]
627 | path = kzalloc(sizeof(*path), GFP_KERNEL);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwtracing/gtrace/gtrace-core.c:661:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
661 | kfree(path);
| ^
drivers/hwtracing/gtrace/gtrace-core.c:671:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
671 | kfree(path);
| ^
11 errors generated.
vim +/kzalloc_obj +590 drivers/hwtracing/gtrace/gtrace-core.c
576
577 static int build_path_walk_fn(struct gtrace_component *comp, bool *stop,
578 struct gtrace_connection *stop_conn,
579 void *priv)
580 {
581 struct build_path_walk_priv *ppriv = priv;
582 struct gtrace_path *path = ppriv->path;
583 struct gtrace_path_node *node;
584
585 if ((!ppriv->sink && gtrace_is_sink(comp->pdata)) ||
586 (ppriv->sink && ppriv->sink == comp))
587 *stop = true;
588
589 if (*stop) {
> 590 node = kzalloc_obj(*node);
591 if (!node)
592 return -ENOMEM;
593 INIT_LIST_HEAD(&node->head);
594 gtrace_get_component(comp);
595 node->comp = comp;
596 node->conn = stop_conn;
597 list_add(&node->head, &path->comp_list);
598 }
599
600 return 0;
601 }
602
603 static void gtrace_release_path_nodes(struct gtrace_path *path)
604 {
605 struct gtrace_path_node *node, *node1;
606
607 list_for_each_entry_safe(node, node1, &path->comp_list, head) {
608 list_del(&node->head);
609 gtrace_put_component(node->comp);
610 kfree(node);
611 }
612 }
613
614 struct gtrace_path *gtrace_create_path(struct gtrace_component *source,
615 struct gtrace_component *sink,
616 enum gtrace_component_mode mode)
617 {
618 struct build_path_walk_priv priv;
619 struct gtrace_path *path;
620 int ret = 0;
621
622 if (!source || mode >= GTRACE_COMPONENT_MODE_MAX) {
623 ret = -EINVAL;
624 goto err_out;
625 }
626
> 627 path = kzalloc(sizeof(*path), GFP_KERNEL);
628 if (!path) {
629 ret = -ENOMEM;
630 goto err_out;
631 }
632 INIT_LIST_HEAD(&path->comp_list);
633 path->mode = mode;
634 path->trace_id = GTRACE_INVALID_TRACE_ID;
635
636 priv.path = path;
637 priv.sink = sink;
638 ret = gtrace_walk_output_components(source, &priv, build_path_walk_fn);
639 if (ret < 0)
640 goto err_release_path_nodes;
641
642 /* Before proceeding, check that a valid path was built. */
643 if (list_empty(&path->comp_list)) {
644 ret = -ENODEV;
645 goto err_release_path_nodes;
646 }
647
648 if (!gtrace_path_ready(path)) {
649 ret = -EOPNOTSUPP;
650 goto err_release_path_nodes;
651 }
652
653 ret = gtrace_assign_trace_id(path);
654 if (ret < 0)
655 goto err_release_path_nodes;
656
657 return path;
658
659 err_release_path_nodes:
660 gtrace_release_path_nodes(path);
661 kfree(path);
662 err_out:
663 return ERR_PTR(ret);
664 }
665 EXPORT_SYMBOL_GPL(gtrace_create_path);
666
--
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-02 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 12:03 [avpatel:riscv_trace_acpi_support_v1 69/87] drivers/hwtracing/gtrace/gtrace-core.c:590:10: error: call to undeclared function 'kzalloc_obj'; ISO C99 and later do not support implicit function declarations 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.