Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c81ee0a authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Bartlomiej Zolnierkiewicz
Browse files

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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent df7a84a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;