qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Remove some unused structures
@ 2024-05-05 17:14 Dr. David Alan Gilbert
  2024-05-05 17:14 ` [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame' Dr. David Alan Gilbert
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

A bunch of structs that are currently unused,
found with a simple script and a bit of eyeballing.

The only one I'm that suspicious of is the SPARC
one, where the patch which removed the use is a bit
confusing to me.

Tested with a 
  --target-list=ppc-softmmu,m68k-softmmu,x86_64-softmmu,arm-softmmu,aarch64-softmmu,cris-linux-user,i386-linux-user,sparc-linux-user
and 'make check' on x86 linux.

Dave

Dr. David Alan Gilbert (7):
  linux-user: cris: Remove unused struct 'rt_signal_frame'
  linux-user: i386/signal: Remove unused fp structs
  linux-user: sparc: Remove unused struct 'target_mc_fq'
  hw/usb/dev-network: Remove unused struct 'rndis_config_parameter'
  hw/arm/bcm2836: Remove unusued struct 'BCM283XClass'
  target/ppc: Remove unused struct 'mmu_ctx_hash32'
  net/can: Remove unused struct 'CanBusState'

 hw/arm/bcm2836.c          | 12 ------------
 hw/usb/dev-network.c      |  8 --------
 linux-user/cris/signal.c  |  8 --------
 linux-user/i386/signal.c  | 10 ----------
 linux-user/sparc/signal.c |  5 -----
 net/can/can_host.c        |  6 ------
 target/ppc/mmu-hash32.c   |  6 ------
 7 files changed, 55 deletions(-)

-- 
2.45.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame'
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-05 17:33   ` Richard Henderson
  2024-05-05 17:14 ` [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs Dr. David Alan Gilbert
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

Since 'setup_rt_frame' has never been implemented, this struct
is unused.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 linux-user/cris/signal.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/linux-user/cris/signal.c b/linux-user/cris/signal.c
index 4f532b2903..10948bcf30 100644
--- a/linux-user/cris/signal.c
+++ b/linux-user/cris/signal.c
@@ -35,14 +35,6 @@ struct target_signal_frame {
     uint16_t retcode[4];      /* Trampoline code. */
 };
 
-struct rt_signal_frame {
-    siginfo_t *pinfo;
-    void *puc;
-    siginfo_t info;
-    ucontext_t uc;
-    uint16_t retcode[4];      /* Trampoline code. */
-};
-
 static void setup_sigcontext(struct target_sigcontext *sc, CPUCRISState *env)
 {
     __put_user(env->regs[0], &sc->regs.r0);
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
  2024-05-05 17:14 ` [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame' Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-05 17:35   ` Richard Henderson
  2024-05-05 17:14 ` [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq' Dr. David Alan Gilbert
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

The structs 'target_fpxreg' and 'target_xmmreg' are unused since
Paolo's:

Commit 2796f290b546 ("linux-user: i386/signal: support FXSAVE fpstate on
32-bit emulation")

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 linux-user/i386/signal.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
index 990048f42a..9bf602b388 100644
--- a/linux-user/i386/signal.c
+++ b/linux-user/i386/signal.c
@@ -34,16 +34,6 @@ struct target_fpreg {
     uint16_t exponent;
 };
 
-struct target_fpxreg {
-    uint16_t significand[4];
-    uint16_t exponent;
-    uint16_t padding[3];
-};
-
-struct target_xmmreg {
-    uint32_t element[4];
-};
-
 struct target_fpx_sw_bytes {
     uint32_t magic1;
     uint32_t extended_size;
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq'
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
  2024-05-05 17:14 ` [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame' Dr. David Alan Gilbert
  2024-05-05 17:14 ` [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-20 13:22   ` Dr. David Alan Gilbert
  2024-05-05 17:14 ` [PATCH 4/7] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter' Dr. David Alan Gilbert
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

This struct is unused since Peter's
Commit b8ae597f0e6d ("linux-user/sparc: Fix errors in target_ucontext
structures")

However, hmm, I'm a bit confused since that commit modifies the
structure and then removes it, was that intentional?

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 linux-user/sparc/signal.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
index f164b74032..8181b8b92c 100644
--- a/linux-user/sparc/signal.c
+++ b/linux-user/sparc/signal.c
@@ -546,11 +546,6 @@ void setup_sigtramp(abi_ulong sigtramp_page)
 typedef abi_ulong target_mc_greg_t;
 typedef target_mc_greg_t target_mc_gregset_t[SPARC_MC_NGREG];
 
-struct target_mc_fq {
-    abi_ulong mcfq_addr;
-    uint32_t mcfq_insn;
-};
-
 /*
  * Note the manual 16-alignment; the kernel gets this because it
  * includes a "long double qregs[16]" in the mcpu_fregs union,
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/7] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter'
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
                   ` (2 preceding siblings ...)
  2024-05-05 17:14 ` [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq' Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-06  7:37   ` Philippe Mathieu-Daudé
  2024-05-05 17:14 ` [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass' Dr. David Alan Gilbert
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

As far as I can tell it was never used.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 hw/usb/dev-network.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index 2c33e36cad..d00d68b21d 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -475,14 +475,6 @@ struct rndis_packet_msg_type {
     le32 Reserved;
 };
 
-struct rndis_config_parameter {
-    le32 ParameterNameOffset;
-    le32 ParameterNameLength;
-    le32 ParameterType;
-    le32 ParameterValueOffset;
-    le32 ParameterValueLength;
-};
-
 /* implementation specific */
 enum rndis_state
 {
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass'
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
                   ` (3 preceding siblings ...)
  2024-05-05 17:14 ` [PATCH 4/7] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter' Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-06  7:40   ` Philippe Mathieu-Daudé
  2024-05-05 17:14 ` [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32' Dr. David Alan Gilbert
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

This struct has been unused since
Commit f932093ae165 ("hw/arm/bcm2836: Split out common part of BCM283X
classes")

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 hw/arm/bcm2836.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index db191661f2..40a379bc36 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -18,18 +18,6 @@
 #include "target/arm/cpu-qom.h"
 #include "target/arm/gtimer.h"
 
-struct BCM283XClass {
-    /*< private >*/
-    DeviceClass parent_class;
-    /*< public >*/
-    const char *name;
-    const char *cpu_type;
-    unsigned core_count;
-    hwaddr peri_base; /* Peripheral base address seen by the CPU */
-    hwaddr ctrl_base; /* Interrupt controller and mailboxes etc. */
-    int clusterid;
-};
-
 static Property bcm2836_enabled_cores_property =
     DEFINE_PROP_UINT32("enabled-cpus", BCM283XBaseState, enabled_cpus, 0);
 
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32'
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
                   ` (4 preceding siblings ...)
  2024-05-05 17:14 ` [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass' Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-05 18:52   ` BALATON Zoltan
  2024-05-05 17:14 ` [PATCH 7/7] net/can: Remove unused struct 'CanBusState' Dr. David Alan Gilbert
  2024-06-07 14:04 ` [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

I think it's use was removed by
Commit 5883d8b296 ("mmu-hash*: Don't use full ppc_hash{32,
64}_translate() path for get_phys_page_debug()")

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 target/ppc/mmu-hash32.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
index 3976416840..746321329c 100644
--- a/target/ppc/mmu-hash32.c
+++ b/target/ppc/mmu-hash32.c
@@ -36,12 +36,6 @@
 #  define LOG_BATS(...) do { } while (0)
 #endif
 
-struct mmu_ctx_hash32 {
-    hwaddr raddr;      /* Real address              */
-    int prot;                      /* Protection bits           */
-    int key;                       /* Access key                */
-};
-
 static int ppc_hash32_pp_prot(int key, int pp, int nx)
 {
     int prot;
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 7/7] net/can: Remove unused struct 'CanBusState'
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
                   ` (5 preceding siblings ...)
  2024-05-05 17:14 ` [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32' Dr. David Alan Gilbert
@ 2024-05-05 17:14 ` Dr. David Alan Gilbert
  2024-05-06  7:43   ` Philippe Mathieu-Daudé
  2024-06-07 14:04 ` [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 17:14 UTC (permalink / raw)
  To: peter.maydell, laurent; +Cc: qemu-devel, Dr. David Alan Gilbert

As far as I can tell this struct has never been used in this
file (it is used in can_core.c).

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 net/can/can_host.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net/can/can_host.c b/net/can/can_host.c
index a3c84028c6..b2fe553f91 100644
--- a/net/can/can_host.c
+++ b/net/can/can_host.c
@@ -34,12 +34,6 @@
 #include "net/can_emu.h"
 #include "net/can_host.h"
 
-struct CanBusState {
-    Object object;
-
-    QTAILQ_HEAD(, CanBusClientState) clients;
-};
-
 static void can_host_disconnect(CanHostState *ch)
 {
     CanHostClass *chc = CAN_HOST_GET_CLASS(ch);
-- 
2.45.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame'
  2024-05-05 17:14 ` [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame' Dr. David Alan Gilbert
@ 2024-05-05 17:33   ` Richard Henderson
  0 siblings, 0 replies; 20+ messages in thread
From: Richard Henderson @ 2024-05-05 17:33 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, peter.maydell, laurent; +Cc: qemu-devel

On 5/5/24 10:14, Dr. David Alan Gilbert wrote:
> Since 'setup_rt_frame' has never been implemented, this struct
> is unused.
> 
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   linux-user/cris/signal.c | 8 --------
>   1 file changed, 8 deletions(-)

Cris is scheduled for removal in 9.2.
We could ignore this until then.

But either way,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> diff --git a/linux-user/cris/signal.c b/linux-user/cris/signal.c
> index 4f532b2903..10948bcf30 100644
> --- a/linux-user/cris/signal.c
> +++ b/linux-user/cris/signal.c
> @@ -35,14 +35,6 @@ struct target_signal_frame {
>       uint16_t retcode[4];      /* Trampoline code. */
>   };
>   
> -struct rt_signal_frame {
> -    siginfo_t *pinfo;
> -    void *puc;
> -    siginfo_t info;
> -    ucontext_t uc;
> -    uint16_t retcode[4];      /* Trampoline code. */
> -};
> -
>   static void setup_sigcontext(struct target_sigcontext *sc, CPUCRISState *env)
>   {
>       __put_user(env->regs[0], &sc->regs.r0);



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs
  2024-05-05 17:14 ` [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs Dr. David Alan Gilbert
@ 2024-05-05 17:35   ` Richard Henderson
  2024-05-05 18:33     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 20+ messages in thread
From: Richard Henderson @ 2024-05-05 17:35 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, peter.maydell, laurent; +Cc: qemu-devel

On 5/5/24 10:14, Dr. David Alan Gilbert wrote:
> The structs 'target_fpxreg' and 'target_xmmreg' are unused since
> Paolo's:
> 
> Commit 2796f290b546 ("linux-user: i386/signal: support FXSAVE fpstate on
> 32-bit emulation")
> 
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   linux-user/i386/signal.c | 10 ----------
>   1 file changed, 10 deletions(-)

I have

https://lore.kernel.org/qemu-devel/20240409050302.1523277-1-richard.henderson@linaro.org/

which cleans this up.  I need to refresh and resubmit.


r~

> 
> diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
> index 990048f42a..9bf602b388 100644
> --- a/linux-user/i386/signal.c
> +++ b/linux-user/i386/signal.c
> @@ -34,16 +34,6 @@ struct target_fpreg {
>       uint16_t exponent;
>   };
>   
> -struct target_fpxreg {
> -    uint16_t significand[4];
> -    uint16_t exponent;
> -    uint16_t padding[3];
> -};
> -
> -struct target_xmmreg {
> -    uint32_t element[4];
> -};
> -
>   struct target_fpx_sw_bytes {
>       uint32_t magic1;
>       uint32_t extended_size;



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs
  2024-05-05 17:35   ` Richard Henderson
@ 2024-05-05 18:33     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-05 18:33 UTC (permalink / raw)
  To: Richard Henderson; +Cc: peter.maydell, laurent, qemu-devel

* Richard Henderson (richard.henderson@linaro.org) wrote:
> On 5/5/24 10:14, Dr. David Alan Gilbert wrote:
> > The structs 'target_fpxreg' and 'target_xmmreg' are unused since
> > Paolo's:
> > 
> > Commit 2796f290b546 ("linux-user: i386/signal: support FXSAVE fpstate on
> > 32-bit emulation")
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> > ---
> >   linux-user/i386/signal.c | 10 ----------
> >   1 file changed, 10 deletions(-)
> 
> I have
> 
> https://lore.kernel.org/qemu-devel/20240409050302.1523277-1-richard.henderson@linaro.org/
> 
> which cleans this up.  I need to refresh and resubmit.

Ah yes, that's fine.

Dave

> 
> 
> r~
> 
> > 
> > diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
> > index 990048f42a..9bf602b388 100644
> > --- a/linux-user/i386/signal.c
> > +++ b/linux-user/i386/signal.c
> > @@ -34,16 +34,6 @@ struct target_fpreg {
> >       uint16_t exponent;
> >   };
> > -struct target_fpxreg {
> > -    uint16_t significand[4];
> > -    uint16_t exponent;
> > -    uint16_t padding[3];
> > -};
> > -
> > -struct target_xmmreg {
> > -    uint32_t element[4];
> > -};
> > -
> >   struct target_fpx_sw_bytes {
> >       uint32_t magic1;
> >       uint32_t extended_size;
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32'
  2024-05-05 17:14 ` [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32' Dr. David Alan Gilbert
@ 2024-05-05 18:52   ` BALATON Zoltan
  2024-05-10 12:43     ` BALATON Zoltan
  0 siblings, 1 reply; 20+ messages in thread
From: BALATON Zoltan @ 2024-05-05 18:52 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: peter.maydell, laurent, qemu-devel

On Sun, 5 May 2024, Dr. David Alan Gilbert wrote:
> I think it's use was removed by
> Commit 5883d8b296 ("mmu-hash*: Don't use full ppc_hash{32,
> 64}_translate() path for get_phys_page_debug()")
>
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>

Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>

> ---
> target/ppc/mmu-hash32.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
> index 3976416840..746321329c 100644
> --- a/target/ppc/mmu-hash32.c
> +++ b/target/ppc/mmu-hash32.c
> @@ -36,12 +36,6 @@
> #  define LOG_BATS(...) do { } while (0)
> #endif
>
> -struct mmu_ctx_hash32 {
> -    hwaddr raddr;      /* Real address              */
> -    int prot;                      /* Protection bits           */
> -    int key;                       /* Access key                */
> -};
> -
> static int ppc_hash32_pp_prot(int key, int pp, int nx)
> {
>     int prot;
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 4/7] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter'
  2024-05-05 17:14 ` [PATCH 4/7] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter' Dr. David Alan Gilbert
@ 2024-05-06  7:37   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-06  7:37 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, peter.maydell, laurent; +Cc: qemu-devel

On 5/5/24 19:14, Dr. David Alan Gilbert wrote:
> As far as I can tell it was never used.
> 
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   hw/usb/dev-network.c | 8 --------
>   1 file changed, 8 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass'
  2024-05-05 17:14 ` [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass' Dr. David Alan Gilbert
@ 2024-05-06  7:40   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-06  7:40 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, peter.maydell, laurent
  Cc: qemu-devel, Sergey Kambalin

On 5/5/24 19:14, Dr. David Alan Gilbert wrote:
> This struct has been unused since
> Commit f932093ae165 ("hw/arm/bcm2836: Split out common part of BCM283X
> classes")

Rather than "splitting out", commit f932093ae165 duplicated BCM283XClass
as BCM283XBaseClass and left it unmodified.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   hw/arm/bcm2836.c | 12 ------------
>   1 file changed, 12 deletions(-)
> 
> diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
> index db191661f2..40a379bc36 100644
> --- a/hw/arm/bcm2836.c
> +++ b/hw/arm/bcm2836.c
> @@ -18,18 +18,6 @@
>   #include "target/arm/cpu-qom.h"
>   #include "target/arm/gtimer.h"
>   
> -struct BCM283XClass {
> -    /*< private >*/
> -    DeviceClass parent_class;
> -    /*< public >*/
> -    const char *name;
> -    const char *cpu_type;
> -    unsigned core_count;
> -    hwaddr peri_base; /* Peripheral base address seen by the CPU */
> -    hwaddr ctrl_base; /* Interrupt controller and mailboxes etc. */
> -    int clusterid;
> -};
> -
>   static Property bcm2836_enabled_cores_property =
>       DEFINE_PROP_UINT32("enabled-cpus", BCM283XBaseState, enabled_cpus, 0);
>   



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 7/7] net/can: Remove unused struct 'CanBusState'
  2024-05-05 17:14 ` [PATCH 7/7] net/can: Remove unused struct 'CanBusState' Dr. David Alan Gilbert
@ 2024-05-06  7:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-06  7:43 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, peter.maydell, laurent; +Cc: qemu-devel

On 5/5/24 19:14, Dr. David Alan Gilbert wrote:
> As far as I can tell this struct has never been used in this
> file (it is used in can_core.c).
> 
> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>   net/can/can_host.c | 6 ------
>   1 file changed, 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32'
  2024-05-05 18:52   ` BALATON Zoltan
@ 2024-05-10 12:43     ` BALATON Zoltan
  2024-05-10 12:49       ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 20+ messages in thread
From: BALATON Zoltan @ 2024-05-10 12:43 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: peter.maydell, laurent, qemu-devel

On Sun, 5 May 2024, BALATON Zoltan wrote:
> On Sun, 5 May 2024, Dr. David Alan Gilbert wrote:
>> I think it's use was removed by
>> Commit 5883d8b296 ("mmu-hash*: Don't use full ppc_hash{32,
>> 64}_translate() path for get_phys_page_debug()")
>> 
>> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
>
> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>

I've picked this patch up and will send with my series that changes the 
same place to avoid needing to rebase.

Regards,
BALATON Zoltan

>> ---
>> target/ppc/mmu-hash32.c | 6 ------
>> 1 file changed, 6 deletions(-)
>> 
>> diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
>> index 3976416840..746321329c 100644
>> --- a/target/ppc/mmu-hash32.c
>> +++ b/target/ppc/mmu-hash32.c
>> @@ -36,12 +36,6 @@
>> #  define LOG_BATS(...) do { } while (0)
>> #endif
>> 
>> -struct mmu_ctx_hash32 {
>> -    hwaddr raddr;      /* Real address              */
>> -    int prot;                      /* Protection bits           */
>> -    int key;                       /* Access key                */
>> -};
>> -
>> static int ppc_hash32_pp_prot(int key, int pp, int nx)
>> {
>>     int prot;
>> 
>
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32'
  2024-05-10 12:43     ` BALATON Zoltan
@ 2024-05-10 12:49       ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-10 12:49 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: peter.maydell, laurent, qemu-devel

* BALATON Zoltan (balaton@eik.bme.hu) wrote:
> On Sun, 5 May 2024, BALATON Zoltan wrote:
> > On Sun, 5 May 2024, Dr. David Alan Gilbert wrote:
> > > I think it's use was removed by
> > > Commit 5883d8b296 ("mmu-hash*: Don't use full ppc_hash{32,
> > > 64}_translate() path for get_phys_page_debug()")
> > > 
> > > Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> > 
> > Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
> 
> I've picked this patch up and will send with my series that changes the same
> place to avoid needing to rebase.

Thanks!

Dave

> Regards,
> BALATON Zoltan
> 
> > > ---
> > > target/ppc/mmu-hash32.c | 6 ------
> > > 1 file changed, 6 deletions(-)
> > > 
> > > diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
> > > index 3976416840..746321329c 100644
> > > --- a/target/ppc/mmu-hash32.c
> > > +++ b/target/ppc/mmu-hash32.c
> > > @@ -36,12 +36,6 @@
> > > #  define LOG_BATS(...) do { } while (0)
> > > #endif
> > > 
> > > -struct mmu_ctx_hash32 {
> > > -    hwaddr raddr;      /* Real address              */
> > > -    int prot;                      /* Protection bits           */
> > > -    int key;                       /* Access key                */
> > > -};
> > > -
> > > static int ppc_hash32_pp_prot(int key, int pp, int nx)
> > > {
> > >     int prot;
> > > 
> > 
> > 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq'
  2024-05-05 17:14 ` [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq' Dr. David Alan Gilbert
@ 2024-05-20 13:22   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-05-20 13:22 UTC (permalink / raw)
  To: peter.maydell, laurent, mark.cave-ayland, atar4qemu; +Cc: qemu-devel

* Dr. David Alan Gilbert (dave@treblig.org) wrote:
> This struct is unused since Peter's
> Commit b8ae597f0e6d ("linux-user/sparc: Fix errors in target_ucontext
> structures")
> 
> However, hmm, I'm a bit confused since that commit modifies the
> structure and then removes it, was that intentional?

Ping on this.
(I think the others in the set have been reviewed and one picked up).

Dave

> Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
> ---
>  linux-user/sparc/signal.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
> index f164b74032..8181b8b92c 100644
> --- a/linux-user/sparc/signal.c
> +++ b/linux-user/sparc/signal.c
> @@ -546,11 +546,6 @@ void setup_sigtramp(abi_ulong sigtramp_page)
>  typedef abi_ulong target_mc_greg_t;
>  typedef target_mc_greg_t target_mc_gregset_t[SPARC_MC_NGREG];
>  
> -struct target_mc_fq {
> -    abi_ulong mcfq_addr;
> -    uint32_t mcfq_insn;
> -};
> -
>  /*
>   * Note the manual 16-alignment; the kernel gets this because it
>   * includes a "long double qregs[16]" in the mcpu_fregs union,
> -- 
> 2.45.0
> 
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/7] Remove some unused structures
  2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
                   ` (6 preceding siblings ...)
  2024-05-05 17:14 ` [PATCH 7/7] net/can: Remove unused struct 'CanBusState' Dr. David Alan Gilbert
@ 2024-06-07 14:04 ` Dr. David Alan Gilbert
  2024-06-17 12:59   ` Michael Tokarev
  7 siblings, 1 reply; 20+ messages in thread
From: Dr. David Alan Gilbert @ 2024-06-07 14:04 UTC (permalink / raw)
  To: peter.maydell, laurent, qemu-trivial; +Cc: qemu-devel

* Dr. David Alan Gilbert (dave@treblig.org) wrote:
> A bunch of structs that are currently unused,
> found with a simple script and a bit of eyeballing.
> 
> The only one I'm that suspicious of is the SPARC
> one, where the patch which removed the use is a bit
> confusing to me.

Copying in Trivial; I think there are 4 of these that
are still outstanding:

   [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame'
      (Although cris is going)
   [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq'
   [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass'
   [PATCH 7/7] net/can: Remove unused struct 'CanBusState'

Can Trivial pick these up please?

Dave

> Tested with a 
>   --target-list=ppc-softmmu,m68k-softmmu,x86_64-softmmu,arm-softmmu,aarch64-softmmu,cris-linux-user,i386-linux-user,sparc-linux-user
> and 'make check' on x86 linux.
> 
> Dave
> 
> Dr. David Alan Gilbert (7):
>   linux-user: cris: Remove unused struct 'rt_signal_frame'
>   linux-user: i386/signal: Remove unused fp structs
>   linux-user: sparc: Remove unused struct 'target_mc_fq'
>   hw/usb/dev-network: Remove unused struct 'rndis_config_parameter'
>   hw/arm/bcm2836: Remove unusued struct 'BCM283XClass'
>   target/ppc: Remove unused struct 'mmu_ctx_hash32'
>   net/can: Remove unused struct 'CanBusState'
> 
>  hw/arm/bcm2836.c          | 12 ------------
>  hw/usb/dev-network.c      |  8 --------
>  linux-user/cris/signal.c  |  8 --------
>  linux-user/i386/signal.c  | 10 ----------
>  linux-user/sparc/signal.c |  5 -----
>  net/can/can_host.c        |  6 ------
>  target/ppc/mmu-hash32.c   |  6 ------
>  7 files changed, 55 deletions(-)
> 
> -- 
> 2.45.0
> 
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/7] Remove some unused structures
  2024-06-07 14:04 ` [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
@ 2024-06-17 12:59   ` Michael Tokarev
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Tokarev @ 2024-06-17 12:59 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, peter.maydell, laurent, qemu-trivial; +Cc: qemu-devel

07.06.2024 17:04, Dr. David Alan Gilbert пишет:
> * Dr. David Alan Gilbert (dave@treblig.org) wrote:
>> A bunch of structs that are currently unused,
>> found with a simple script and a bit of eyeballing.
>>
>> The only one I'm that suspicious of is the SPARC
>> one, where the patch which removed the use is a bit
>> confusing to me.
> 
> Copying in Trivial; I think there are 4 of these that
> are still outstanding:
> 
>     [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame'
>        (Although cris is going)
>     [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq'
>     [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass'
>     [PATCH 7/7] net/can: Remove unused struct 'CanBusState'
> 
> Can Trivial pick these up please?

Applied to qemu-trivial, thanks!

/mjt

-- 
GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24.
New key: rsa4096/61AD3D98ECDF2C8E  9D8B E14E 3F2A 9DD7 9199  28F1 61AD 3D98 ECDF 2C8E
Old key: rsa2048/457CE0A0804465C5  6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-06-17 13:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05 17:14 [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
2024-05-05 17:14 ` [PATCH 1/7] linux-user: cris: Remove unused struct 'rt_signal_frame' Dr. David Alan Gilbert
2024-05-05 17:33   ` Richard Henderson
2024-05-05 17:14 ` [PATCH 2/7] linux-user: i386/signal: Remove unused fp structs Dr. David Alan Gilbert
2024-05-05 17:35   ` Richard Henderson
2024-05-05 18:33     ` Dr. David Alan Gilbert
2024-05-05 17:14 ` [PATCH 3/7] linux-user: sparc: Remove unused struct 'target_mc_fq' Dr. David Alan Gilbert
2024-05-20 13:22   ` Dr. David Alan Gilbert
2024-05-05 17:14 ` [PATCH 4/7] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter' Dr. David Alan Gilbert
2024-05-06  7:37   ` Philippe Mathieu-Daudé
2024-05-05 17:14 ` [PATCH 5/7] hw/arm/bcm2836: Remove unusued struct 'BCM283XClass' Dr. David Alan Gilbert
2024-05-06  7:40   ` Philippe Mathieu-Daudé
2024-05-05 17:14 ` [PATCH 6/7] target/ppc: Remove unused struct 'mmu_ctx_hash32' Dr. David Alan Gilbert
2024-05-05 18:52   ` BALATON Zoltan
2024-05-10 12:43     ` BALATON Zoltan
2024-05-10 12:49       ` Dr. David Alan Gilbert
2024-05-05 17:14 ` [PATCH 7/7] net/can: Remove unused struct 'CanBusState' Dr. David Alan Gilbert
2024-05-06  7:43   ` Philippe Mathieu-Daudé
2024-06-07 14:04 ` [PATCH 0/7] Remove some unused structures Dr. David Alan Gilbert
2024-06-17 12:59   ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).