-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
*
* lttng-tp-mempool.c
*
#include <linux/slab.h>
#include <linux/percpu.h>
-#include <lttng-tp-mempool.h>
+#include <lttng/tp-mempool.h>
struct lttng_tp_buf_entry {
int cpu; /* To make sure we return the entry to the right pool. */
struct lttng_tp_buf_entry *entry;
struct per_cpu_buf *cpu_buf;
- if (!ptr) {
+ if (!ptr)
goto end;
- }
-
entry = container_of(ptr, struct lttng_tp_buf_entry, buf);
- if (!entry) {
- goto end;
- }
-
cpu_buf = per_cpu_ptr(pool, entry->cpu);
- if (!cpu_buf) {
+ if (!cpu_buf)
goto end;
- }
/* Add it to the free list. */
list_add_tail(&entry->list, &cpu_buf->free_list);