[Xen-devel] [PATCH 02/14] xen/x86: Constify the parameter "d" in mfn_to_gfn

Julien Grall posted 14 patches 18 weeks ago

[Xen-devel] [PATCH 02/14] xen/x86: Constify the parameter "d" in mfn_to_gfn

Posted by Julien Grall 18 weeks ago
The parameter "d" holds the domain and is not modified by the function.
So constify it.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>

---
    Changes in v2:
        - Fix function name in the title
        - Add Jan's reviewed-by
---
 xen/include/asm-x86/p2m.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index 2801a8ccca..c3bd12020e 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -506,7 +506,7 @@ static inline struct page_info *get_page_from_gfn(
 }
 
 /* General conversion function from mfn to gfn */
-static inline unsigned long mfn_to_gfn(struct domain *d, mfn_t mfn)
+static inline unsigned long mfn_to_gfn(const struct domain *d, mfn_t mfn)
 {
     if ( paging_mode_translate(d) )
         return get_gpfn_from_mfn(mfn_x(mfn));
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel