diff mbox series

riscv: Remove duplicated GET_RM

Message ID 20240909095557.446745-1-zhangchunyan@iscas.ac.cn (mailing list archive)
State Accepted
Commit 4c6b61b5d35e831e768ebcd209048cafb4528034
Headers show
Series riscv: Remove duplicated GET_RM | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/vmtest-fixes-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 125.45s
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1273.71s
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1554.50s
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 20.53s
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 22.28s
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.39s
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 43.34s
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.00s
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.61s
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.03s

Commit Message

Chunyan Zhang Sept. 9, 2024, 9:55 a.m. UTC
The macro GET_RM defined twice in this file, one can be removed.

Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
---
 arch/riscv/kernel/traps_misaligned.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Alexandre Ghiti Sept. 9, 2024, 10:10 a.m. UTC | #1
Hi Chunyan,

On 09/09/2024 11:55, Chunyan Zhang wrote:
> The macro GET_RM defined twice in this file, one can be removed.
>
> Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
> ---
>   arch/riscv/kernel/traps_misaligned.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c
> index b62d5a2f4541..2a9b72dcd648 100644
> --- a/arch/riscv/kernel/traps_misaligned.c
> +++ b/arch/riscv/kernel/traps_misaligned.c
> @@ -136,8 +136,6 @@
>   #define REG_PTR(insn, pos, regs)	\
>   	(ulong *)((ulong)(regs) + REG_OFFSET(insn, pos))
>   
> -#define GET_RM(insn)			(((insn) >> 12) & 7)
> -
>   #define GET_RS1(insn, regs)		(*REG_PTR(insn, SH_RS1, regs))
>   #define GET_RS2(insn, regs)		(*REG_PTR(insn, SH_RS2, regs))
>   #define GET_RS1S(insn, regs)		(*REG_PTR(RVC_RS1S(insn), 0, regs))


Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex
patchwork-bot+linux-riscv@kernel.org Oct. 24, 2024, 6:10 p.m. UTC | #2
Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Mon,  9 Sep 2024 17:55:57 +0800 you wrote:
> The macro GET_RM defined twice in this file, one can be removed.
> 
> Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
> ---
>  arch/riscv/kernel/traps_misaligned.c | 2 --
>  1 file changed, 2 deletions(-)

Here is the summary with links:
  - riscv: Remove duplicated GET_RM
    https://git.kernel.org/riscv/c/4c6b61b5d35e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c
index b62d5a2f4541..2a9b72dcd648 100644
--- a/arch/riscv/kernel/traps_misaligned.c
+++ b/arch/riscv/kernel/traps_misaligned.c
@@ -136,8 +136,6 @@ 
 #define REG_PTR(insn, pos, regs)	\
 	(ulong *)((ulong)(regs) + REG_OFFSET(insn, pos))
 
-#define GET_RM(insn)			(((insn) >> 12) & 7)
-
 #define GET_RS1(insn, regs)		(*REG_PTR(insn, SH_RS1, regs))
 #define GET_RS2(insn, regs)		(*REG_PTR(insn, SH_RS2, regs))
 #define GET_RS1S(insn, regs)		(*REG_PTR(RVC_RS1S(insn), 0, regs))