[PATCH net-next v2 03/17] net: stmmac: use correct type for tx_lpi_timer
Russell King (Oracle)
linux at armlinux.org.uk
Tue Jan 7 08:34:14 PST 2025
On Mon, Jan 06, 2025 at 05:45:37PM +0100, Andrew Lunn wrote:
> On Mon, Jan 06, 2025 at 12:24:58PM +0000, Russell King (Oracle) wrote:
> > The ethtool interface uses u32 for tx_lpi_timer, and so does phylib.
> > Use u32 to store this internally within stmmac rather than "int"
> > which could misinterpret large values.
> >
> > Since eee_timer is used to initialise priv->tx_lpi_timer, this also
> > should be unsigned to avoid a negative number being interpreted as a
> > very large positive number.
> >
> > Also correct "value" in dwmac4_set_eee_lpi_entry_timer() to use u32
> > rather than int, which is derived from tx_lpi_timer, even though
> > masking with STMMAC_ET_MAX will truncate the sign bits. u32 is the
> > value argument type for writel().
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
>
> Reviewed-by: Andrew Lunn <andrew at lunn.ch>
FYI, because of splitting this patch, I've dropped your r-b when
posting v3.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list