Skip to contentSkip to conversation

target-lm32/microblaze: Drop second CPU{LM32, MB}State typedef

PATCH Applied Andreas Färber 2 participants 2 messages Mar 15, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-lm32/microblaze: Drop second CPU{LM32, MB}State typedef

Commit 9b9a970a23625de4ae6b7461906a9a0d98d3ca95 (target-lm32/microblaze: Typedef struct CPU{MB,LM32}State) introduced necessary typedefs for cpu_mmu_index() and mmu.h respectively.

On some GCC versions this leads to "error: redefinition of typedef".

Drop the original typedef to hopefully fix the build.

---
 target-lm32/cpu.h       |    4 ++--
 target-microblaze/cpu.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
target-lm32/cpu.h +2 -2
index 0902a24..a7d9546 100644
@@ -149,7 +149,7 @@ enum {
     LM32_FLAG_IGNORE_MSB = 1,
 };
 
-typedef struct CPULM32State {
+struct CPULM32State {
     /* general registers */
     uint32_t regs[32];
 
@@ -182,7 +182,7 @@ typedef struct CPULM32State {
     uint8_t num_bps;
     uint8_t num_wps;
 
-} CPULM32State;
+};
 
 
 CPULM32State *cpu_lm32_init(const char *cpu_model);
target-microblaze/cpu.h +2 -2
index 3b52421..33b23c2 100644
@@ -230,7 +230,7 @@ typedef struct CPUMBState CPUMBState;
 #define STREAM_CONTROL   (1 << 3)
 #define STREAM_NONBLOCK  (1 << 4)
 
-typedef struct CPUMBState {
+struct CPUMBState {
     uint32_t debug;
     uint32_t btaken;
     uint32_t btarget;
@@ -264,7 +264,7 @@ typedef struct CPUMBState {
 #endif
 
     CPU_COMMON
-} CPUMBState;
+};
 
 CPUMBState *cpu_mb_init(const char *cpu_model);
 int cpu_mb_exec(CPUMBState *s);
Signature · 1 line
1.7.7
#1 lore raw
Quoted 10 lines · Andreas Färber

Commit 9b9a970a23625de4ae6b7461906a9a0d98d3ca95 (target-lm32/microblaze: Typedef struct CPU{MB,LM32}State) introduced necessary typedefs for cpu_mmu_index() and mmu.h respectively.

On some GCC versions this leads to "error: redefinition of typedef".

Drop the original typedef to hopefully fix the build.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 49 lines
---
  target-lm32/cpu.h       |    4 ++--
  target-microblaze/cpu.h |    4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)
target-lm32/cpu.h +2 -2
index 0902a24..a7d9546 100644
@@ -149,7 +149,7 @@ enum {
      LM32_FLAG_IGNORE_MSB = 1,
  };
 
-typedef struct CPULM32State {
+struct CPULM32State {
      /* general registers */
      uint32_t regs[32];
 
@@ -182,7 +182,7 @@ typedef struct CPULM32State {
      uint8_t num_bps;
      uint8_t num_wps;
 
-} CPULM32State;
+};
 
 
  CPULM32State *cpu_lm32_init(const char *cpu_model);
target-microblaze/cpu.h +2 -2
index 3b52421..33b23c2 100644
@@ -230,7 +230,7 @@ typedef struct CPUMBState CPUMBState;
  #define STREAM_CONTROL   (1<<  3)
  #define STREAM_NONBLOCK  (1<<  4)
 
-typedef struct CPUMBState {
+struct CPUMBState {
      uint32_t debug;
      uint32_t btaken;
      uint32_t btarget;
@@ -264,7 +264,7 @@ typedef struct CPUMBState {
  #endif
 
      CPU_COMMON
-} CPUMBState;
+};
 
  CPUMBState *cpu_mb_init(const char *cpu_model);
  int cpu_mb_exec(CPUMBState *s);