Skip to contentSkip to conversation

MIPS: mm: Remove dead macro definitions

PATCH In review Andreas Ruprecht 2 participants 2 messages Feb 12, 2015 – Feb 13, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: mm: Remove dead macro definitions

In commit c441d4a54c6e ("MIPS: mm: Only build one microassembler that is suitable"), the Makefile at arch/mips/mm was rewritten to only build the "right" microassembler file, depending on whether CONFIG_CPU_MICROMIPS is set or not.

In the files, however, there are still preprocessor definitions depending on CONFIG_CPU_MICROMIPS. The #ifdef around them can now never evaluate to true, so let's remove them altogether.

This inconsistency was found using the undertaker-checkpatch tool.

---
 arch/mips/mm/uasm-micromips.c | 8 --------
 arch/mips/mm/uasm-mips.c      | 8 --------
 2 files changed, 16 deletions(-)
arch/mips/mm/uasm-micromips.c +0 -8
index 8399ddf..d78178d 100644
@@ -38,14 +38,6 @@
 	 | (e) << RE_SH						\
 	 | (f) << FUNC_SH)
 
-/* Define these when we are not the ISA the kernel is being compiled with. */
-#ifndef CONFIG_CPU_MICROMIPS
-#define MM_uasm_i_b(buf, off) ISAOPC(_beq)(buf, 0, 0, off)
-#define MM_uasm_i_beqz(buf, rs, off) ISAOPC(_beq)(buf, rs, 0, off)
-#define MM_uasm_i_beqzl(buf, rs, off) ISAOPC(_beql)(buf, rs, 0, off)
-#define MM_uasm_i_bnez(buf, rs, off) ISAOPC(_bne)(buf, rs, 0, off)
-#endif
-
 #include "uasm.c"
 
 static struct insn insn_table_MM[] = {
arch/mips/mm/uasm-mips.c +0 -8
index 8e02291..fc442b2 100644
@@ -38,14 +38,6 @@
 	 | (e) << RE_SH						\
 	 | (f) << FUNC_SH)
 
-/* Define these when we are not the ISA the kernel is being compiled with. */
-#ifdef CONFIG_CPU_MICROMIPS
-#define CL_uasm_i_b(buf, off) ISAOPC(_beq)(buf, 0, 0, off)
-#define CL_uasm_i_beqz(buf, rs, off) ISAOPC(_beq)(buf, rs, 0, off)
-#define CL_uasm_i_beqzl(buf, rs, off) ISAOPC(_beql)(buf, rs, 0, off)
-#define CL_uasm_i_bnez(buf, rs, off) ISAOPC(_bne)(buf, rs, 0, off)
-#endif
-
 #include "uasm.c"
 
 static struct insn insn_table[] = {
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Andreas Ruprecht

In commit c441d4a54c6e ("MIPS: mm: Only build one microassembler that is suitable"), the Makefile at arch/mips/mm was rewritten to only build the "right" microassembler file, depending on whether CONFIG_CPU_MICROMIPS is set or not.

Quoted 8 lines

In the files, however, there are still preprocessor definitions depending on CONFIG_CPU_MICROMIPS. The #ifdef around them can now never evaluate to true, so let's remove them altogether.

This inconsistency was found using the undertaker-checkpatch tool.

---

Thanks for catching it!

Maciej