All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@redhat.com>
To: kvm@vger.kernel.org
Cc: "Alexander Gordeev" <agordeev@redhat.com>,
	"Andrew Jones" <drjones@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: [PATCH 2/9] Move phys_addr_t type definition to lib/libcflat.h
Date: Wed, 20 Apr 2016 15:18:48 +0200	[thread overview]
Message-ID: <402065c756cb125968afa0bf8614f9f50ad5f47c.1461155725.git.agordeev@redhat.com> (raw)
In-Reply-To: <cover.1461155725.git.agordeev@redhat.com>

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@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Suggested-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 arm/selftest.c          | 1 -
 lib/alloc.h             | 3 ---
 lib/arm/asm/page.h      | 2 --
 lib/arm/asm/setup.h     | 1 -
 lib/arm/setup.c         | 1 -
 lib/libcflat.h          | 3 +++
 lib/powerpc/asm/setup.h | 1 -
 7 files changed, 3 insertions(+), 9 deletions(-)

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..81f5369 100644
--- a/lib/alloc.h
+++ b/lib/alloc.h
@@ -58,9 +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)
-
 /*
  * 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/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/arm/asm/setup.h b/lib/arm/asm/setup.h
index cb8fdbd..a502a04 100644
--- a/lib/arm/asm/setup.h
+++ b/lib/arm/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 */
 #include <asm/page.h>
 #include <asm/pgtable-hwdef.h>
 
diff --git a/lib/arm/setup.c b/lib/arm/setup.c
index 8c6172f..1cba23a 100644
--- a/lib/arm/setup.c
+++ b/lib/arm/setup.c
@@ -13,7 +13,6 @@
 #include <libcflat.h>
 #include <libfdt/libfdt.h>
 #include <devicetree.h>
-#include <alloc.h>
 #include <asm/thread_info.h>
 #include <asm/setup.h>
 #include <asm/page.h>
diff --git a/lib/libcflat.h b/lib/libcflat.h
index b58a8a1..6aef14f 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -60,6 +60,9 @@ typedef _Bool		bool;
 #define PRIx64  __PRI64_PREFIX	"x"
 #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);
 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


  parent reply	other threads:[~2016-04-20 13:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 13:18 [PATCH 0/9] x86: Cleanup low-level arch code Alexander Gordeev
2016-04-20 13:18 ` [PATCH 1/9] Remove unused and unnecessary PHYS32 macro Alexander Gordeev
2016-04-20 13:54   ` Andrew Jones
2016-04-20 13:18 ` Alexander Gordeev [this message]
2016-04-20 14:02   ` [PATCH 2/9] Move phys_addr_t type definition to lib/libcflat.h Andrew Jones
2016-04-20 13:18 ` [PATCH 3/9] x86: Introduce lib/x86/asm/page.h Alexander Gordeev
2016-04-20 13:18 ` [PATCH 4/9] x86: Introduce lib/x86/asm/io.h Alexander Gordeev
2016-04-20 13:18 ` [PATCH 5/9] x86: Introduce lib/x86/asm/barrier.h Alexander Gordeev
2016-04-20 13:18 ` [PATCH 6/9] x86: Optimize virt_to_phys() and phys_to_virt() Alexander Gordeev
2016-04-20 13:18 ` [PATCH 7/9] io: Introduce generic IO accessors Alexander Gordeev
2016-04-20 14:09   ` Andrew Jones
2016-04-21  6:37     ` Alexander Gordeev
2016-04-20 13:18 ` [PATCH 8/9] io: Make ioremap() prototype conform to Linux one Alexander Gordeev
2016-04-20 14:10   ` Andrew Jones
2016-04-21  6:19     ` Alexander Gordeev
2016-04-20 13:18 ` [PATCH 9/9] io/x86: Factor out ioremap() Alexander Gordeev
2016-04-20 14:13 ` [PATCH 0/9] x86: Cleanup low-level arch code Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=402065c756cb125968afa0bf8614f9f50ad5f47c.1461155725.git.agordeev@redhat.com \
    --to=agordeev@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.