lkml.org 
[lkml]   [2020]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RESEND][PATCH v3 11/17] static_call: Simple self-test
On Tue, Mar 24, 2020 at 02:56:14PM +0100, Peter Zijlstra wrote:
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> arch/Kconfig | 6 ++++++
> kernel/static_call.c | 28 ++++++++++++++++++++++++++++
> 2 files changed, 34 insertions(+)

Should we say something?

---
diff --git a/kernel/static_call.c b/kernel/static_call.c
index b7b7fb58afce..2f27cebd5abf 100644
--- a/kernel/static_call.c
+++ b/kernel/static_call.c
@@ -10,6 +10,9 @@
#include <linux/processor.h>
#include <asm/sections.h>

+#undef pr_fmt
+#define pr_fmt(fmt) "static_call: " fmt
+
extern struct static_call_site __start_static_call_sites[],
__stop_static_call_sites[];

@@ -381,6 +384,8 @@ DEFINE_STATIC_CALL(sc_selftest, func_a);

static int __init test_static_call_init(void)
{
+ pr_info("Running static_call selftest... \n");
+
WARN_ON(static_call(sc_selftest)(2) != 3);
static_call_update(sc_selftest, &func_b);
WARN_ON(static_call(sc_selftest)(2) != 4);
--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-03-26 16:45    [W:0.117 / U:11.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site