lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <171312762955.10875.10129157513036950333.tip-bot2@tip-bot2>
Date: Sun, 14 Apr 2024 20:47:09 -0000
From: "tip-bot2 for Ingo Molnar" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
 Kyle Huey <khuey@...ehuey.com>, x86@...nel.org
Subject: [tip: perf/core] perf/bpf: Mark perf_event_set_bpf_handler() and
 perf_event_free_bpf_handler() as inline too

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     854dd99b5ddc9d90e31e5f112462a5994dd31810
Gitweb:        https://git.kernel.org/tip/854dd99b5ddc9d90e31e5f112462a5994dd31810
Author:        Ingo Molnar <mingo@...nel.org>
AuthorDate:    Sun, 14 Apr 2024 22:33:27 +02:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Sun, 14 Apr 2024 22:35:26 +02:00

perf/bpf: Mark perf_event_set_bpf_handler() and perf_event_free_bpf_handler() as inline too

They can be unused with certain Kconfig variations:

  kernel/events/core.c:9622:13: warning: ‘perf_event_free_bpf_handler’ defined but not used [-Wunused-function]
  kernel/events/core.c:9586:12: warning: ‘perf_event_set_bpf_handler’ defined but not used [-Wunused-function]

Since they are both single-use, mark them inline.

Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org
Cc: Kyle Huey <khuey@...ehuey.com>
---
 kernel/events/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index da9d9a1..6b0a66e 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9583,9 +9583,9 @@ out:
 	return ret;
 }
 
-static int perf_event_set_bpf_handler(struct perf_event *event,
-				      struct bpf_prog *prog,
-				      u64 bpf_cookie)
+static inline int perf_event_set_bpf_handler(struct perf_event *event,
+					     struct bpf_prog *prog,
+					     u64 bpf_cookie)
 {
 	if (event->overflow_handler_context)
 		/* hw breakpoint or kernel counter */
@@ -9619,7 +9619,7 @@ static int perf_event_set_bpf_handler(struct perf_event *event,
 	return 0;
 }
 
-static void perf_event_free_bpf_handler(struct perf_event *event)
+static inline void perf_event_free_bpf_handler(struct perf_event *event)
 {
 	struct bpf_prog *prog = event->prog;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ