2023-08-22 11:34:09

by Tiezhu Yang

[permalink] [raw]
Subject: [PATCH v4 0/3] Modify die() for LoongArch

v4:
-- Return earlier in die() if notify_die() returns NOTIFY_STOP
-- Update the patch titles and commit messages.

v3:
-- Make each patch can be built without errors and warnings.

v2:
-- Update the commit message to give more detailed info, split into
two individual patches, suggested by Maciej, thank you.

Tiezhu Yang (3):
LoongArch: Do not kill the task in die() if notify_die() returns
NOTIFY_STOP
LoongArch: Return earlier in die() if notify_die() returns NOTIFY_STOP
LoongArch: Add identifier names to arguments of die() declaration

arch/loongarch/include/asm/ptrace.h | 2 +-
arch/loongarch/kernel/traps.c | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)

--
2.1.0



2023-08-22 14:23:09

by Tiezhu Yang

[permalink] [raw]
Subject: [PATCH v4 3/3] LoongArch: Add identifier names to arguments of die() declaration

Add identifier names to arguments of die() declaration in ptrace.h
to fix the following checkpatch warnings:

WARNING: function definition argument 'const char *' should also have an identifier name
WARNING: function definition argument 'struct pt_regs *' should also have an identifier name

Signed-off-by: Tiezhu Yang <[email protected]>
---
arch/loongarch/include/asm/ptrace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/loongarch/include/asm/ptrace.h b/arch/loongarch/include/asm/ptrace.h
index 164bc90..f3ddaed 100644
--- a/arch/loongarch/include/asm/ptrace.h
+++ b/arch/loongarch/include/asm/ptrace.h
@@ -162,7 +162,7 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long val
#define instruction_pointer(regs) ((regs)->csr_era)
#define profile_pc(regs) instruction_pointer(regs)

-extern void die(const char *, struct pt_regs *);
+extern void die(const char *str, struct pt_regs *regs);

static inline void die_if_kernel(const char *str, struct pt_regs *regs)
{
--
2.1.0