mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: change parameter names in replace_grant_host_mapping().
In the current version of replace_grant_host_mapping() function, the declaration (correctly) uses the parameter names 'gpaddr' and 'new_gpaddr', while the definition uses the parameter names 'addr' and 'new_addr'. Change the parameter names of the definition to 'gpaddr' and 'new_gpaddr' so that it is clear what type of address is expected and violations of MISRA C:2012 Rule 8.3 are fixed. In both declaration and definition of function replace_grant_host_mapping() change the parameter name 'mfn' to 'frame', thus improving readability and keeping consistency with name used in create_grant_host_mapping(). Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> Reviewed-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
06ed62d1f3
commit
5b9c96a808
2 files changed
+6
-6
No files matched your search
@@ -38,7 +38,7 @@ static inline bool gnttab_release_host_mappings(const struct domain *d)
|
|||||||
|
|
||||||
int create_grant_host_mapping(unsigned long gpaddr, mfn_t frame,
|
int create_grant_host_mapping(unsigned long gpaddr, mfn_t frame,
|
||||||
unsigned int flags, unsigned int cache_flags);
|
unsigned int flags, unsigned int cache_flags);
|
||||||
int replace_grant_host_mapping(unsigned long gpaddr, mfn_t mfn,
|
int replace_grant_host_mapping(unsigned long gpaddr, mfn_t frame,
|
||||||
unsigned long new_gpaddr, unsigned int flags);
|
unsigned long new_gpaddr, unsigned int flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+5
-5
@@ -1600,17 +1600,17 @@ int create_grant_host_mapping(unsigned long gpaddr, mfn_t frame,
|
|||||||
return GNTST_okay;
|
return GNTST_okay;
|
||||||
}
|
}
|
||||||
|
|
||||||
int replace_grant_host_mapping(unsigned long addr, mfn_t mfn,
|
int replace_grant_host_mapping(unsigned long gpaddr, mfn_t frame,
|
||||||
unsigned long new_addr, unsigned int flags)
|
unsigned long new_gpaddr, unsigned int flags)
|
||||||
{
|
{
|
||||||
gfn_t gfn = gaddr_to_gfn(addr);
|
gfn_t gfn = gaddr_to_gfn(gpaddr);
|
||||||
struct domain *d = current->domain;
|
struct domain *d = current->domain;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if ( new_addr != 0 || (flags & GNTMAP_contains_pte) )
|
if ( new_gpaddr != 0 || (flags & GNTMAP_contains_pte) )
|
||||||
return GNTST_general_error;
|
return GNTST_general_error;
|
||||||
|
|
||||||
rc = guest_physmap_remove_page(d, gfn, mfn, 0);
|
rc = guest_physmap_remove_page(d, gfn, frame, 0);
|
||||||
|
|
||||||
return rc ? GNTST_general_error : GNTST_okay;
|
return rc ? GNTST_general_error : GNTST_okay;
|
||||||
}
|
}
|
||||||
|
|||||||