]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: da9150-fg: remove VLA usage
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 9 Mar 2018 18:27:08 +0000 (12:27 -0600)
committerSebastian Reichel <sre@kernel.org>
Mon, 12 Mar 2018 13:34:52 +0000 (14:34 +0100)
commit34dcc7be0ca0648c9c0321cbb1c7e70521a8b902
tree84d5e02cdde80b6afa6a1f685da589e4be76230f
parentfcd50161be4fa866fc103356c96905ee9a48c8a4
power: supply: da9150-fg: remove VLA usage

In preparation to enabling -Wvla, remove VLA usage and replace it
with fixed-length arrays.

DA9150_QIF_LONG_SIZE (4 bytes) is the biggest size of an attribute which can
be accessed [1].

Fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621

[1] https://marc.info/?l=kernel-hardening&m=152059600524753&w=2

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/da9150-fg.c