x86/shadow: adjust 2-level case of SHADOW_FOREACH_L2E()
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Oct 2021 11:43:35 +0000 (13:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Oct 2021 11:43:35 +0000 (13:43 +0200)
commitf791392f82ffe39cc1ea4c4db1d877223754a04a
tree68696ccdcf0d8e6912d6e42cebc585f79957252c
parent9f4f20b27b0733e9b792e3cd2ad996febdea46ba
x86/shadow: adjust 2-level case of SHADOW_FOREACH_L2E()

Coverity apparently takes issue with the assignment inside an if(), but
then only in two of the cases (sh_destroy_l2_shadow() and
sh_unhook_32b_mappings()). As it's pretty simple to break out of the
outer loop without the need for a local helper variable, adjust the code
that way.

While there, with the other "unused value" reports also in mind, further
drop a dead assignment from SHADOW_FOREACH_L1E().

Coverity-ID: 1492857
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/shadow/multi.c