[kvm-unit-tests PATCH 1/4] Move INVALID_PHYS_ADDR macro to lib/libcflat.h

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

 



It probably should have been done with commit 7d764581
("Move phys_addr_t type definition to lib/libcflat.h")

Cc: Thomas Huth <thuth@xxxxxxxxxx>
Cc: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
---
 lib/alloc.h            | 2 --
 lib/libcflat.h         | 1 +
 lib/pci-host-generic.c | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/alloc.h b/lib/alloc.h
index c12bd15f7afc..81f5369c9283 100644
--- a/lib/alloc.h
+++ b/lib/alloc.h
@@ -58,8 +58,6 @@ static inline void *memalign(size_t alignment, size_t size)
 	return alloc_ops->memalign(alignment, size);
 }
 
-#define INVALID_PHYS_ADDR (~(phys_addr_t)0)
-
 /*
  * phys_alloc is a very simple allocator which allows physical memory
  * to be partitioned into regions until all memory is allocated.
diff --git a/lib/libcflat.h b/lib/libcflat.h
index c622198677c1..05481f948795 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -61,6 +61,7 @@ typedef _Bool		bool;
 #define PRIxPTR __PRIPTR_PREFIX	"x"
 
 typedef u64			phys_addr_t;
+#define INVALID_PHYS_ADDR	(~(phys_addr_t)0)
 
 extern void puts(const char *s);
 extern void exit(int code);
diff --git a/lib/pci-host-generic.c b/lib/pci-host-generic.c
index 7f72d649144e..4263365e8288 100644
--- a/lib/pci-host-generic.c
+++ b/lib/pci-host-generic.c
@@ -271,7 +271,7 @@ phys_addr_t pci_host_bridge_get_paddr(u64 pci_addr)
 		as++;
 	}
 
-	return ~0;
+	return INVALID_PHYS_ADDR;
 }
 
 static void __iomem *pci_get_dev_conf(struct pci_host_bridge *host, int devfn)
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux