media: vidtv: make const array DURATION static
authorColin Ian King <colin.i.king@gmail.com>
Thu, 5 Jan 2023 18:33:14 +0000 (19:33 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 06:27:14 +0000 (07:27 +0100)
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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/test-drivers/vidtv/vidtv_psi.c

index a5875380ef407a07490bd30d4c0f5837bbb728cf..ce0b7a6e92dc3338e8cb824573bd692cd4bda4ef 100644 (file)
@@ -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;