]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/prom: Remove VLA in prom_check_platform_support()
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Wed, 5 Sep 2018 02:09:50 +0000 (12:09 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Sep 2018 12:08:12 +0000 (22:08 +1000)
commitd283d4c4a8ab630f03de59b5d2a69e56f57693eb
treeafa0bb1052bd21643d7f888aaf630e1c03cf1a74
parent25ca4e9d67dddedbe4b9af94787a1df062de3b6e
powerpc/prom: Remove VLA in prom_check_platform_support()

In prom_check_platform_support() we retrieve and parse the
"ibm,arch-vec-5-platform-support" property of the chosen node.
Currently we use a variable length array however to avoid this use an
array of constant length 8.

This property is used to indicate the supported options of vector 5
bytes 23-26 of the ibm,architecture.vec node. Each of these options
is a pair of bytes, thus for 4 options we have a max length of 8 bytes.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/prom_init.c