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)
commitab91239942a900e209f724886273060d9288f6fb
treeafa0bb1052bd21643d7f888aaf630e1c03cf1a74
parente00d93ac9a189673028ac125a74b9bc8ae73eebc
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