Re: [kvm-unit-tests PATCH v4 02/12] Move phys_addr_t type definition to lib/libcflat.h

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

 



On Mon, May 02, 2016 at 03:59:22PM +0200, Alexander Gordeev wrote:
> This change leads to removing '#include <alloc.h>'s from
> several places that only included alloc.h to get the typedef.
> 
> Cc: Andrew Jones <drjones@xxxxxxxxxx>
> Cc: Thomas Huth <thuth@xxxxxxxxxx>
> Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx>
> Suggested-by: Andrew Jones <drjones@xxxxxxxxxx>
> Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
> ---
>  arm/selftest.c          | 1 -
>  lib/alloc.h             | 1 -
>  lib/arm/asm/page.h      | 2 --
>  lib/libcflat.h          | 2 ++
>  lib/powerpc/asm/setup.h | 1 -
>  5 files changed, 2 insertions(+), 5 deletions(-)

Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>

> 
> diff --git a/arm/selftest.c b/arm/selftest.c
> index 75dc91f..a8ae191 100644
> --- a/arm/selftest.c
> +++ b/arm/selftest.c
> @@ -7,7 +7,6 @@
>   */
>  #include <libcflat.h>
>  #include <util.h>
> -#include <alloc.h>
>  #include <devicetree.h>
>  #include <asm/setup.h>
>  #include <asm/ptrace.h>
> diff --git a/lib/alloc.h b/lib/alloc.h
> index 0b4b4bd..c12bd15 100644
> --- a/lib/alloc.h
> +++ b/lib/alloc.h
> @@ -58,7 +58,6 @@ static inline void *memalign(size_t alignment, size_t size)
>  	return alloc_ops->memalign(alignment, size);
>  }
>  
> -typedef u64 phys_addr_t;
>  #define INVALID_PHYS_ADDR (~(phys_addr_t)0)
>  
>  /*
> diff --git a/lib/arm/asm/page.h b/lib/arm/asm/page.h
> index df76969..3802641 100644
> --- a/lib/arm/asm/page.h
> +++ b/lib/arm/asm/page.h
> @@ -16,8 +16,6 @@
>  
>  #define PAGE_ALIGN(addr)	ALIGN(addr, PAGE_SIZE)
>  
> -#include <alloc.h>
> -
>  typedef u64 pteval_t;
>  typedef u64 pmdval_t;
>  typedef u64 pgdval_t;
> diff --git a/lib/libcflat.h b/lib/libcflat.h
> index b58a8a1..f2ec33f 100644
> --- a/lib/libcflat.h
> +++ b/lib/libcflat.h
> @@ -60,6 +60,8 @@ typedef _Bool		bool;
>  #define PRIx64  __PRI64_PREFIX	"x"
>  #define PRIxPTR __PRIPTR_PREFIX	"x"
>  
> +typedef u64			phys_addr_t;
> +
>  extern void puts(const char *s);
>  extern void exit(int code);
>  extern void abort(void);
> diff --git a/lib/powerpc/asm/setup.h b/lib/powerpc/asm/setup.h
> index 29a6d7d..b1e1e5a 100644
> --- a/lib/powerpc/asm/setup.h
> +++ b/lib/powerpc/asm/setup.h
> @@ -6,7 +6,6 @@
>   * This work is licensed under the terms of the GNU LGPL, version 2.
>   */
>  #include <libcflat.h>
> -#include <alloc.h>	/* phys_addr_t */
>  
>  #define NR_CPUS			8	/* arbitrarily set for now */
>  extern u32 cpus[NR_CPUS];
> -- 
> 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