[PATCH 3/4] exec/address-spaces.h: Remove unuseful 'exec/memory.h' include

Philippe Mathieu-Daudé posted 4 patches 2 years, 7 months ago
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Jason Wang <jasowang@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
[PATCH 3/4] exec/address-spaces.h: Remove unuseful 'exec/memory.h' include
Posted by Philippe Mathieu-Daudé 2 years, 7 months ago
"exec/address-spaces.h" declares get_system_io() and
get_system_memory(), both returning a MemoryRegion pointer.
MemoryRegion is forward declared in "qemu/typedefs.h", so
we don't need any declaration from "exec/memory.h" here.
Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/exec/address-spaces.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/exec/address-spaces.h b/include/exec/address-spaces.h
index db8bfa9a92..0d0aa61d68 100644
--- a/include/exec/address-spaces.h
+++ b/include/exec/address-spaces.h
@@ -19,8 +19,6 @@
  * you're one of them.
  */
 
-#include "exec/memory.h"
-
 #ifndef CONFIG_USER_ONLY
 
 /* Get the root memory region.  This interface should only be used temporarily
-- 
2.38.1


Re: [PATCH 3/4] exec/address-spaces.h: Remove unuseful 'exec/memory.h' include
Posted by Richard Henderson 2 years, 7 months ago
On 6/19/23 09:41, Philippe Mathieu-Daudé wrote:
> "exec/address-spaces.h" declares get_system_io() and
> get_system_memory(), both returning a MemoryRegion pointer.
> MemoryRegion is forward declared in "qemu/typedefs.h", so
> we don't need any declaration from "exec/memory.h" here.
> Remove it.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   include/exec/address-spaces.h | 2 --
>   1 file changed, 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~