|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] mm: Reuse PRI_gfn macro instead of manual specify the format
Macros are defined to avoid type mismatch in format strings
but also to unify format amongst code.
In the meantime expands to 9 hexadecimal digits.
Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
---
xen/common/grant_table.c | 6 +++---
xen/include/xen/mm-frame.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index ab36f45ded..775cd7e065 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -1848,7 +1848,7 @@ gnttab_unpopulate_status_frames(struct domain *d, struct
grant_table *gt)
if ( rc )
{
gprintk(XENLOG_ERR,
- "Could not remove status frame %u (GFN %#lx) from
P2M\n",
+ "Could not remove status frame %u (GFN %"PRI_gfn")
from P2M\n",
i, gfn_x(gfn));
domain_crash(d);
return rc;
@@ -1863,7 +1863,7 @@ gnttab_unpopulate_status_frames(struct domain *d, struct
grant_table *gt)
if ( paging_mode_translate(d) )
{
gprintk(XENLOG_ERR,
- "Wrong page state %#lx of status frame %u (GFN
%#lx)\n",
+ "Wrong page state %#lx of status frame %u (GFN
%"PRI_gfn")\n",
pg->count_info, i, gfn_x(gfn));
domain_crash(d);
}
@@ -3981,7 +3981,7 @@ void grant_table_warn_active_grants(struct domain *d)
if ( nr_active <= WARN_GRANT_MAX )
printk(XENLOG_G_DEBUG "d%d has active grant %x ("
#ifndef NDEBUG
- "GFN %lx, "
+ "GFN %"PRI_gfn", "
#endif
"MFN: %#"PRI_mfn")\n",
d->domain_id, ref,
diff --git a/xen/include/xen/mm-frame.h b/xen/include/xen/mm-frame.h
index d973aec901..6f9fcc2a6a 100644
--- a/xen/include/xen/mm-frame.h
+++ b/xen/include/xen/mm-frame.h
@@ -5,7 +5,7 @@
#include <xen/typesafe.h>
TYPE_SAFE(unsigned long, mfn);
-#define PRI_mfn "05lx"
+#define PRI_mfn "09lx"
#define INVALID_MFN_RAW (~0UL)
#define INVALID_MFN _mfn(INVALID_MFN_RAW)
/*
@@ -41,7 +41,7 @@ static inline bool mfn_eq(mfn_t x, mfn_t y)
}
TYPE_SAFE(unsigned long, gfn);
-#define PRI_gfn "05lx"
+#define PRI_gfn "09lx"
#define INVALID_GFN_RAW (~0UL)
#define INVALID_GFN _gfn(INVALID_GFN_RAW)
/*
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |