summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2019-03-06 11:37:12 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-06 16:44:37 +0000
commitcb3194828a3a83372c222103bfe3c2a61cea16d9 (patch)
treee8d966a23c12c76d939153d586664f4a01eba8bd /meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch
parent0f2b2b6c9877fbffe2bffddbcb920e1d9aa63c18 (diff)
downloadpoky-cb3194828a3a83372c222103bfe3c2a61cea16d9.tar.gz
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>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch b/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch
new file mode 100644
index 0000000000..4ffe488677
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0009-Cleanup-tp-mempool-Remove-logically-dead-code.patch
@@ -0,0 +1,46 @@
1From 416cee8707053a9015dfec8332e12f8c263098e3 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Thu, 14 Feb 2019 11:40:50 -0500
4Subject: [PATCH 9/9] Cleanup: tp mempool: Remove logically dead code
5
6Found by Coverity:
7CID 1391045 (#1 of 1): Logically dead code (DEADCODE)
8
9Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10
11Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/416cee8707053a9015dfec8332e12f8c263098e3
12
13Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
14---
15 lttng-tp-mempool.c | 11 ++---------
16 1 file changed, 2 insertions(+), 9 deletions(-)
17
18diff --git a/lttng-tp-mempool.c b/lttng-tp-mempool.c
19index d984bd4..21e8376 100644
20--- a/lttng-tp-mempool.c
21+++ b/lttng-tp-mempool.c
22@@ -151,19 +151,12 @@ void lttng_tp_mempool_free(void *ptr)
23 struct lttng_tp_buf_entry *entry;
24 struct per_cpu_buf *cpu_buf;
25
26- if (!ptr) {
27+ if (!ptr)
28 goto end;
29- }
30-
31 entry = container_of(ptr, struct lttng_tp_buf_entry, buf);
32- if (!entry) {
33- goto end;
34- }
35-
36 cpu_buf = per_cpu_ptr(pool, entry->cpu);
37- if (!cpu_buf) {
38+ if (!cpu_buf)
39 goto end;
40- }
41 /* Add it to the free list. */
42 list_add_tail(&entry->list, &cpu_buf->free_list);
43
44--
452.19.1
46