Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH] arm64/smp: Drop the macro S(x,s)
Date: Mon, 9 Nov 2020 11:48:25 +0000	[thread overview]
Message-ID: <20201109114825.GA64518@C02TD0UTHF1T.local> (raw)
In-Reply-To: <1604921916-23368-1-git-send-email-anshuman.khandual@arm.com>

On Mon, Nov 09, 2020 at 05:08:36PM +0530, Anshuman Khandual wrote:
> 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.
> 
> Cc: Catalin Marinas <catalin.marinas@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
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Nice cleanup!

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/kernel/smp.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 09c96f57818c..65d18a618abe 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -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);
> -- 
> 2.20.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-09 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 11:38 [PATCH] arm64/smp: Drop the macro S(x,s) Anshuman Khandual
2020-11-09 11:48 ` Mark Rutland [this message]
2020-11-10 19:17 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201109114825.GA64518@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox