[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1612329552-17977-1-git-send-email-daizhiyuan@phytium.com.cn>
Date: Wed, 3 Feb 2021 13:19:12 +0800
From: Zhiyuan Dai <daizhiyuan@...tium.com.cn>
To: catalin.marinas@....com, will@...nel.org
Cc: Dave.Martin@....com, broonie@...nel.org, mark.rutland@....com,
linux-kernel@...r.kernel.org,
Zhiyuan Dai <daizhiyuan@...tium.com.cn>
Subject: [PATCH] arm64/kernel: minor coding style tweaks
Fixed two coding style issues in kernel/trap.c
1. spaces required around that '='
2. Missing a blank line after declarations
Signed-off-by: Zhiyuan Dai <daizhiyuan@...tium.com.cn>
---
arch/arm64/kernel/traps.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 6895ce7..4001a39 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -45,7 +45,7 @@
#include <asm/system_misc.h>
#include <asm/sysreg.h>
-static const char *handler[]= {
+static const char *handler[] = {
"Synchronous Abort",
"IRQ",
"FIQ",
@@ -318,6 +318,7 @@ static int call_undef_hook(struct pt_regs *regs)
} else if (compat_thumb_mode(regs)) {
/* 16-bit Thumb instruction */
__le16 instr_le;
+
if (get_user(instr_le, (__le16 __user *)pc))
goto exit;
instr = le16_to_cpu(instr_le);
@@ -332,6 +333,7 @@ static int call_undef_hook(struct pt_regs *regs)
} else {
/* 32-bit ARM instruction */
__le32 instr_le;
+
if (get_user(instr_le, (__le32 __user *)pc))
goto exit;
instr = le32_to_cpu(instr_le);
--
1.8.3.1
Powered by blists - more mailing lists