Skip to contentSkip to conversation

drm/sti: hdmi: make char * const array en_di static const

PATCH New Colin Ian King 1 participant 1 message Oct 24

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

PATCH 1/1 drm/sti: hdmi: make char * const array en_di static const

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

---
 drivers/gpu/drm/sti/sti_hdmi.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/sti/sti_hdmi.c +6 -4
index 7ba9e0b7ba6c..63418732daaa 100644
@@ -647,10 +647,12 @@ static void hdmi_dbg_sta(struct seq_file *s, int val)
 static void hdmi_dbg_sw_di_cfg(struct seq_file *s, int val)
 {
 	int tmp;
-	char *const en_di[] = {"no transmission",
-			       "single transmission",
-			       "once every field",
-			       "once every frame"};
+	static const char *const en_di[] = {
+		"no transmission",
+		"single transmission",
+		"once every field",
+		"once every frame"
+	};
 
 	seq_putc(s, '\t');
 	tmp = (val & HDMI_IFRAME_CFG_DI_N(HDMI_IFRAME_MASK, 1));
Signature · 1 line
2.55.0