arm64/smp: Drop the macro S(x,s)
authorAnshuman Khandual <anshuman.khandual@arm.com>
Mon, 9 Nov 2020 11:38:36 +0000 (17:08 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 10 Nov 2020 18:25:59 +0000 (18:25 +0000)
Mapping between IPI type index and its string is direct without requiring
an additional offset. Hence the existing macro S(x, s) is now redundant
and can just be dropped. This also makes the code clean and simple.

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/1604921916-23368-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/smp.c

index 09c96f57818c99751e91c03a0cce41b775f6c55f..65d18a618abec262486f9afe90289980356d38a3 100644 (file)
@@ -786,14 +786,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 }
 
 static const char *ipi_types[NR_IPI] __tracepoint_string = {
-#define S(x,s) [x] = s
-       S(IPI_RESCHEDULE, "Rescheduling interrupts"),
-       S(IPI_CALL_FUNC, "Function call interrupts"),
-       S(IPI_CPU_STOP, "CPU stop interrupts"),
-       S(IPI_CPU_CRASH_STOP, "CPU stop (for crash dump) interrupts"),
-       S(IPI_TIMER, "Timer broadcast interrupts"),
-       S(IPI_IRQ_WORK, "IRQ work interrupts"),
-       S(IPI_WAKEUP, "CPU wake-up interrupts"),
+       [IPI_RESCHEDULE]        = "Rescheduling interrupts",
+       [IPI_CALL_FUNC]         = "Function call interrupts",
+       [IPI_CPU_STOP]          = "CPU stop interrupts",
+       [IPI_CPU_CRASH_STOP]    = "CPU stop (for crash dump) interrupts",
+       [IPI_TIMER]             = "Timer broadcast interrupts",
+       [IPI_IRQ_WORK]          = "IRQ work interrupts",
+       [IPI_WAKEUP]            = "CPU wake-up interrupts",
 };
 
 static void smp_cross_call(const struct cpumask *target, unsigned int ipinr);