1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-27 19:37:10 +00:00
Files
poky/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch
Bruce Ashfield cb3194828a lttng: add 5.x fixup patches to 2.10.8 release
lttng hasn't released 2.10.9, but the stable/2.10 branch
contains changes that we need to build against the 5.0
kernel.

We add them here as patches, and we can drop them in the
future when lttng is updated.

(From OE-Core rev: f8bcf3486d44ebd867e9089d4dbd3b56726c9075)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-06 16:44:37 +00:00

47 lines
1.2 KiB
Diff

From 416cee8707053a9015dfec8332e12f8c263098e3 Mon Sep 17 00:00:00 2001
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Thu, 14 Feb 2019 11:40:50 -0500
Subject: [PATCH 9/9] Cleanup: tp mempool: Remove logically dead code
Found by Coverity:
CID 1391045 (#1 of 1): Logically dead code (DEADCODE)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/416cee8707053a9015dfec8332e12f8c263098e3
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
lttng-tp-mempool.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/lttng-tp-mempool.c b/lttng-tp-mempool.c
index d984bd4..21e8376 100644
--- a/lttng-tp-mempool.c
+++ b/lttng-tp-mempool.c
@@ -151,19 +151,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);
--
2.19.1