From: Pranav Athreya <pranavsubbu@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Cc: Pranav Athreya <pranavsubbugmail.com@pop-os>
Subject: [PATCH] x86/alternatives: Fix switch block in apply_reloc()
Date: Mon, 22 Jan 2024 18:45:27 +0530 [thread overview]
Message-ID: <Za5qb8livKA4XTeG@pop-os> (raw)
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@gmail.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
next reply other threads:[~2024-01-22 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 13:15 Pranav Athreya [this message]
2024-01-22 13:20 ` Borislav Petkov
2024-01-22 13:25 ` Pranav Athreya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Za5qb8livKA4XTeG@pop-os \
--to=pranavsubbu@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pranavsubbugmail.com@pop-os \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®