diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-09-19 06:35:53 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-09-19 07:22:04 -0400 |
| commit | 571d0563c8881595f4ab027aef9ed1c55e3e7b7c (patch) | |
| tree | 1b05f315a65e3cb7acd147cfd3c2e6f08a6cf384 | |
| parent | ffb2315fd22c2568747402eecdc581a245a2f5ba (diff) | |
x86/paravirt: Fix some warning messages
The first argument to WARN_ONCE() is a condition.
Fixes: 5800dc5c19f3 ("x86/paravirt: Fix spectre-v2 mitigations for paravirt guests")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alok Kataria <akataria@vmware.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: virtualization@lists.linux-foundation.org
Cc: kernel-janitors@vger.kernel.org
Link: https://lkml.kernel.org/r/20180919103553.GD9238@mwanda
| -rw-r--r-- | arch/x86/kernel/paravirt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index afdb303285f8..8dc69d82567e 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
| @@ -91,7 +91,7 @@ unsigned paravirt_patch_call(void *insnbuf, | |||
| 91 | 91 | ||
| 92 | if (len < 5) { | 92 | if (len < 5) { |
| 93 | #ifdef CONFIG_RETPOLINE | 93 | #ifdef CONFIG_RETPOLINE |
| 94 | WARN_ONCE("Failing to patch indirect CALL in %ps\n", (void *)addr); | 94 | WARN_ONCE(1, "Failing to patch indirect CALL in %ps\n", (void *)addr); |
| 95 | #endif | 95 | #endif |
| 96 | return len; /* call too long for patch site */ | 96 | return len; /* call too long for patch site */ |
| 97 | } | 97 | } |
| @@ -111,7 +111,7 @@ unsigned paravirt_patch_jmp(void *insnbuf, const void *target, | |||
| 111 | 111 | ||
| 112 | if (len < 5) { | 112 | if (len < 5) { |
| 113 | #ifdef CONFIG_RETPOLINE | 113 | #ifdef CONFIG_RETPOLINE |
| 114 | WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr); | 114 | WARN_ONCE(1, "Failing to patch indirect JMP in %ps\n", (void *)addr); |
| 115 | #endif | 115 | #endif |
| 116 | return len; /* call too long for patch site */ | 116 | return len; /* call too long for patch site */ |
| 117 | } | 117 | } |
