From 2c81ee0a28c085582a84f3822e8a22e028a909d0 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 12 Mar 2018 17:06:55 +0100 Subject: video: fbdev: via: remove VLA usage In preparation to enabling -Wvla, remove VLA usage. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Eric Engestrom Reviewed-by: Emil Velikov Cc: Florian Tobias Schandinat Cc: Kees Cook Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/via/via_aux_sii164.c | 2 +- drivers/video/fbdev/via/via_aux_vt1631.c | 2 +- drivers/video/fbdev/via/via_aux_vt1632.c | 2 +- drivers/video/fbdev/via/via_aux_vt1636.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/via/via_aux_sii164.c b/drivers/video/fbdev/via/via_aux_sii164.c index ca1b35f033b1..c27f62c2c75a 100644 --- a/drivers/video/fbdev/via/via_aux_sii164.c +++ b/drivers/video/fbdev/via/via_aux_sii164.c @@ -36,7 +36,7 @@ static void probe(struct via_aux_bus *bus, u8 addr) .name = name}; /* check vendor id and device id */ const u8 id[] = {0x01, 0x00, 0x06, 0x00}, len = ARRAY_SIZE(id); - u8 tmp[len]; + u8 tmp[ARRAY_SIZE(id)]; if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) return; diff --git a/drivers/video/fbdev/via/via_aux_vt1631.c b/drivers/video/fbdev/via/via_aux_vt1631.c index 06e742f1f723..32978a0ccfd7 100644 --- a/drivers/video/fbdev/via/via_aux_vt1631.c +++ b/drivers/video/fbdev/via/via_aux_vt1631.c @@ -36,7 +36,7 @@ void via_aux_vt1631_probe(struct via_aux_bus *bus) .name = name}; /* check vendor id and device id */ const u8 id[] = {0x06, 0x11, 0x91, 0x31}, len = ARRAY_SIZE(id); - u8 tmp[len]; + u8 tmp[ARRAY_SIZE(id)]; if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) return; diff --git a/drivers/video/fbdev/via/via_aux_vt1632.c b/drivers/video/fbdev/via/via_aux_vt1632.c index d24f4cd97401..cec8cc43d524 100644 --- a/drivers/video/fbdev/via/via_aux_vt1632.c +++ b/drivers/video/fbdev/via/via_aux_vt1632.c @@ -36,7 +36,7 @@ static void probe(struct via_aux_bus *bus, u8 addr) .name = name}; /* check vendor id and device id */ const u8 id[] = {0x06, 0x11, 0x92, 0x31}, len = ARRAY_SIZE(id); - u8 tmp[len]; + u8 tmp[ARRAY_SIZE(id)]; if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) return; diff --git a/drivers/video/fbdev/via/via_aux_vt1636.c b/drivers/video/fbdev/via/via_aux_vt1636.c index 9e015c101d4d..2b10bc21ab79 100644 --- a/drivers/video/fbdev/via/via_aux_vt1636.c +++ b/drivers/video/fbdev/via/via_aux_vt1636.c @@ -36,7 +36,7 @@ void via_aux_vt1636_probe(struct via_aux_bus *bus) .name = name}; /* check vendor id and device id */ const u8 id[] = {0x06, 0x11, 0x45, 0x33}, len = ARRAY_SIZE(id); - u8 tmp[len]; + u8 tmp[ARRAY_SIZE(id)]; if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len)) return; -- cgit v1.2.3