forked from luck/tmp_suning_uos_patched
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 <gustavo@embeddedor.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
df7a84a8ba
commit
2c81ee0a28
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user