Skip to contentSkip to conversation

phy: phy-mtk-dp: make array driving_params static const

PATCH Applied Colin Ian King 2 participants 2 messages Sep 29, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: phy-mtk-dp: make array driving_params static const

Don't populate the read-only array driving_params on the stack but instead make it static const. Also makes the object code a little smaller.

---
 drivers/phy/mediatek/phy-mtk-dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/mediatek/phy-mtk-dp.c +1 -1
index 31266e7ca324..232fd3f1ff1b 100644
@@ -85,7 +85,7 @@ struct mtk_dp_phy {
 static int mtk_dp_phy_init(struct phy *phy)
 {
 	struct mtk_dp_phy *dp_phy = phy_get_drvdata(phy);
-	u32 driving_params[] = {
+	static const u32 driving_params[] = {
 		DRIVING_PARAM_3_DEFAULT,
 		DRIVING_PARAM_4_DEFAULT,
 		DRIVING_PARAM_5_DEFAULT,
Signature · 1 line
2.37.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Colin Ian King

Don't populate the read-only array driving_params on the stack but instead make it static const. Also makes the object code a little smaller.

Applied, thanks

Signature · 6 lines
~Vinod

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy