Skip to content

Commit 005b571

Browse files
JoePerchesdavem330
authored andcommitted
cxgb4: add const to static arrays
Patch originally from Joe Perches, unmodified. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Dimitris Michailidis <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8f3a767 commit 005b571

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

drivers/net/cxgb4/t4_hw.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void dump_mbox(struct adapter *adap, int mbox, u32 data_reg)
183183
int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
184184
void *rpl, bool sleep_ok)
185185
{
186-
static int delay[] = {
186+
static const int delay[] = {
187187
1, 1, 3, 5, 10, 10, 20, 50, 100, 200
188188
};
189189

@@ -917,15 +917,15 @@ static int t4_handle_intr_status(struct adapter *adapter, unsigned int reg,
917917
*/
918918
static void pcie_intr_handler(struct adapter *adapter)
919919
{
920-
static struct intr_info sysbus_intr_info[] = {
920+
static const struct intr_info sysbus_intr_info[] = {
921921
{ RNPP, "RXNP array parity error", -1, 1 },
922922
{ RPCP, "RXPC array parity error", -1, 1 },
923923
{ RCIP, "RXCIF array parity error", -1, 1 },
924924
{ RCCP, "Rx completions control array parity error", -1, 1 },
925925
{ RFTP, "RXFT array parity error", -1, 1 },
926926
{ 0 }
927927
};
928-
static struct intr_info pcie_port_intr_info[] = {
928+
static const struct intr_info pcie_port_intr_info[] = {
929929
{ TPCP, "TXPC array parity error", -1, 1 },
930930
{ TNPP, "TXNP array parity error", -1, 1 },
931931
{ TFTP, "TXFT array parity error", -1, 1 },
@@ -937,7 +937,7 @@ static void pcie_intr_handler(struct adapter *adapter)
937937
{ TDUE, "Tx uncorrectable data error", -1, 1 },
938938
{ 0 }
939939
};
940-
static struct intr_info pcie_intr_info[] = {
940+
static const struct intr_info pcie_intr_info[] = {
941941
{ MSIADDRLPERR, "MSI AddrL parity error", -1, 1 },
942942
{ MSIADDRHPERR, "MSI AddrH parity error", -1, 1 },
943943
{ MSIDATAPERR, "MSI data parity error", -1, 1 },
@@ -989,7 +989,7 @@ static void pcie_intr_handler(struct adapter *adapter)
989989
*/
990990
static void tp_intr_handler(struct adapter *adapter)
991991
{
992-
static struct intr_info tp_intr_info[] = {
992+
static const struct intr_info tp_intr_info[] = {
993993
{ 0x3fffffff, "TP parity error", -1, 1 },
994994
{ FLMTXFLSTEMPTY, "TP out of Tx pages", -1, 1 },
995995
{ 0 }
@@ -1006,7 +1006,7 @@ static void sge_intr_handler(struct adapter *adapter)
10061006
{
10071007
u64 v;
10081008

1009-
static struct intr_info sge_intr_info[] = {
1009+
static const struct intr_info sge_intr_info[] = {
10101010
{ ERR_CPL_EXCEED_IQE_SIZE,
10111011
"SGE received CPL exceeding IQE size", -1, 1 },
10121012
{ ERR_INVALID_CIDX_INC,
@@ -1051,7 +1051,7 @@ static void sge_intr_handler(struct adapter *adapter)
10511051
*/
10521052
static void cim_intr_handler(struct adapter *adapter)
10531053
{
1054-
static struct intr_info cim_intr_info[] = {
1054+
static const struct intr_info cim_intr_info[] = {
10551055
{ PREFDROPINT, "CIM control register prefetch drop", -1, 1 },
10561056
{ OBQPARERR, "CIM OBQ parity error", -1, 1 },
10571057
{ IBQPARERR, "CIM IBQ parity error", -1, 1 },
@@ -1061,7 +1061,7 @@ static void cim_intr_handler(struct adapter *adapter)
10611061
{ TIEQOUTPARERRINT, "CIM TIEQ incoming parity error", -1, 1 },
10621062
{ 0 }
10631063
};
1064-
static struct intr_info cim_upintr_info[] = {
1064+
static const struct intr_info cim_upintr_info[] = {
10651065
{ RSVDSPACEINT, "CIM reserved space access", -1, 1 },
10661066
{ ILLTRANSINT, "CIM illegal transaction", -1, 1 },
10671067
{ ILLWRINT, "CIM illegal write", -1, 1 },
@@ -1108,7 +1108,7 @@ static void cim_intr_handler(struct adapter *adapter)
11081108
*/
11091109
static void ulprx_intr_handler(struct adapter *adapter)
11101110
{
1111-
static struct intr_info ulprx_intr_info[] = {
1111+
static const struct intr_info ulprx_intr_info[] = {
11121112
{ 0x1800000, "ULPRX context error", -1, 1 },
11131113
{ 0x7fffff, "ULPRX parity error", -1, 1 },
11141114
{ 0 }
@@ -1123,7 +1123,7 @@ static void ulprx_intr_handler(struct adapter *adapter)
11231123
*/
11241124
static void ulptx_intr_handler(struct adapter *adapter)
11251125
{
1126-
static struct intr_info ulptx_intr_info[] = {
1126+
static const struct intr_info ulptx_intr_info[] = {
11271127
{ PBL_BOUND_ERR_CH3, "ULPTX channel 3 PBL out of bounds", -1,
11281128
0 },
11291129
{ PBL_BOUND_ERR_CH2, "ULPTX channel 2 PBL out of bounds", -1,
@@ -1145,7 +1145,7 @@ static void ulptx_intr_handler(struct adapter *adapter)
11451145
*/
11461146
static void pmtx_intr_handler(struct adapter *adapter)
11471147
{
1148-
static struct intr_info pmtx_intr_info[] = {
1148+
static const struct intr_info pmtx_intr_info[] = {
11491149
{ PCMD_LEN_OVFL0, "PMTX channel 0 pcmd too large", -1, 1 },
11501150
{ PCMD_LEN_OVFL1, "PMTX channel 1 pcmd too large", -1, 1 },
11511151
{ PCMD_LEN_OVFL2, "PMTX channel 2 pcmd too large", -1, 1 },
@@ -1167,7 +1167,7 @@ static void pmtx_intr_handler(struct adapter *adapter)
11671167
*/
11681168
static void pmrx_intr_handler(struct adapter *adapter)
11691169
{
1170-
static struct intr_info pmrx_intr_info[] = {
1170+
static const struct intr_info pmrx_intr_info[] = {
11711171
{ ZERO_E_CMD_ERROR, "PMRX 0-length pcmd", -1, 1 },
11721172
{ PMRX_FRAMING_ERROR, "PMRX framing error", -1, 1 },
11731173
{ OCSPI_PAR_ERROR, "PMRX ocspi parity error", -1, 1 },
@@ -1186,7 +1186,7 @@ static void pmrx_intr_handler(struct adapter *adapter)
11861186
*/
11871187
static void cplsw_intr_handler(struct adapter *adapter)
11881188
{
1189-
static struct intr_info cplsw_intr_info[] = {
1189+
static const struct intr_info cplsw_intr_info[] = {
11901190
{ CIM_OP_MAP_PERR, "CPLSW CIM op_map parity error", -1, 1 },
11911191
{ CIM_OVFL_ERROR, "CPLSW CIM overflow", -1, 1 },
11921192
{ TP_FRAMING_ERROR, "CPLSW TP framing error", -1, 1 },
@@ -1205,7 +1205,7 @@ static void cplsw_intr_handler(struct adapter *adapter)
12051205
*/
12061206
static void le_intr_handler(struct adapter *adap)
12071207
{
1208-
static struct intr_info le_intr_info[] = {
1208+
static const struct intr_info le_intr_info[] = {
12091209
{ LIPMISS, "LE LIP miss", -1, 0 },
12101210
{ LIP0, "LE 0 LIP error", -1, 0 },
12111211
{ PARITYERR, "LE parity error", -1, 1 },
@@ -1223,11 +1223,11 @@ static void le_intr_handler(struct adapter *adap)
12231223
*/
12241224
static void mps_intr_handler(struct adapter *adapter)
12251225
{
1226-
static struct intr_info mps_rx_intr_info[] = {
1226+
static const struct intr_info mps_rx_intr_info[] = {
12271227
{ 0xffffff, "MPS Rx parity error", -1, 1 },
12281228
{ 0 }
12291229
};
1230-
static struct intr_info mps_tx_intr_info[] = {
1230+
static const struct intr_info mps_tx_intr_info[] = {
12311231
{ TPFIFO, "MPS Tx TP FIFO parity error", -1, 1 },
12321232
{ NCSIFIFO, "MPS Tx NC-SI FIFO parity error", -1, 1 },
12331233
{ TXDATAFIFO, "MPS Tx data FIFO parity error", -1, 1 },
@@ -1237,25 +1237,25 @@ static void mps_intr_handler(struct adapter *adapter)
12371237
{ FRMERR, "MPS Tx framing error", -1, 1 },
12381238
{ 0 }
12391239
};
1240-
static struct intr_info mps_trc_intr_info[] = {
1240+
static const struct intr_info mps_trc_intr_info[] = {
12411241
{ FILTMEM, "MPS TRC filter parity error", -1, 1 },
12421242
{ PKTFIFO, "MPS TRC packet FIFO parity error", -1, 1 },
12431243
{ MISCPERR, "MPS TRC misc parity error", -1, 1 },
12441244
{ 0 }
12451245
};
1246-
static struct intr_info mps_stat_sram_intr_info[] = {
1246+
static const struct intr_info mps_stat_sram_intr_info[] = {
12471247
{ 0x1fffff, "MPS statistics SRAM parity error", -1, 1 },
12481248
{ 0 }
12491249
};
1250-
static struct intr_info mps_stat_tx_intr_info[] = {
1250+
static const struct intr_info mps_stat_tx_intr_info[] = {
12511251
{ 0xfffff, "MPS statistics Tx FIFO parity error", -1, 1 },
12521252
{ 0 }
12531253
};
1254-
static struct intr_info mps_stat_rx_intr_info[] = {
1254+
static const struct intr_info mps_stat_rx_intr_info[] = {
12551255
{ 0xffffff, "MPS statistics Rx FIFO parity error", -1, 1 },
12561256
{ 0 }
12571257
};
1258-
static struct intr_info mps_cls_intr_info[] = {
1258+
static const struct intr_info mps_cls_intr_info[] = {
12591259
{ MATCHSRAM, "MPS match SRAM parity error", -1, 1 },
12601260
{ MATCHTCAM, "MPS match TCAM parity error", -1, 1 },
12611261
{ HASHSRAM, "MPS hash SRAM parity error", -1, 1 },
@@ -1354,7 +1354,7 @@ static void ma_intr_handler(struct adapter *adap)
13541354
*/
13551355
static void smb_intr_handler(struct adapter *adap)
13561356
{
1357-
static struct intr_info smb_intr_info[] = {
1357+
static const struct intr_info smb_intr_info[] = {
13581358
{ MSTTXFIFOPARINT, "SMB master Tx FIFO parity error", -1, 1 },
13591359
{ MSTRXFIFOPARINT, "SMB master Rx FIFO parity error", -1, 1 },
13601360
{ SLVFIFOPARINT, "SMB slave FIFO parity error", -1, 1 },
@@ -1370,7 +1370,7 @@ static void smb_intr_handler(struct adapter *adap)
13701370
*/
13711371
static void ncsi_intr_handler(struct adapter *adap)
13721372
{
1373-
static struct intr_info ncsi_intr_info[] = {
1373+
static const struct intr_info ncsi_intr_info[] = {
13741374
{ CIM_DM_PRTY_ERR, "NC-SI CIM parity error", -1, 1 },
13751375
{ MPS_DM_PRTY_ERR, "NC-SI MPS parity error", -1, 1 },
13761376
{ TXFIFO_PRTY_ERR, "NC-SI Tx FIFO parity error", -1, 1 },
@@ -1408,7 +1408,7 @@ static void xgmac_intr_handler(struct adapter *adap, int port)
14081408
*/
14091409
static void pl_intr_handler(struct adapter *adap)
14101410
{
1411-
static struct intr_info pl_intr_info[] = {
1411+
static const struct intr_info pl_intr_info[] = {
14121412
{ FATALPERR, "T4 fatal parity error", -1, 1 },
14131413
{ PERRVFID, "PL VFID_MAP parity error", -1, 1 },
14141414
{ 0 }

0 commit comments

Comments
 (0)