]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9a43f1983628ffa21d2279ff56ddb22901357c41
tree33f64d9bb0005c426e8e351a9671e3b455b24d40
parent3b4080a890df7fa7a2c0c961fb7304767bf4deff
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