X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-tracepoint.c;h=3d0cafd764fb85ee7edecd85c28f6a0ae16df6dd;hb=369708f464bedc0682151df9308cebfa14dbdb2b;hp=ec77e7ccfb7dbfa4a7ffb62f232682f6ff824690;hpb=9f36eaed6f91d5897924b551b44d1edd8cee00e2;p=lttng-modules.git diff --git a/lttng-tracepoint.c b/lttng-tracepoint.c index ec77e7cc..3d0cafd7 100644 --- a/lttng-tracepoint.c +++ b/lttng-tracepoint.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) * * lttng-tracepoint.c * @@ -16,7 +16,6 @@ #include #include -#include /* * Protect the tracepoint table. lttng_tracepoint_mutex nests within @@ -106,7 +105,7 @@ struct tracepoint_entry *get_tracepoint(const char *name) u32 hash = jhash(name, strlen(name), 0); head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; - lttng_hlist_for_each_entry(e, head, hlist) { + hlist_for_each_entry(e, head, hlist) { if (!strcmp(name, e->name)) return e; } @@ -126,7 +125,7 @@ struct tracepoint_entry *add_tracepoint(const char *name) u32 hash = jhash(name, name_len - 1, 0); head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; - lttng_hlist_for_each_entry(e, head, hlist) { + hlist_for_each_entry(e, head, hlist) { if (!strcmp(name, e->name)) { printk(KERN_NOTICE "tracepoint %s busy\n", name); @@ -228,7 +227,7 @@ int lttng_tracepoint_coming(struct tp_module *tp_mod) struct tracepoint_entry *e; struct lttng_tp_probe *p; - tp = tp_mod->mod->tracepoints_ptrs[i]; + tp = tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]); e = get_tracepoint(tp->name); if (!e) { e = add_tracepoint(tp->name); @@ -255,7 +254,7 @@ int lttng_tracepoint_coming(struct tp_module *tp_mod) } } mutex_unlock(<tng_tracepoint_mutex); - return 0; + return NOTIFY_OK; } static @@ -269,7 +268,7 @@ int lttng_tracepoint_going(struct tp_module *tp_mod) struct tracepoint_entry *e; struct lttng_tp_probe *p; - tp = tp_mod->mod->tracepoints_ptrs[i]; + tp = tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]); e = get_tracepoint(tp->name); if (!e || !e->tp) continue;