From: Michael Jeanson Date: Wed, 17 Jul 2024 15:32:31 +0000 (-0400) Subject: fix: add 'static inline' to lttng_kretprobes_init_event() X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=9c1373888a118ac80956a3af71cc04a31ed24ad7;p=lttng-modules.git fix: add 'static inline' to lttng_kretprobes_init_event() Add missing 'static inline' to lttng_kretprobes_init_event() placeholder function when CONFIG_KRETPROBES is not set. Also some minor reformating to improve readability. Change-Id: I23cf83dff99f4168ae0f339c2b4911796e0b0273 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index 9f2f1605..55d34c44 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -1169,8 +1169,13 @@ struct lttng_krp *lttng_kretprobes_create_krp(const char *symbol_name, { return NULL; } + +static inline +void lttng_kretprobes_put_krp(struct lttng_krp *krp) +{ +} + static inline -void lttng_kretprobes_put_krp(struct lttng_krp *krp) { } int lttng_kretprobes_init_event(const char *name, enum lttng_kretprobe_entryexit entryexit, struct lttng_kernel_event_common *event, @@ -1178,27 +1183,35 @@ int lttng_kretprobes_init_event(const char *name, { return -ENOSYS; } + static inline int lttng_kretprobes_register_event(struct lttng_kernel_event_common *event) { return -ENOSYS; } + static inline -void lttng_kretprobes_unregister_event(struct lttng_kernel_event_common *event) { } +void lttng_kretprobes_unregister_event(struct lttng_kernel_event_common *event) +{ +} + static inline -void lttng_kretprobes_destroy_event_private(struct lttng_kernel_event_common *event) { } +void lttng_kretprobes_destroy_event_private(struct lttng_kernel_event_common *event) +{ +} + static inline int lttng_kretprobes_match_check(const char *symbol_name, uint64_t offset, uint64_t addr) { return -ENOENT; } - static inline struct lttng_kernel_event_desc *lttng_create_kretprobes_event_desc(const char *name) { return NULL; } + static inline int lttng_kretprobes_register(const char *symbol_name, uint64_t offset,