Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf: imx9_perf: make the read-only array mask static const

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>
Link: https://lore.kernel.org/r/20250611133917.170888-1-colin.i.king@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Colin Ian King and committed by
Will Deacon
b6e37b27 8b177e9a

+5 -3
+5 -3
drivers/perf/fsl_imx9_ddr_perf.c
··· 461 461 int counter, int axi_id, int axi_mask) 462 462 { 463 463 u32 pmcfg1, pmcfg2; 464 - u32 mask[] = { MX93_PMCFG1_RD_TRANS_FILT_EN, 465 - MX93_PMCFG1_WR_TRANS_FILT_EN, 466 - MX93_PMCFG1_RD_BT_FILT_EN }; 464 + static const u32 mask[] = { 465 + MX93_PMCFG1_RD_TRANS_FILT_EN, 466 + MX93_PMCFG1_WR_TRANS_FILT_EN, 467 + MX93_PMCFG1_RD_BT_FILT_EN 468 + }; 467 469 468 470 pmcfg1 = readl_relaxed(pmu->base + PMCFG1); 469 471