x86: xen: remove the use of VLAIS
authorNick Desaulniers <nick.desaulniers@gmail.com>
Sat, 6 Jan 2018 21:39:48 +0000 (13:39 -0800)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 8 Jan 2018 14:41:32 +0000 (09:41 -0500)
commit66a640e7823da803fdb68d5d88f7a8fbd11c29e6
tree33f64d9bb0005c426e8e351a9671e3b455b24d40
parent0dd6d272d39c7c1fe2f4253197b505f2b66538ee
x86: xen: remove the use of VLAIS

Variable Length Arrays In Structs (VLAIS) is not supported by Clang, and
frowned upon by others.

https://lkml.org/lkml/2013/9/23/500

Here, the VLAIS was used because the size of the bitmap returned from
xen_mc_entry() depended on possibly (based on kernel configuration)
runtime sized data. Rather than declaring args as a VLAIS then calling
sizeof on *args, we calculate the appropriate sizeof args manually.
Further, we can get rid of the #ifdef's and rely on num_possible_cpus()
(thanks to a helpful checkpatch warning from an earlier version of this
patch).

Suggested-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/xen/mmu_pv.c