Skip to contentSkip to conversation

target/tricore: Remove unused fields from CPUTriCoreState

PATCH In review Philippe Mathieu-Daudé 3 participants 3 messages Jan 18, 2023 – Jan 19, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 target/tricore: Remove unused fields from CPUTriCoreState

Remove dead code:
- unused fields in CPUTriCoreState
- (unexisting) tricore_def_t structure
- forward declaration of tricore_boot_info structure (declared in "hw/tricore/tricore.h", used once in hw/tricore/tricore_testboard.c).

---
v2: Do not remove 'hflags' in case it used:

    https://lore.kernel.org/qemu-devel/[email protected]/
---
 target/tricore/cpu.h | 9 ---------
 1 file changed, 9 deletions(-)
target/tricore/cpu.h +0 -9
index 3b9c533a7c..4f6d936824 100644
@@ -25,10 +25,6 @@
 #include "qemu/cpu-float.h"
 #include "tricore-defs.h"
 
-struct tricore_boot_info;
-
-typedef struct tricore_def_t tricore_def_t;
-
 typedef struct CPUArchState {
     /* GPR Register */
     uint32_t gpr_a[16];
@@ -180,15 +176,10 @@ typedef struct CPUArchState {
     /* Floating Point Registers */
     float_status fp_status;
     /* QEMU */
-    int error_code;
     uint32_t hflags;    /* CPU State */
 
     /* Internal CPU feature flags.  */
     uint64_t features;
-
-    const tricore_def_t *cpu_model;
-    void *irq[8];
-    struct QEMUTimer *timer; /* Internal timer */
 } CPUTriCoreState;
 
 /**
Signature · 1 line
2.38.1
#1 lore raw
Quoted 7 lines · Philippe Mathieu-Daudé

Remove dead code:
- unused fields in CPUTriCoreState
- (unexisting) tricore_def_t structure
- forward declaration of tricore_boot_info structure (declared in "hw/tricore/tricore.h", used once in hw/tricore/tricore_testboard.c).

Quoted 6 lines

---
v2: Do not remove 'hflags' in case it used:

     https://lore.kernel.org/qemu-devel/[email protected]/

No, remove it, I don't expect it would ever be used.

r~

#2 lore raw
Quoted 8 lines · Richard Henderson
Quoted 7 lines · Philippe Mathieu-Daudé

Remove dead code:
- unused fields in CPUTriCoreState
- (unexisting) tricore_def_t structure
- forward declaration of tricore_boot_info structure (declared in "hw/tricore/tricore.h", used once in hw/tricore/tricore_testboard.c).

Quoted 8 lines
Quoted 6 lines

---
v2: Do not remove 'hflags' in case it used:

     https://lore.kernel.org/qemu-devel/[email protected]/

No, remove it, I don't expect it would ever be used.

Agreed, patch v1 is fine.

Cheers,
Bastian