From: Trent Piepho Date: Wed, 22 May 2019 18:43:24 +0000 (+0000) Subject: net: phy: dp83867: Use unsigned variables to store unsigned properties X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1b9b295435c38bfb3936ad6033595ead4aa51c0e;p=openwrt%2Fstaging%2Fblogic.git net: phy: dp83867: Use unsigned variables to store unsigned properties The variables used to store u32 DT properties were signed ints. This doesn't work properly if the value of the property were to overflow. Use unsigned variables so this doesn't happen. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index fc5baa5d14d0..59051b0f5be9 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -93,9 +93,9 @@ enum { }; struct dp83867_private { - int rx_id_delay; - int tx_id_delay; - int fifo_depth; + u32 rx_id_delay; + u32 tx_id_delay; + u32 fifo_depth; int io_impedance; int port_mirroring; bool rxctrl_strap_quirk;