Cleanup: Move patches.i to include/generated/
[lttng-modules.git] / lttng-tp-mempool.c
index b3dc50e66ae0f99c0c4b1a767556a3b35a747587..70ee5cc6b9d7cfef42e3a8b91b480f8097e28c01 100644 (file)
@@ -1,27 +1,14 @@
-/*
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
  * lttng-tp-mempool.c
  *
  * Copyright (C) 2018 Julien Desfossez <jdesfossez@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #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. */
@@ -151,19 +138,12 @@ void lttng_tp_mempool_free(void *ptr)
        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);
 
This page took 0.023953 seconds and 4 git commands to generate.