[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v2 2/4] x86/mm: remove variable to avoid shadowing



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 <nicola.vetrini@xxxxxxxxxxx>
---
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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.