diff mbox series

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

Message ID 20220929130147.97375-1-colin.i.king@gmail.com (mailing list archive)
State New, archived
Headers show
Series phy: phy-mtk-dp: make array driving_params static const | expand

Commit Message

Colin Ian King Sept. 29, 2022, 1:01 p.m. UTC
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.

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

Comments

Vinod Koul Sept. 29, 2022, 3:31 p.m. UTC | #1
On 29-09-22, 14:01, Colin Ian King wrote:
> 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
diff mbox series

Patch

diff --git a/drivers/phy/mediatek/phy-mtk-dp.c b/drivers/phy/mediatek/phy-mtk-dp.c
index 31266e7ca324..232fd3f1ff1b 100644
--- a/drivers/phy/mediatek/phy-mtk-dp.c
+++ b/drivers/phy/mediatek/phy-mtk-dp.c
@@ -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,