linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, imx@lists.linux.dev,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] perf: imx9_perf: make the read-only array mask static const
Date: Wed, 11 Jun 2025 11:25:45 -0400	[thread overview]
Message-ID: <aEmf+RMzb1rZbeLn@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250611133917.170888-1-colin.i.king@gmail.com>

On Wed, Jun 11, 2025 at 02:39:17PM +0100, Colin Ian King wrote:
> Don't populate the read-only array mask on the stack at run time,
> instead make it static const.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> ---
>  drivers/perf/fsl_imx9_ddr_perf.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/perf/fsl_imx9_ddr_perf.c b/drivers/perf/fsl_imx9_ddr_perf.c
> index 843f163e6c33..267754fdf581 100644
> --- a/drivers/perf/fsl_imx9_ddr_perf.c
> +++ b/drivers/perf/fsl_imx9_ddr_perf.c
> @@ -461,9 +461,11 @@ static void imx93_ddr_perf_monitor_config(struct ddr_pmu *pmu, int event,
>  					  int counter, int axi_id, int axi_mask)
>  {
>  	u32 pmcfg1, pmcfg2;
> -	u32 mask[] = {  MX93_PMCFG1_RD_TRANS_FILT_EN,
> -			MX93_PMCFG1_WR_TRANS_FILT_EN,
> -			MX93_PMCFG1_RD_BT_FILT_EN };
> +	static const u32 mask[] = {
> +		MX93_PMCFG1_RD_TRANS_FILT_EN,
> +		MX93_PMCFG1_WR_TRANS_FILT_EN,
> +		MX93_PMCFG1_RD_BT_FILT_EN
> +	};
>
>  	pmcfg1 = readl_relaxed(pmu->base + PMCFG1);
>
> --
> 2.49.0
>

  reply	other threads:[~2025-06-11 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 13:39 [PATCH][next] perf: imx9_perf: make the read-only array mask static const Colin Ian King
2025-06-11 15:25 ` Frank Li [this message]
2025-07-04 17:44 ` Will Deacon

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=aEmf+RMzb1rZbeLn@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=colin.i.king@gmail.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).