CC: kbuild-...@lists.01.org In-Reply-To: <9fc01420bdbf756ef3f8267b33aff6de2e6f2b60.1590608239.git.zanu...@kernel.org> References: <9fc01420bdbf756ef3f8267b33aff6de2e6f2b60.1590608239.git.zanu...@kernel.org> TO: Tom Zanussi <zanu...@kernel.org>
Hi Tom, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/perf/core] [also build test WARNING on trace/for-next linus/master v5.7-rc7 next-20200529] [cannot apply to linux/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Tom-Zanussi/tracing-Make-synthetic-events-a-separate-option/20200528-035736 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git c50c75e9b87946499a62bffc021e95c87a1d57cd :::::: branch date: 3 days ago :::::: commit date: 3 days ago config: i386-randconfig-m021-20200529 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <l...@intel.com> Reported-by: Dan Carpenter <dan.carpen...@oracle.com> smatch warnings: kernel/trace/trace_events_synth.c:604 register_synth_event() warn: passing a valid pointer to 'PTR_ERR' # https://github.com/0day-ci/linux/commit/09cc706157bf55e5f7e0a29222b5c5c5ca9f420c git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 09cc706157bf55e5f7e0a29222b5c5c5ca9f420c vim +/PTR_ERR +604 kernel/trace/trace_events_synth.c 09cc706157bf55 Tom Zanussi 2020-05-27 589 09cc706157bf55 Tom Zanussi 2020-05-27 590 static int register_synth_event(struct synth_event *event) 09cc706157bf55 Tom Zanussi 2020-05-27 591 { 09cc706157bf55 Tom Zanussi 2020-05-27 592 struct trace_event_call *call = &event->call; 09cc706157bf55 Tom Zanussi 2020-05-27 593 int ret = 0; 09cc706157bf55 Tom Zanussi 2020-05-27 594 09cc706157bf55 Tom Zanussi 2020-05-27 595 event->call.class = &event->class; 09cc706157bf55 Tom Zanussi 2020-05-27 596 event->class.system = kstrdup(SYNTH_SYSTEM, GFP_KERNEL); 09cc706157bf55 Tom Zanussi 2020-05-27 597 if (!event->class.system) { 09cc706157bf55 Tom Zanussi 2020-05-27 598 ret = -ENOMEM; 09cc706157bf55 Tom Zanussi 2020-05-27 599 goto out; 09cc706157bf55 Tom Zanussi 2020-05-27 600 } 09cc706157bf55 Tom Zanussi 2020-05-27 601 09cc706157bf55 Tom Zanussi 2020-05-27 602 event->tp = alloc_synth_tracepoint(event->name); 09cc706157bf55 Tom Zanussi 2020-05-27 603 if (IS_ERR(event->tp)) { 09cc706157bf55 Tom Zanussi 2020-05-27 @604 ret = PTR_ERR(event->tp); 09cc706157bf55 Tom Zanussi 2020-05-27 605 event->tp = NULL; 09cc706157bf55 Tom Zanussi 2020-05-27 606 goto out; 09cc706157bf55 Tom Zanussi 2020-05-27 607 } 09cc706157bf55 Tom Zanussi 2020-05-27 608 09cc706157bf55 Tom Zanussi 2020-05-27 609 INIT_LIST_HEAD(&call->class->fields); 09cc706157bf55 Tom Zanussi 2020-05-27 610 call->event.funcs = &synth_event_funcs; 09cc706157bf55 Tom Zanussi 2020-05-27 611 call->class->fields_array = synth_event_fields_array; 09cc706157bf55 Tom Zanussi 2020-05-27 612 09cc706157bf55 Tom Zanussi 2020-05-27 613 ret = register_trace_event(&call->event); 09cc706157bf55 Tom Zanussi 2020-05-27 614 if (!ret) { 09cc706157bf55 Tom Zanussi 2020-05-27 615 ret = -ENODEV; 09cc706157bf55 Tom Zanussi 2020-05-27 616 goto out; 09cc706157bf55 Tom Zanussi 2020-05-27 617 } 09cc706157bf55 Tom Zanussi 2020-05-27 618 call->flags = TRACE_EVENT_FL_TRACEPOINT; 09cc706157bf55 Tom Zanussi 2020-05-27 619 call->class->reg = trace_event_reg; 09cc706157bf55 Tom Zanussi 2020-05-27 620 call->class->probe = trace_event_raw_event_synth; 09cc706157bf55 Tom Zanussi 2020-05-27 621 call->data = event; 09cc706157bf55 Tom Zanussi 2020-05-27 622 call->tp = event->tp; 09cc706157bf55 Tom Zanussi 2020-05-27 623 09cc706157bf55 Tom Zanussi 2020-05-27 624 ret = trace_add_event_call(call); 09cc706157bf55 Tom Zanussi 2020-05-27 625 if (ret) { 09cc706157bf55 Tom Zanussi 2020-05-27 626 pr_warn("Failed to register synthetic event: %s\n", 09cc706157bf55 Tom Zanussi 2020-05-27 627 trace_event_name(call)); 09cc706157bf55 Tom Zanussi 2020-05-27 628 goto err; 09cc706157bf55 Tom Zanussi 2020-05-27 629 } 09cc706157bf55 Tom Zanussi 2020-05-27 630 09cc706157bf55 Tom Zanussi 2020-05-27 631 ret = set_synth_event_print_fmt(call); 09cc706157bf55 Tom Zanussi 2020-05-27 632 if (ret < 0) { 09cc706157bf55 Tom Zanussi 2020-05-27 633 trace_remove_event_call(call); 09cc706157bf55 Tom Zanussi 2020-05-27 634 goto err; 09cc706157bf55 Tom Zanussi 2020-05-27 635 } 09cc706157bf55 Tom Zanussi 2020-05-27 636 out: 09cc706157bf55 Tom Zanussi 2020-05-27 637 return ret; 09cc706157bf55 Tom Zanussi 2020-05-27 638 err: 09cc706157bf55 Tom Zanussi 2020-05-27 639 unregister_trace_event(&call->event); 09cc706157bf55 Tom Zanussi 2020-05-27 640 goto out; 09cc706157bf55 Tom Zanussi 2020-05-27 641 } 09cc706157bf55 Tom Zanussi 2020-05-27 642 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org