Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH][next] scsi: ufs: host: mediatek: make read-only array scale_us static const
@ 2025-12-19 21:44 Colin Ian King
  2025-12-22  8:13 ` Peter Wang (王信友)
  2026-01-04 21:42 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2025-12-19 21:44 UTC (permalink / raw)
  To: Peter Wang, Chaotian Jing, Stanley Jhu, James E . J . Bottomley,
	Martin K . Petersen, Matthias Brugger, AngeloGioacchino Del Regno,
	linux-scsi, linux-mediatek, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

Don't populate the read-only array scale_us on the stack at run time,
instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/ufs/host/ufs-mediatek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index ecbbf52bf734..66b11cc0703b 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1112,7 +1112,7 @@ static void ufs_mtk_setup_clk_gating(struct ufs_hba *hba)
 	unsigned long flags;
 	u32 ah_ms = 10;
 	u32 ah_scale, ah_timer;
-	u32 scale_us[] = {1, 10, 100, 1000, 10000, 100000};
+	static const u32 scale_us[] = {1, 10, 100, 1000, 10000, 100000};
 
 	if (ufshcd_is_clkgating_allowed(hba)) {
 		if (ufshcd_is_auto_hibern8_supported(hba) && hba->ahit) {
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-04 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-19 21:44 [PATCH][next] scsi: ufs: host: mediatek: make read-only array scale_us static const Colin Ian King
2025-12-22  8:13 ` Peter Wang (王信友)
2026-01-04 21:42 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox