Skip to contentSkip to conversation

media: vidtv: make const array DURATION static

PATCH New Colin Ian King 1 participant 1 message Jan 5, 2023

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

PATCH 1/1 media: vidtv: make const array DURATION static

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

---
 drivers/media/test-drivers/vidtv/vidtv_psi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/test-drivers/vidtv/vidtv_psi.c +1 -1
index a5875380ef40..ce0b7a6e92dc 100644
@@ -1940,7 +1940,7 @@ u32 vidtv_psi_eit_write_into(struct vidtv_psi_eit_write_args *args)
 struct vidtv_psi_table_eit_event
 *vidtv_psi_eit_event_init(struct vidtv_psi_table_eit_event *head, u16 event_id)
 {
-	const u8 DURATION[] = {0x23, 0x59, 0x59}; /* BCD encoded */
+	static const u8 DURATION[] = {0x23, 0x59, 0x59}; /* BCD encoded */
 	struct vidtv_psi_table_eit_event *e;
 	struct timespec64 ts;
 	struct tm time;
Signature · 1 line
2.30.2