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

[Xen-changelog] [xen master] xen: arm: prefer typesafe max()/min() over MAX()/MIN()



commit 5bedebbfe47b4cf192e231c76d7f2cb9b1c198b4
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Jul 18 14:08:13 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jul 21 12:16:59 2014 +0100

    xen: arm: prefer typesafe max()/min() over MAX()/MIN()
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/arch/arm/p2m.c       |    4 ++--
 xen/common/device_tree.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 8ffddac..143199b 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -816,8 +816,8 @@ static int apply_p2m_changes(struct domain *d,
         unsigned long sgfn = paddr_to_pfn(start_gpaddr);
         unsigned long egfn = paddr_to_pfn(end_gpaddr);
 
-        p2m->max_mapped_gfn = MAX(p2m->max_mapped_gfn, egfn);
-        p2m->lowest_mapped_gfn = MIN(p2m->lowest_mapped_gfn, sgfn);
+        p2m->max_mapped_gfn = max(p2m->max_mapped_gfn, egfn);
+        p2m->lowest_mapped_gfn = min(p2m->lowest_mapped_gfn, sgfn);
     }
 
     rc = 0;
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 3d18d7f..dba2fba 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -427,7 +427,7 @@ static void __init process_chosen_node(const void *fdt, int 
node,
     mod->start = start;
     mod->size = end - start;
 
-    early_info.modules.nr_mods = MAX(MOD_INITRD, early_info.modules.nr_mods);
+    early_info.modules.nr_mods = max(MOD_INITRD, early_info.modules.nr_mods);
 }
 
 static int __init early_scan_node(const void *fdt,
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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