diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-11-11 11:26:34 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-11-12 09:17:20 -0800 |
| commit | 7e975caa0f7bf2f83a5e18b4ae69c3d7fff4eafa (patch) | |
| tree | add563fe1888c8b8a16181d193c2850ffb949ea1 /net/unix/garbage.c | |
| parent | 1479493c91fc14b8387db01c0442cd1508c325e6 (diff) | |
net: stmmac: improve ndev->max_mtu setup readability
Improve the readibility of the code setting ndev->max_mtu. This depends
on the hardware specific maximum defined by the MAC core, and also a
platform provided maximum.
The code was originally checking that the platform specific maximum was
between ndev->min_mtu..MAC core maximum before reducing ndev->max_mtu,
otherwise if the platform specific maximum was less than ndev->min_mtu,
issuing a warning.
Re-order the code to handle the case where the platform specific max is
below ndev->min_mtu, which then means that the subsequent test is
simply reducing ndev->max_mtu.
Update the comment, and add a few blank lines to separate the blocks of
code.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vImWA-0000000DrIl-1HZY@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions
