qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/net/xilinx_axienet: Remove unused code
@ 2020-08-14 13:30 Philippe Mathieu-Daudé
  2020-08-14 15:05 ` Alistair Francis
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-08-14 13:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Jason Wang, Alistair Francis,
	Philippe Mathieu-Daudé, qemu-arm, Edgar E. Iglesias

Most of the MDIOBus fields are unused.  The ADVERTISE_10HALF
definition is unused.  Remove unused code.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/net/xilinx_axienet.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 1e48eb70c9..2e89f236b4 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -54,7 +54,6 @@
      TYPE_XILINX_AXI_ENET_CONTROL_STREAM)
 
 /* Advertisement control register. */
-#define ADVERTISE_10HALF        0x0020  /* Try for 10mbps half-duplex  */
 #define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */
 #define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */
 #define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */
@@ -169,28 +168,6 @@ tdk_init(struct PHY *phy)
 }
 
 struct MDIOBus {
-    /* bus.  */
-    int mdc;
-    int mdio;
-
-    /* decoder.  */
-    enum {
-        PREAMBLE,
-        SOF,
-        OPC,
-        ADDR,
-        REQ,
-        TURNAROUND,
-        DATA
-    } state;
-    unsigned int drive;
-
-    unsigned int cnt;
-    unsigned int addr;
-    unsigned int opc;
-    unsigned int req;
-    unsigned int data;
-
     struct PHY *devs[32];
 };
 
-- 
2.21.3



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

* Re: [PATCH] hw/net/xilinx_axienet: Remove unused code
  2020-08-14 13:30 [PATCH] hw/net/xilinx_axienet: Remove unused code Philippe Mathieu-Daudé
@ 2020-08-14 15:05 ` Alistair Francis
  2020-08-17 14:04 ` Edgar E. Iglesias
  2020-09-01  9:29 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Alistair Francis @ 2020-08-14 15:05 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Trivial, Jason Wang, Alistair Francis,
	qemu-devel@nongnu.org Developers, qemu-arm, Edgar E. Iglesias

On Fri, Aug 14, 2020 at 6:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Most of the MDIOBus fields are unused.  The ADVERTISE_10HALF
> definition is unused.  Remove unused code.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/net/xilinx_axienet.c | 23 -----------------------
>  1 file changed, 23 deletions(-)
>
> diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
> index 1e48eb70c9..2e89f236b4 100644
> --- a/hw/net/xilinx_axienet.c
> +++ b/hw/net/xilinx_axienet.c
> @@ -54,7 +54,6 @@
>       TYPE_XILINX_AXI_ENET_CONTROL_STREAM)
>
>  /* Advertisement control register. */
> -#define ADVERTISE_10HALF        0x0020  /* Try for 10mbps half-duplex  */
>  #define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */
>  #define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */
>  #define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */
> @@ -169,28 +168,6 @@ tdk_init(struct PHY *phy)
>  }
>
>  struct MDIOBus {
> -    /* bus.  */
> -    int mdc;
> -    int mdio;
> -
> -    /* decoder.  */
> -    enum {
> -        PREAMBLE,
> -        SOF,
> -        OPC,
> -        ADDR,
> -        REQ,
> -        TURNAROUND,
> -        DATA
> -    } state;
> -    unsigned int drive;
> -
> -    unsigned int cnt;
> -    unsigned int addr;
> -    unsigned int opc;
> -    unsigned int req;
> -    unsigned int data;
> -
>      struct PHY *devs[32];
>  };
>
> --
> 2.21.3
>
>


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

* Re: [PATCH] hw/net/xilinx_axienet: Remove unused code
  2020-08-14 13:30 [PATCH] hw/net/xilinx_axienet: Remove unused code Philippe Mathieu-Daudé
  2020-08-14 15:05 ` Alistair Francis
@ 2020-08-17 14:04 ` Edgar E. Iglesias
  2020-09-01  9:29 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Edgar E. Iglesias @ 2020-08-17 14:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, qemu-trivial, Jason Wang, Alistair Francis,
	qemu-devel, qemu-arm

On Fri, Aug 14, 2020 at 03:30:07PM +0200, Philippe Mathieu-Daudé wrote:
> Most of the MDIOBus fields are unused.  The ADVERTISE_10HALF
> definition is unused.  Remove unused code.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>


> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/net/xilinx_axienet.c | 23 -----------------------
>  1 file changed, 23 deletions(-)
> 
> diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
> index 1e48eb70c9..2e89f236b4 100644
> --- a/hw/net/xilinx_axienet.c
> +++ b/hw/net/xilinx_axienet.c
> @@ -54,7 +54,6 @@
>       TYPE_XILINX_AXI_ENET_CONTROL_STREAM)
>  
>  /* Advertisement control register. */
> -#define ADVERTISE_10HALF        0x0020  /* Try for 10mbps half-duplex  */
>  #define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */
>  #define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */
>  #define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */
> @@ -169,28 +168,6 @@ tdk_init(struct PHY *phy)
>  }
>  
>  struct MDIOBus {
> -    /* bus.  */
> -    int mdc;
> -    int mdio;
> -
> -    /* decoder.  */
> -    enum {
> -        PREAMBLE,
> -        SOF,
> -        OPC,
> -        ADDR,
> -        REQ,
> -        TURNAROUND,
> -        DATA
> -    } state;
> -    unsigned int drive;
> -
> -    unsigned int cnt;
> -    unsigned int addr;
> -    unsigned int opc;
> -    unsigned int req;
> -    unsigned int data;
> -
>      struct PHY *devs[32];
>  };
>  
> -- 
> 2.21.3
> 


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

* Re: [PATCH] hw/net/xilinx_axienet: Remove unused code
  2020-08-14 13:30 [PATCH] hw/net/xilinx_axienet: Remove unused code Philippe Mathieu-Daudé
  2020-08-14 15:05 ` Alistair Francis
  2020-08-17 14:04 ` Edgar E. Iglesias
@ 2020-09-01  9:29 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-09-01  9:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, qemu-trivial, Jason Wang, Alistair Francis,
	qemu-arm, Edgar E. Iglesias

Le 14/08/2020 à 15:30, Philippe Mathieu-Daudé a écrit :
> Most of the MDIOBus fields are unused.  The ADVERTISE_10HALF
> definition is unused.  Remove unused code.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/net/xilinx_axienet.c | 23 -----------------------
>  1 file changed, 23 deletions(-)
> 
> diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
> index 1e48eb70c9..2e89f236b4 100644
> --- a/hw/net/xilinx_axienet.c
> +++ b/hw/net/xilinx_axienet.c
> @@ -54,7 +54,6 @@
>       TYPE_XILINX_AXI_ENET_CONTROL_STREAM)
>  
>  /* Advertisement control register. */
> -#define ADVERTISE_10HALF        0x0020  /* Try for 10mbps half-duplex  */
>  #define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */
>  #define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */
>  #define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */
> @@ -169,28 +168,6 @@ tdk_init(struct PHY *phy)
>  }
>  
>  struct MDIOBus {
> -    /* bus.  */
> -    int mdc;
> -    int mdio;
> -
> -    /* decoder.  */
> -    enum {
> -        PREAMBLE,
> -        SOF,
> -        OPC,
> -        ADDR,
> -        REQ,
> -        TURNAROUND,
> -        DATA
> -    } state;
> -    unsigned int drive;
> -
> -    unsigned int cnt;
> -    unsigned int addr;
> -    unsigned int opc;
> -    unsigned int req;
> -    unsigned int data;
> -
>      struct PHY *devs[32];
>  };
>  
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

end of thread, other threads:[~2020-09-01  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-14 13:30 [PATCH] hw/net/xilinx_axienet: Remove unused code Philippe Mathieu-Daudé
2020-08-14 15:05 ` Alistair Francis
2020-08-17 14:04 ` Edgar E. Iglesias
2020-09-01  9:29 ` Laurent Vivier

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).