xen/arm: gic: Remove pointless assertion against enum gic_sgi
authorJulien Grall <julien@xen.org>
Sat, 18 Jan 2020 15:39:24 +0000 (15:39 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 21 Jan 2020 21:17:52 +0000 (13:17 -0800)
commitf44a192d22a37dcb9171b95978b43637bc09718d
tree9f4b36566ca3880e986fd84ceed26e0d34fb94b3
parent88739e97351e5271ea619b5704e2e3dda4106c92
xen/arm: gic: Remove pointless assertion against enum gic_sgi

The Arm Compiler will complain that the assertions ASSERT(sgi < 16) are
always true. This is because sgi is an item of the enum gic_sgi and
should always contain less than 16 SGIs.

Rather than using ASSERTs, introduce a new item in the enum that could
be checked against a build time.

Take the opportunity to remove the specific assigned values for each
item. This is fine because enum always starts at zero and values will be
assigned by increment of one. None of our code also rely on hardcoded
value.

[stefano: grammar fixes in commit message]

Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
CC: Andrii Anisov <andrii_anisov@epam.com>
xen/arch/arm/gic.c
xen/include/asm-arm/gic.h