[PATCH 01/15] net: pcnet: Drop typedef struct pcnet_priv_t

Marek Vasut marek.vasut at gmail.com
Sun May 17 18:24:11 CEST 2020


Use struct pcnet_priv all over the place instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
Cc: Joe Hershberger <joe.hershberger at ni.com>
---
 drivers/net/pcnet.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index f97e7f8c6a..f34fc4abbf 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -73,15 +73,15 @@ struct pcnet_uncached_priv {
 	struct pcnet_init_block init_block;
 };
 
-typedef struct pcnet_priv {
+struct pcnet_priv {
 	struct pcnet_uncached_priv *uc;
 	/* Receive Buffer space */
 	unsigned char (*rx_buf)[RX_RING_SIZE][PKT_BUF_SZ + 4];
 	int cur_rx;
 	int cur_tx;
-} pcnet_priv_t;
+};
 
-static pcnet_priv_t *lp;
+static struct pcnet_priv *lp;
 
 /* Offsets from base I/O address for WIO mode */
 #define PCNET_RDP		0x10
@@ -337,9 +337,9 @@ static int pcnet_init(struct eth_device *dev, bd_t *bis)
 	 * must be aligned on 16-byte boundaries.
 	 */
 	if (lp == NULL) {
-		addr = (unsigned long)malloc(sizeof(pcnet_priv_t) + 0x10);
+		addr = (unsigned long)malloc(sizeof(*lp) + 0x10);
 		addr = (addr + 0xf) & ~0xf;
-		lp = (pcnet_priv_t *)addr;
+		lp = (struct pcnet_priv *)addr;
 
 		addr = (unsigned long)memalign(ARCH_DMA_MINALIGN,
 					       sizeof(*lp->uc));
-- 
2.25.1



More information about the U-Boot mailing list