2022-03-26 19:45:41

by Benjamin Stürz

[permalink] [raw]
Subject: [PATCH 18/22] smsc: Replace comments with C99 initializers

This replaces comments with C99's designated
initializers because the kernel supports them now.

Signed-off-by: Benjamin Stürz <[email protected]>
---
drivers/net/ethernet/smsc/smc9194.h | 15 ++++++---------
drivers/net/ethernet/smsc/smc91x.h | 18 ++++++++----------
2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc9194.h b/drivers/net/ethernet/smsc/smc9194.h
index cf69d0a5a1cb..e1c780afb9bb 100644
--- a/drivers/net/ethernet/smsc/smc9194.h
+++ b/drivers/net/ethernet/smsc/smc9194.h
@@ -163,15 +163,12 @@ typedef unsigned long int dword;
#define CHIP_91100 7

static const char * chip_ids[ 15 ] = {
- NULL, NULL, NULL,
- /* 3 */ "SMC91C90/91C92",
- /* 4 */ "SMC91C94",
- /* 5 */ "SMC91C95",
- NULL,
- /* 7 */ "SMC91C100",
- /* 8 */ "SMC91C100FD",
- NULL, NULL, NULL,
- NULL, NULL, NULL};
+ [3] = "SMC91C90/91C92",
+ [4] = "SMC91C94",
+ [5] = "SMC91C95",
+ [7] = "SMC91C100",
+ [8] = "SMC91C100FD",
+};

/*
. Transmit status bits
diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 387539a8094b..122cdc849507 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -731,16 +731,14 @@ smc_pxa_dma_insw(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma,
#define CHIP_91111FD 9

static const char * chip_ids[ 16 ] = {
- NULL, NULL, NULL,
- /* 3 */ "SMC91C90/91C92",
- /* 4 */ "SMC91C94",
- /* 5 */ "SMC91C95",
- /* 6 */ "SMC91C96",
- /* 7 */ "SMC91C100",
- /* 8 */ "SMC91C100FD",
- /* 9 */ "SMC91C11xFD",
- NULL, NULL, NULL,
- NULL, NULL, NULL};
+ [3] = "SMC91C90/91C92",
+ [4] = "SMC91C94",
+ [5] = "SMC91C95",
+ [6] = "SMC91C96",
+ [7] = "SMC91C100",
+ [8] = "SMC91C100FD",
+ [9] = "SMC91C11xFD",
+};


/*
--
2.35.1