Skip to content

Commit 072dd84

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: stmmac: mostly remove "buf_sz"
The "buf_sz" parameter is not used in the stmmac driver - there is one place where the value of buf_sz is validated, and two places where it is written. It is otherwise unused. Remove these accesses. However, leave the module parameter in place as removing it could cause module load to fail, breaking user setups. Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Furong Xu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent cd02ab7 commit 072dd84

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static int tc = TC_DEFAULT;
101101
module_param(tc, int, 0644);
102102
MODULE_PARM_DESC(tc, "DMA threshold control value");
103103

104+
/* This is unused */
104105
#define DEFAULT_BUFSIZE 1536
105106
static int buf_sz = DEFAULT_BUFSIZE;
106107
module_param(buf_sz, int, 0644);
@@ -218,8 +219,6 @@ static void stmmac_verify_args(void)
218219
{
219220
if (unlikely(watchdog < 0))
220221
watchdog = TX_TIMEO;
221-
if (unlikely((buf_sz < DEFAULT_BUFSIZE) || (buf_sz > BUF_SIZE_16KiB)))
222-
buf_sz = DEFAULT_BUFSIZE;
223222
if (unlikely((pause < 0) || (pause > 0xffff)))
224223
pause = PAUSE_TIME;
225224

@@ -4028,7 +4027,6 @@ static int __stmmac_open(struct net_device *dev,
40284027
}
40294028
}
40304029

4031-
buf_sz = dma_conf->dma_buf_sz;
40324030
for (int i = 0; i < MTL_MAX_TX_QUEUES; i++)
40334031
if (priv->dma_conf.tx_queue[i].tbs & STMMAC_TBS_EN)
40344032
dma_conf->tx_queue[i].tbs = priv->dma_conf.tx_queue[i].tbs;
@@ -7989,9 +7987,6 @@ static int __init stmmac_cmdline_opt(char *str)
79897987
} else if (!strncmp(opt, "phyaddr:", 8)) {
79907988
if (kstrtoint(opt + 8, 0, &phyaddr))
79917989
goto err;
7992-
} else if (!strncmp(opt, "buf_sz:", 7)) {
7993-
if (kstrtoint(opt + 7, 0, &buf_sz))
7994-
goto err;
79957990
} else if (!strncmp(opt, "tc:", 3)) {
79967991
if (kstrtoint(opt + 3, 0, &tc))
79977992
goto err;

0 commit comments

Comments
 (0)