[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Za5qb8livKA4XTeG@pop-os>
Date: Mon, 22 Jan 2024 18:45:27 +0530
From: Pranav Athreya <pranavsubbu@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Cc: Pranav Athreya <pranavsubbugmail.com@...-os.smtp.subspace.kernel.org>
Subject: [PATCH] x86/alternatives: Fix switch block in apply_reloc()
Adhere to Linux kernel coding style
Reported by checkpatch:
ERROR: trailing statements should be on next line
+ case 1: apply_reloc_n(8, ptr, diff); break;
ERROR: trailing statements should be on next line
+ case 2: apply_reloc_n(16, ptr, diff); break;
ERROR: trailing statements should be on next line
+ case 4: apply_reloc_n(32, ptr, diff); break;
ERROR: trailing statements should be on next line
+ default: BUG();
Signed-off-by: Pranav Athreya <pranavsubbu@...il.com>
---
arch/x86/kernel/alternative.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index ee0f681ae107..340cb5724d8f 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -297,10 +297,17 @@ static __always_inline
void apply_reloc(int n, void *ptr, uintptr_t diff)
{
switch (n) {
- case 1: apply_reloc_n(8, ptr, diff); break;
- case 2: apply_reloc_n(16, ptr, diff); break;
- case 4: apply_reloc_n(32, ptr, diff); break;
- default: BUG();
+ case 1:
+ apply_reloc_n(8, ptr, diff);
+ break;
+ case 2:
+ apply_reloc_n(16, ptr, diff);
+ break;
+ case 4:
+ apply_reloc_n(32, ptr, diff);
+ break;
+ default:
+ BUG();
}
}
--
2.34.1
Powered by blists - more mailing lists