Perf: Return error code for perf_session__new function on failure
PATCH 1/1 Perf: Return error code for perf_session__new function on failure
This Patch is to return error code of perf_new_session function on failure instead of NULL
----------------------------------------------
Test Results:
Before Fix:
$ perf c2c report -input failed to open nput: No such file or directory
$ echo $? 0 ------------------------------------------ After Fix:
$ ./perf c2c report -input failed to open nput: No such file or directory
$ echo $? 254
--- tools/perf/builtin-annotate.c | 5 +++-- tools/perf/builtin-buildid-cache.c | 5 +++-- tools/perf/builtin-buildid-list.c | 5 +++-- tools/perf/builtin-c2c.c | 6 ++++-- tools/perf/builtin-diff.c | 9 +++++---- tools/perf/builtin-evlist.c | 5 +++-- tools/perf/builtin-inject.c | 5 +++-- tools/perf/builtin-kmem.c | 5 +++-- tools/perf/builtin-kvm.c | 9 +++++---- tools/perf/builtin-lock.c | 5 +++-- tools/perf/builtin-mem.c | 5 +++-- tools/perf/builtin-record.c | 5 +++-- tools/perf/builtin-report.c | 4 ++-- tools/perf/builtin-sched.c | 11 ++++++----- tools/perf/builtin-script.c | 9 +++++---- tools/perf/builtin-stat.c | 11 ++++++----- tools/perf/builtin-timechart.c | 5 +++-- tools/perf/builtin-top.c | 5 +++-- tools/perf/builtin-trace.c | 4 ++-- tools/perf/util/data-convert-bt.c | 4 +++- tools/perf/util/session.c | 13 +++++++++---- 21 files changed, 80 insertions(+), 55 deletions(-)
tools/perf/builtin-annotate.c +3 -2
@@ -33,6 +33,7 @@#include "util/data.h" #include "arch/common.h" #include "util/block-range.h" +#include <linux/err.h> #include <dlfcn.h> #include <errno.h>
@@ -581,8 +582,8 @@ int cmd_annotate(int argc, const char **argv) data.path = input_name; annotate.session =perf_session__new (&data, false, &annotate.tool); -if (annotate.session ==NULL ) -return -1 ; +if (IS_ERR (annotate.session)) +return PTR_ERR (annotate.session); annotate.has_br_stack =perf_header__has_feat (&annotate.session->header,HEADER_BRANCH_STACK );
tools/perf/builtin-buildid-cache.c +3 -2
@@ -26,6 +26,7 @@#include "util/symbol.h" #include "util/time-utils.h" #include "util/probe-file.h" +#include <linux/err.h> static int build_id_cache__kcore_buildid (const char *proc_dir,char *sbuildid) {
@@ -420,8 +421,8 @@ int cmd_buildid_cache(int argc, const char **argv) data.force = force; session =perf_session__new (&data, false,NULL ); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session); }if (symbol__init (session ? &session->header.env :NULL ) <0 )
tools/perf/builtin-buildid-list.c +3 -2
@@ -18,6 +18,7 @@#include "util/symbol.h" #include "util/data.h" #include <errno.h> +#include <linux/err.h> static int sysfs__fprintf_build_id (FILE *fp) {
@@ -65,8 +66,8 @@ static int perf_session__list_build_ids(bool force, bool with_hits) goto out; session =perf_session__new (&data, false, &build_id__mark_dso_hit_ops); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);/* * We take all buildids when the file contains AUX area tracing data
tools/perf/builtin-c2c.c +4 -2
@@ -18,6 +18,7 @@#include <linux/zalloc.h> #include <asm/bug.h> #include <sys/param.h> +#include <linux/err.h> #include "debug.h" #include "builtin.h" #include <subcmd/parse-options.h>
@@ -2774,8 +2775,9 @@ static int perf_c2c__report(int argc, const char **argv) } session =perf_session__new (&data,0 , &c2c.tool); -if (session ==NULL ) { -pr_debug ("No memory for session\n" ); +if (IS_ERR (session)) { + err =PTR_ERR (session); +pr_debug ("Error creating perf session\n" ); goto out; }
tools/perf/builtin-diff.c +5 -4
@@ -22,6 +22,7 @@#include "util/annotate.h" #include "util/map.h" #include <linux/zalloc.h> +#include <linux/err.h> #include <errno.h> #include <inttypes.h>
@@ -1149,9 +1150,9 @@ static int check_file_brstack(void)data__for_each_file (i, d) { d->session =perf_session__new (&d->data, false, &pdiff.tool); -if (!d->session) { +if (IS_ERR (d->session)) {pr_err ("Failed to open %s\n" , d->data.path); -return -1 ; +return PTR_ERR (d->session); } has_br_stack = perf_header__has_feat(&d->session->header,
@@ -1181,9 +1182,9 @@ static int __cmd_diff(void)data__for_each_file (i, d) { d->session =perf_session__new (&d->data, false, &pdiff.tool); -if (!d->session) { +if (IS_ERR (d->session)) { + ret =PTR_ERR (d->session);pr_err ("Failed to open %s\n" , d->data.path); - ret =-1 ; goto out_delete; }
tools/perf/builtin-evlist.c +3 -2
@@ -17,6 +17,7 @@#include "util/session.h" #include "util/data.h" #include "util/debug.h" +#include <linux/err.h> static int __cmd_evlist (const char *file_name,struct perf_attr_details *details) {
@@ -30,8 +31,8 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *detailsbool has_tracepoint = false; session =perf_session__new (&data,0 ,NULL ); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);evlist__for_each_entry (session->evlist, pos) {perf_evsel__fprintf (pos, details, stdout);
tools/perf/builtin-inject.c +3 -2
@@ -22,6 +22,7 @@#include "util/jit.h" #include "util/symbol.h" #include "util/thread.h" +#include <linux/err.h> #include <subcmd/parse-options.h>
@@ -834,8 +835,8 @@ int cmd_inject(int argc, const char **argv) data.path = inject.input_name; inject.session =perf_session__new (&data, true, &inject.tool); -if (inject.session ==NULL ) -return -1 ; +if (IS_ERR (inject.session)) +return PTR_ERR (inject.session);if (zstd_init (&(inject.session->zstd_data),0 ) <0 )pr_warning ("Decompression initialization failed.\n" );
tools/perf/builtin-kmem.c +3 -2
@@ -13,6 +13,7 @@#include "util/tool.h" #include "util/callchain.h" #include "util/time-utils.h" +#include <linux/err.h> #include <subcmd/parse-options.h> #include "util/trace-event.h"
@@ -1953,8 +1954,8 @@ int cmd_kmem(int argc, const char **argv) data.path = input_name; kmem_session = session =perf_session__new (&data, false, &perf_kmem); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session); ret =-1 ;
tools/perf/builtin-kvm.c +5 -4
@@ -19,6 +19,7 @@#include "util/top.h" #include "util/data.h" #include "util/ordered-events.h" +#include <linux/err.h> #include <sys/prctl.h> #ifdef HAVE_TIMERFD_SUPPORT
@@ -1087,9 +1088,9 @@ static int read_events(struct perf_kvm_stat *kvm) kvm->tool = eops; kvm->session =perf_session__new (&file, false, &kvm->tool); -if (!kvm->session) { +if (IS_ERR (kvm->session)) {pr_err ("Initializing perf session failed\n" ); -return -1 ; +return PTR_ERR (kvm->session); }symbol__init (&kvm->session->header.env);
@@ -1442,8 +1443,8 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,* perf session */ kvm->session =perf_session__new (&data, false, &kvm->tool); -if (kvm->session ==NULL ) { - err =-1 ; +if (IS_ERR (kvm->session)) { + err =PTR_ERR (kvm->session); goto out; } kvm->session->evlist = kvm->evlist;
tools/perf/builtin-lock.c +3 -2
@@ -30,6 +30,7 @@#include <linux/hash.h> #include <linux/kernel.h> #include <linux/zalloc.h> +#include <linux/err.h> static struct perf_session *session;
@@ -872,9 +873,9 @@ static int __cmd_report(bool display_info) }; session =perf_session__new (&data, false, &eops); -if (!session) { +if (IS_ERR (session)) {pr_err ("Initializing perf session failed\n" ); -return -1 ; +return PTR_ERR (session); }symbol__init (&session->header.env);
tools/perf/builtin-mem.c +3 -2
@@ -15,6 +15,7 @@#include "util/debug.h" #include "util/map.h" #include "util/symbol.h" +#include <linux/err.h> #define MEM_OPERATION_LOAD 0x1#define MEM_OPERATION_STORE 0x2
@@ -247,8 +248,8 @@ static int report_raw_events(struct perf_mem *mem)struct perf_session *session =perf_session__new (&data, false, &mem->tool); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);if (mem->cpu_list) { ret = perf_session__cpu_bitmap(session, mem->cpu_list,
tools/perf/builtin-record.c +3 -2
@@ -42,6 +42,7 @@#include "util/units.h" #include "util/bpf-event.h" #include "asm/bug.h" +#include <linux/err.h> #include <errno.h> #include <inttypes.h>
@@ -1337,9 +1338,9 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) } session =perf_session__new (data, false, tool); -if (session ==NULL ) { +if (IS_ERR (session)) {pr_err ("Perf session creation failed.\n" ); -return -1 ; +return PTR_ERR (session); } fd =perf_data__fd (data);
tools/perf/builtin-report.c +2 -2
@@ -1254,8 +1254,8 @@ int cmd_report(int argc, const char **argv) repeat: session =perf_session__new (&data, false, &report.tool); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);if (zstd_init (&(session->zstd_data),0 ) <0 )pr_warning ("Decompression initialization failed. Reported data may be incomplete.\n" );
tools/perf/builtin-sched.c +6 -5
@@ -36,6 +36,7 @@#include <math.h> #include <api/fs/fs.h> #include <linux/time64.h> +#include <linux/err.h> #include <linux/ctype.h>
@@ -1793,9 +1794,9 @@ static int perf_sched__read_events(struct perf_sched *sched)int rc =-1 ; session =perf_session__new (&data, false, &sched->tool); -if (session ==NULL ) { -pr_debug ("No Memory for session\n" ); -return -1 ; +if (IS_ERR (session)) { +pr_debug ("Error creating perf session" ); +return PTR_ERR (session); }symbol__init (&session->header.env);
@@ -2985,8 +2986,8 @@ static int perf_sched__timehist(struct perf_sched *sched) symbol_conf.use_callchain = sched->show_callchain; session =perf_session__new (&data, false, &sched->tool); -if (session ==NULL ) -return -ENOMEM ; +if (IS_ERR (session)) +return PTR_ERR (session); evlist = session->evlist;
tools/perf/builtin-script.c +5 -4
@@ -48,6 +48,7 @@#include <fcntl.h> #include <unistd.h> #include <subcmd/pager.h> +#include <linux/err.h> #include <linux/ctype.h>
@@ -3072,8 +3073,8 @@ int find_scripts(char **scripts_array, char **scripts_path_array, int num,int i =0 ; session =perf_session__new (&data, false,NULL ); -if (!session) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);snprintf (scripts_path,MAXPATHLEN ,"%s/scripts" ,get_argv_exec_path ());
@@ -3742,8 +3743,8 @@ int cmd_script(int argc, const char **argv) } session =perf_session__new (&data, false, &script.tool); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);if (header || header_only) { script.tool.show_feat_hdr =SHOW_FEAT_HEADER ;
tools/perf/builtin-stat.c +6 -5
@@ -81,6 +81,7 @@#include <unistd.h> #include <sys/time.h> #include <sys/resource.h> +#include <linux/err.h> #include <linux/ctype.h>
@@ -1445,9 +1446,9 @@ static int __cmd_record(int argc, const char **argv) } session =perf_session__new (data, false,NULL ); -if (session ==NULL ) { -pr_err ("Perf session creation failed.\n" ); -return -1 ; +if (IS_ERR (session)) { +pr_err ("Perf session creation failed\n" ); +return PTR_ERR (session); }init_features (session);
@@ -1644,8 +1645,8 @@ static int __cmd_report(int argc, const char **argv) perf_stat.data.mode =PERF_DATA_MODE_READ ; session =perf_session__new (&perf_stat.data, false, &perf_stat.tool); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session); perf_stat.session = session; stat_config.output = stderr;
tools/perf/builtin-timechart.c +3 -2
@@ -36,6 +36,7 @@#include "util/tool.h" #include "util/data.h" #include "util/debug.h" +#include <linux/err.h> #ifdef LACKS_OPEN_MEMSTREAM_PROTOTYPE FILE *open_memstream (char **ptr,size_t *sizeloc);
@@ -1605,8 +1606,8 @@ static int __cmd_timechart(struct timechart *tchart, const char *output_name) &tchart->tool);int ret = -EINVAL ; -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);symbol__init (&session->header.env);
tools/perf/builtin-top.c +3 -2
@@ -75,6 +75,7 @@#include <linux/stringify.h> #include <linux/time64.h> #include <linux/types.h> +#include <linux/err.h> #include <linux/ctype.h>
@@ -1642,8 +1643,8 @@ int cmd_top(int argc, const char **argv) } top.session =perf_session__new (NULL , false,NULL ); -if (top.session ==NULL ) { - status =-1 ; +if (IS_ERR (top.session)) { + status =PTR_ERR (top.session); goto out_delete_evlist; }
tools/perf/builtin-trace.c +2 -2
@@ -3253,8 +3253,8 @@ static int trace__replay(struct trace *trace) trace->multiple_threads = true; session =perf_session__new (&data, false, &trace->tool); -if (session ==NULL ) -return -1 ; +if (IS_ERR (session)) +return PTR_ERR (session);if (trace->opts.target.pid) symbol_conf.pid_list_str =strdup (trace->opts.target.pid);
tools/perf/util/data-convert-bt.c +3 -1
@@ -1619,8 +1619,10 @@ int bt_convert__perf2ctf(const char *input, const char *path, err =-1 ;/* perf.data session */ session =perf_session__new (&data,0 , &c.tool); -if (!session) +if (IS_ERR (session)) { + err =PTR_ERR (session); goto free_writer; + }if (c.queue_size) { ordered_events__set_alloc_size(&session->ordered_events,
tools/perf/util/session.c +9 -4
@@ -28,6 +28,7 @@#include "sample-raw.h" #include "stat.h" #include "arch/common.h" +#include <linux/err.h> #ifdef HAVE_ZSTD_SUPPORT static int perf_session__process_compressed_event(struct perf_session *session,
@@ -181,6 +182,7 @@ static int ordered_events__deliver_event(struct ordered_events *oe,struct perf_session *perf_session__new (struct perf_data *data,bool repipe,struct perf_tool *tool) { +int ret =0 ;struct perf_session *session =zalloc (sizeof (*session));if (!session)
@@ -195,13 +197,15 @@ struct perf_session *perf_session__new(struct perf_data *data,perf_env__init (&session->header.env);if (data) { -if (perf_data__open (data)) + ret =perf_data__open (data); +if (ret <0 ) goto out_delete; session->data = data;if (perf_data__is_read (data)) { -if (perf_session__open (session) <0 ) + ret =perf_session__open (session); +if (ret <0 ) goto out_delete;/*
@@ -216,7 +220,8 @@ struct perf_session *perf_session__new(struct perf_data *data,perf_evlist__init_trace_event_sample_raw (session->evlist);/* Open the directory data. */ -if (data->is_dir &&perf_data__open_dir (data)) + ret = data->is_dir &&perf_data__open_dir (data); +if (ret) goto out_delete; } }else {
@@ -250,7 +255,7 @@ struct perf_session *perf_session__new(struct perf_data *data, out_delete:perf_session__delete (session); out: -return NULL ; +return ERR_PTR (ret); }static void perf_session__delete_threads (struct perf_session *session)
On Wed, Aug 14, 2019 at 03:02:18PM +0530, Mamatha Inamdar wrote:
SNIP
tools/perf/util/session.c static int ordered_events__deliver_event(struct ordered_events *oe, · line 185
Quoted 7 lines
#ifdef
HAVE_ZSTD_SUPPORT
static int perf_session__process_compressed_event(structperf_session*session,tools/perf/util/session.c +1
-0@@ -181,6 +182,7 @@ static int ordered_events__deliver_event(struct ordered_events *oe,struct perf_session *perf_session__new (struct perf_data *data,bool repipe,struct perf_tool *tool) { +int ret =0 ;
hum, should ret be initialized to -ENOMEM instead?
jirka
Quoted 41 lines
tools/perf/util/session.c +7
-4struct perf_session *session =zalloc (sizeof (*session));if (!session)@@ -195,13 +197,15 @@ struct perf_session *perf_session__new(struct perf_data *data,perf_env__init (&session->header.env);if (data) { -if (perf_data__open (data)) + ret =perf_data__open (data); +if (ret <0 ) goto out_delete; session->data = data;if (perf_data__is_read (data)) { -if (perf_session__open (session) <0 ) + ret =perf_session__open (session); +if (ret <0 ) goto out_delete;/* @@ -216,7 +220,8 @@ struct perf_session *perf_session__new(struct perf_data *data,perf_evlist__init_trace_event_sample_raw (session->evlist);/* Open the directory data. */ -if (data->is_dir &&perf_data__open_dir (data)) + ret = data->is_dir &&perf_data__open_dir (data); +if (ret) goto out_delete; } }else {@@ -250,7 +255,7 @@ struct perf_session *perf_session__new(struct perf_data *data, out_delete:perf_session__delete (session); out: -return NULL ; +return ERR_PTR (ret); }static void perf_session__delete_threads (struct perf_session *session)
Quoted 40 lines · Mamatha Inamdar
This Patch is to return error code of
perf_new_sessionfunction on failure instead of NULL
----------------------------------------------
Test Results:Before Fix:
$ perf c2c report -input failed to open nput: No such file or directory$ echo $? 0 ------------------------------------------ After Fix:$ ./perf c2c report -input failed to open nput: No such file or directory$ echo $? 254Signed-off-by Mamatha Inamdar <[email protected]>Acked-by Ravi Bangoria <[email protected]>Reported-by Nageswara R Sastry <[email protected]>Tested-by Nageswara R Sastry <[email protected]>--- tools/perf/builtin-annotate.c | 5 +++-- tools/perf/builtin-buildid-cache.c | 5 +++-- tools/perf/builtin-buildid-list.c | 5 +++-- tools/perf/builtin-c2c.c | 6 ++++-- tools/perf/builtin-diff.c | 9 +++++---- tools/perf/builtin-evlist.c | 5 +++-- tools/perf/builtin-inject.c | 5 +++-- tools/perf/builtin-kmem.c | 5 +++-- tools/perf/builtin-kvm.c | 9 +++++---- tools/perf/builtin-lock.c | 5 +++-- tools/perf/builtin-mem.c | 5 +++-- tools/perf/builtin-record.c | 5 +++-- tools/perf/builtin-report.c | 4 ++-- tools/perf/builtin-sched.c | 11 ++++++-----
Quoted 8 lines
tools/perf/builtin-script.c | 9 +++++---- tools/perf/builtin-stat.c | 11 ++++++----- tools/perf/builtin-timechart.c | 5 +++-- tools/perf/builtin-top.c | 5 +++-- tools/perf/builtin-trace.c | 4 ++-- tools/perf/util/data-convert-bt.c | 4 +++- tools/perf/util/session.c | 13 +++++++++---- 21 files changed, 80 insertions(+), 55 deletions(-)
I'm getting few conflicts, please rebase to latest Arnaldo's perf/core
patching file builtin-annotate.c
patching file builtin-buildid-cache.c
patching file builtin-buildid-list.c
patching file builtin-c2c.c
patching file builtin-diff.c
patching file builtin-evlist.c
patching file builtin-inject.c
patching file builtin-kmem.c
patching file builtin-kvm.c
patching file builtin-lock.c
patching file builtin-mem.c
patching file builtin-record.c
Hunk #2 succeeded at 1361 (offset 23 lines).
patching file builtin-report.c
patching file builtin-sched.c
patching file builtin-script.c
Hunk #1 FAILED at 48.
Hunk #2 succeeded at 3073 (offset 1 line).
Hunk #3 succeeded at 3743 (offset 1 line).
1 out of 3 hunks FAILED -- saving rejects to file builtin-script.c.rej patching file builtin-stat.c
Hunk #1 succeeded at 81 with fuzz 1.
Hunk #2 succeeded at 1447 (offset 1 line).
Hunk #3 succeeded at 1646 (offset 1 line).
patching file builtin-timechart.c
patching file builtin-top.c
Hunk #1 succeeded at 74 (offset -1 lines).
Hunk #2 succeeded at 1668 (offset 25 lines).
patching file builtin-trace.c
Hunk #1 succeeded at 3573 (offset 320 lines).
patching file util/data-convert-bt.c
patching file util/session.c
Hunk #1 succeeded at 30 (offset 2 lines).
Hunk #2 succeeded at 184 (offset 2 lines).
Hunk #3 succeeded at 199 (offset 2 lines).
Hunk #4 succeeded at 222 (offset 2 lines).
Hunk #5 succeeded at 257 (offset 2 lines).
thanks,
jirka
On Wed, Aug 14, 2019 at 03:02:18PM +0530, Mamatha Inamdar wrote:
SNIP
Quoted 7 lines
tools/perf/builtin-trace.c +0
-0symbol_conf.pid_list_str =strdup (trace->opts.target.pid);tools/perf/util/data-convert-bt.c +0
-0@@ -1619,8 +1619,10 @@ int bt_convert__perf2ctf(const char *input, const char *path, err =-1 ;
tools/perf/util/data-convert-bt.c int bt_convert__perf2ctf(const char *input, const char *path, · line 1628
Quoted 10 lines
tools/perf/util/data-convert-bt.c +3
-1/* perf.data session */ session =perf_session__new (&data,0 , &c.tool); -if (!session) +if (IS_ERR (session)) { + err =PTR_ERR (session); goto free_writer; + }if (c.queue_size) { ordered_events__set_alloc_size(&session->ordered_events,
I'm getting:
CC util/data-convert-bt.outil/data-convert-bt.c: In function ‘bt_convert__perf2ctf’:util/data-convert-bt.c:1622:6: error: implicit declaration of function ‘IS_ERR’; did you mean ‘SIG_ERR’? [-Werror=implicit-function-declaration]
1622 | if (IS_ERR(session)) {
| ^~~~~~
| SIG_ERRutil/data-convert-bt.c:1622:6: error: nested extern declaration of ‘IS_ERR’ [-Werror=nested-externs] util/data-convert-bt.c:1623:9: error: implicit declaration of function ‘PTR_ERR’ [-Werror=implicit-function-declaration]
1623 | err = PTR_ERR(session);
jirka
Hi Jiri Olsa,
Thanks for reviewing the patch..
working on your comments, will post new version ASAP.
Quoted 36 lines · Jiri Olsa
On Wed, Aug 14, 2019 at 03:02:18PM +0530, Mamatha Inamdar wrote:
SNIP
Quoted 7 lines
symbol_conf.pid_list_str = strdup(trace->opts.target.pid);tools/perf/util/data-convert-bt.c +0
-0@@ -1619,8 +1619,10 @@ int bt_convert__perf2ctf(const char *input, const char *path, err =-1 ;tools/perf/util/data-convert-bt.c int bt_convert__perf2ctf(const char *input, const char *path, · line 1628
Quoted 10 lines
tools/perf/util/data-convert-bt.c +3
-1/* perf.data session */ session =perf_session__new (&data,0 , &c.tool); -if (!session) +if (IS_ERR (session)) { + err =PTR_ERR (session); goto free_writer; + }if (c.queue_size) { ordered_events__set_alloc_size(&session->ordered_events,I'm getting:
CC
util/data-convert-bt.outil/data-convert-bt.c: In function ‘bt_convert__perf2ctf’:util/data-convert-bt.c:1622:6: error: implicit declaration of function ‘IS_ERR’; did you mean ‘SIG_ERR’? [-Werror=implicit-function-declaration]1622 | if (IS_ERR(session)) { | ^~~~~~ | SIG_ERR
util/data-convert-bt.c:1622:6: error: nested extern declaration of ‘IS_ERR’ [-Werror=nested-externs]util/data-convert-bt.c:1623:9: error: implicit declaration of function ‘PTR_ERR’ [-Werror=implicit-function-declaration]
1623 | err =PTR_ERR(session);jirka