From: Francis Deslauriers Date: Fri, 17 Jan 2020 23:17:02 +0000 (-0500) Subject: Rename `lttng_event_{get,put}()` to `lttng_event_desc_{get,put}()` X-Git-Tag: v2.13.0-rc1~151 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0bcedee9330c118a554bd2446303712a2702e491;p=lttng-modules.git Rename `lttng_event_{get,put}()` to `lttng_event_desc_{get,put}()` Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I99a8b4cdf191555c28da5a38a1e65661421fd7fc --- diff --git a/include/lttng/events.h b/include/lttng/events.h index 833a344a..ae0c9738 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -637,8 +637,8 @@ void lttng_abi_compat_old_exit(void); int lttng_probe_register(struct lttng_probe_desc *desc); void lttng_probe_unregister(struct lttng_probe_desc *desc); -const struct lttng_event_desc *lttng_event_get(const char *name); -void lttng_event_put(const struct lttng_event_desc *desc); +const struct lttng_event_desc *lttng_event_desc_get(const char *name); +void lttng_event_desc_put(const struct lttng_event_desc *desc); int lttng_probes_init(void); void lttng_probes_exit(void); diff --git a/src/lttng-events.c b/src/lttng-events.c index e9967984..2c1e2ae1 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -651,7 +651,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan, /* Event will be enabled by enabler sync. */ event->enabled = 0; event->registered = 0; - event->desc = lttng_event_get(event_name); + event->desc = lttng_event_desc_get(event_name); if (!event->desc) { ret = -ENOENT; goto register_error; @@ -923,7 +923,7 @@ void _lttng_event_destroy(struct lttng_event *event) { switch (event->instrumentation) { case LTTNG_KERNEL_TRACEPOINT: - lttng_event_put(event->desc); + lttng_event_desc_put(event->desc); break; case LTTNG_KERNEL_KPROBE: module_put(event->desc->owner); diff --git a/src/lttng-probes.c b/src/lttng-probes.c index 4a2bb630..8ac061e7 100644 --- a/src/lttng-probes.c +++ b/src/lttng-probes.c @@ -198,7 +198,7 @@ EXPORT_SYMBOL_GPL(lttng_probe_unregister); * Called with sessions lock held. */ static -const struct lttng_event_desc *find_event(const char *name) +const struct lttng_event_desc *find_event_desc(const char *name) { struct lttng_probe_desc *probe_desc; int i; @@ -215,28 +215,28 @@ const struct lttng_event_desc *find_event(const char *name) /* * Called with sessions lock held. */ -const struct lttng_event_desc *lttng_event_get(const char *name) +const struct lttng_event_desc *lttng_event_desc_get(const char *name) { - const struct lttng_event_desc *event; + const struct lttng_event_desc *event_desc; int ret; - event = find_event(name); - if (!event) + event_desc = find_event_desc(name); + if (!event_desc) return NULL; - ret = try_module_get(event->owner); + ret = try_module_get(event_desc->owner); WARN_ON_ONCE(!ret); - return event; + return event_desc; } -EXPORT_SYMBOL_GPL(lttng_event_get); +EXPORT_SYMBOL_GPL(lttng_event_desc_get); /* * Called with sessions lock held. */ -void lttng_event_put(const struct lttng_event_desc *event) +void lttng_event_desc_put(const struct lttng_event_desc *event_desc) { - module_put(event->owner); + module_put(event_desc->owner); } -EXPORT_SYMBOL_GPL(lttng_event_put); +EXPORT_SYMBOL_GPL(lttng_event_desc_put); static void *tp_list_start(struct seq_file *m, loff_t *pos)