xen/arm: efi: Avoid duplicating the addition of a new bank
authorJulien Grall <julien.grall@arm.com>
Wed, 8 Mar 2017 17:54:33 +0000 (17:54 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 8 Mar 2017 18:24:00 +0000 (10:24 -0800)
commit2c277ddb77ba054bb8c4c882d98618556d334f12
treee8d6e15ed4d867f98281f1ab5dce1f9f15acfc83
parent4cb22710d42a425b811fab622ced8ec622858116
xen/arm: efi: Avoid duplicating the addition of a new bank

The code to add a new bank is duplicated twice. Add a new helper that
checks if the maximum of bank has not reached and adds the bank.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/efi/efi-boot.h