* [avpatel:riscv_trace_support_v5 94/104] drivers/hwtracing/gtrace/gtrace-core.c:561:8: warning: assignment to 'struct gtrace_path_node *' from 'int' makes pointer from integer without a cast
@ 2026-08-12 10:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-12 10:29 UTC (permalink / raw)
To: Anup Patel; +Cc: oe-kbuild-all, Mayuresh Chitale
tree: https://github.com/avpatel/linux.git riscv_trace_support_v5
head: 1d99b155d3c1ca9a30209d51590db002a606f30c
commit: c8b928f098710cd4a1cf5604883f2f025c011cea [94/104] gtrace: Add functions to create/destroy a trace component path
config: csky-randconfig-r051-20260812 (https://download.01.org/0day-ci/archive/20260812/202608121806.vOZ5LycL-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260812/202608121806.vOZ5LycL-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/202608121806.vOZ5LycL-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/hwtracing/gtrace/gtrace-core.c: In function 'gtrace_component_release':
drivers/hwtracing/gtrace/gtrace-core.c:347:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
347 | kfree(comp);
| ^~~~~
drivers/hwtracing/gtrace/gtrace-core.c: In function 'gtrace_register_component':
drivers/hwtracing/gtrace/gtrace-core.c:390:9: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
390 | comp = kzalloc(sizeof(*comp), GFP_KERNEL);
| ^~~~~~~
drivers/hwtracing/gtrace/gtrace-core.c:390:7: warning: assignment to 'struct gtrace_component *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
390 | comp = kzalloc(sizeof(*comp), GFP_KERNEL);
| ^
drivers/hwtracing/gtrace/gtrace-core.c: In function 'build_path_walk_fn':
drivers/hwtracing/gtrace/gtrace-core.c:561:10: error: implicit declaration of function 'kzalloc_obj' [-Werror=implicit-function-declaration]
561 | node = kzalloc_obj(*node);
| ^~~~~~~~~~~
>> drivers/hwtracing/gtrace/gtrace-core.c:561:8: warning: assignment to 'struct gtrace_path_node *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
561 | node = kzalloc_obj(*node);
| ^
drivers/hwtracing/gtrace/gtrace-core.c: In function 'gtrace_create_path':
>> drivers/hwtracing/gtrace/gtrace-core.c:598:7: warning: assignment to 'struct gtrace_path *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
598 | path = kzalloc(sizeof(*path), GFP_KERNEL);
| ^
cc1: some warnings being treated as errors
vim +561 drivers/hwtracing/gtrace/gtrace-core.c
547
548 static int build_path_walk_fn(struct gtrace_component *comp, bool *stop,
549 struct gtrace_connection *stop_conn,
550 void *priv)
551 {
552 struct build_path_walk_priv *ppriv = priv;
553 struct gtrace_path *path = ppriv->path;
554 struct gtrace_path_node *node;
555
556 if ((!ppriv->sink && gtrace_is_sink(comp->pdata)) ||
557 (ppriv->sink && ppriv->sink == comp))
558 *stop = true;
559
560 if (*stop) {
> 561 node = kzalloc_obj(*node);
562 if (!node)
563 return -ENOMEM;
564 INIT_LIST_HEAD(&node->head);
565 gtrace_get_component(comp);
566 node->comp = comp;
567 node->conn = stop_conn;
568 list_add(&node->head, &path->comp_list);
569 }
570
571 return 0;
572 }
573
574 static void gtrace_release_path_nodes(struct gtrace_path *path)
575 {
576 struct gtrace_path_node *node, *node1;
577
578 list_for_each_entry_safe(node, node1, &path->comp_list, head) {
579 list_del(&node->head);
580 gtrace_put_component(node->comp);
581 kfree(node);
582 }
583 }
584
585 struct gtrace_path *gtrace_create_path(struct gtrace_component *source,
586 struct gtrace_component *sink,
587 enum gtrace_component_mode mode)
588 {
589 struct build_path_walk_priv priv;
590 struct gtrace_path *path;
591 int ret = 0;
592
593 if (!source || mode >= GTRACE_COMPONENT_MODE_MAX) {
594 ret = -EINVAL;
595 goto err_out;
596 }
597
> 598 path = kzalloc(sizeof(*path), GFP_KERNEL);
599 if (!path) {
600 ret = -ENOMEM;
601 goto err_out;
602 }
603 INIT_LIST_HEAD(&path->comp_list);
604 path->mode = mode;
605 path->trace_id = GTRACE_INVALID_TRACE_ID;
606
607 priv.path = path;
608 priv.sink = sink;
609 ret = gtrace_walk_output_components(source, &priv, build_path_walk_fn);
610 if (ret < 0)
611 goto err_release_path_nodes;
612
613 if (!gtrace_path_ready(path)) {
614 ret = -EOPNOTSUPP;
615 goto err_release_path_nodes;
616 }
617
618 ret = gtrace_assign_trace_id(path);
619 if (ret < 0)
620 goto err_release_path_nodes;
621
622 return path;
623
624 err_release_path_nodes:
625 gtrace_release_path_nodes(path);
626 kfree(path);
627 err_out:
628 return ERR_PTR(ret);
629 }
630 EXPORT_SYMBOL_GPL(gtrace_create_path);
631
--
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-08-12 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 10:29 [avpatel:riscv_trace_support_v5 94/104] drivers/hwtracing/gtrace/gtrace-core.c:561:8: warning: assignment to 'struct gtrace_path_node *' from 'int' makes pointer from integer without a cast 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.