The local variable 'p2mt' shadows a declaration of the same variable
in the enclosing scope, but removing the inner declaration
does not alter the semantics ('p2mt' is an output for the get_gfn
call later on) and this resolves a violation of
MISRA C:2012 Rule 5.3.Both variables were last introduced by commit d4f699a0df6cea907c1de5c277500b98c0729685. No functional changes. Signed-off-by: Nicola Vetrini <[email protected]> --- Change in v2: - removed the innermost p2mt instead of renaming it. --- xen/arch/x86/mm/p2m.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 714358f953..f6df35767a 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -2439,8 +2439,6 @@ int xenmem_add_to_physmap_one( case XENMAPSPACE_gmfn: { - p2m_type_t p2mt; - gfn = idx; mfn = get_gfn_unshare(d, gfn, &p2mt); /* If the page is still shared, exit early */ -- 2.34.1
