Skip to contentSkip to conversation

cpu-common.h: remove pointless ifdef guards

PATCH Applied Peter Maydell 3 participants 6 messages Jun 22, 2012 – Jul 2, 2012

lore
Share & tools
lore
#0 lore raw

cover cpu-common.h: remove pointless ifdef guards

These patches remove a couple of pointless ifdef guards in cpu-common.h that I happened to notice.

Peter Maydell (2):
cpu-common.h: Remove unnecessary guard on including targphys.h cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY

 cpu-common.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
#1 lore raw

PATCH 1/2 cpu-common.h: Remove unnecessary guard on including targphys.h

There's no need to make the include of targphys.h conditional on whether TARGET_PHYS_ADDR_BITS is defined, because targphys.h itself checks that and does nothing if it isn't.

---
 cpu-common.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
cpu-common.h +0 -2
index 1fe3280..321037f 100644
@@ -3,9 +3,7 @@
 
 /* CPU interfaces that are target independent.  */
 
-#ifdef TARGET_PHYS_ADDR_BITS
 #include "targphys.h"
-#endif
 
 #ifndef NEED_CPU_H
 #include "poison.h"
Signature · 1 line
1.7.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] cpu-common.h: Remove unnecessary guard on including targphys.h

Am 22.06.2012 13:30, schrieb Peter Maydell:

Quoted 5 lines

There's no need to make the include of targphys.h conditional on whether TARGET_PHYS_ADDR_BITS is defined, because targphys.h itself checks that and does nothing if it isn't.

/-F

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#3 lore raw

PATCH 2/2 cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY

In reply to Peter Maydell

Remove an ifndef CONFIG_USER_ONLY guard that was pointless because it is already inside an if !defined(CONFIG_USER_ONLY).

---
 cpu-common.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
cpu-common.h +0 -2
index 321037f..85548de 100644
@@ -69,9 +69,7 @@ void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,
 void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque));
 void cpu_unregister_map_client(void *cookie);
 
-#ifndef CONFIG_USER_ONLY
 bool cpu_physical_memory_is_io(target_phys_addr_t phys_addr);
-#endif
 
 /* Coalesced MMIO regions are areas where write operations can be reordered.
  * This usually implies that write operations are side-effect free.  This allows
Signature · 1 line
1.7.1
Acked-by on v1 2/2
#4 lore raw

Re: [Qemu-devel] [PATCH 2/2] cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY

Am 22.06.2012 13:30, schrieb Peter Maydell:

Quoted 13 lines

Remove an ifndef CONFIG_USER_ONLY guard that was pointless because it is already inside an if !defined(CONFIG_USER_ONLY).

---
 cpu-common.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
cpu-common.h +0 -0
index 321037f..85548de 100644

cpu-common.h void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len, · line 75

Quoted 9 lines
cpu-common.h +0 -2
@@ -69,9 +69,7 @@ void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,
 void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque));
 void cpu_unregister_map_client(void *cookie);
 
-#ifndef CONFIG_USER_ONLY
 bool cpu_physical_memory_is_io(target_phys_addr_t phys_addr);
-#endif
 
 /* Coalesced MMIO regions are areas where write operations can be reordered.
  * This usually implies that write operations are side-effect free.  This allows

Spotted that yesterday myself and was planning to send a patch. :)

Thanks,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#5 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell

These patches remove a couple of pointless ifdef guards in cpu-common.h that I happened to notice.

Peter Maydell (2):
cpu-common.h: Remove unnecessary guard on including targphys.h cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY

 cpu-common.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan