net: phy: at803x: Avoid comparison is always false warning
authorAndrew Lunn <andrew@lunn.ch>
Tue, 7 Jul 2020 01:49:33 +0000 (03:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jul 2020 19:47:10 +0000 (12:47 -0700)
commit3f2edd309ff02c973bc3cb815c87def07a1ac804
tree3908ae82700cb13a260e358e8a21c2dd42f6f94c
parent5411ca7178d40d94e009f3a00f10e20e6067037c
net: phy: at803x: Avoid comparison is always false warning

By placing the GENMASK value into an unsigned int and then passing it
to PREF_FIELD, the type is reduces down from ULL. Given the reduced
size of the type, the range checks in PREP_FAIL() are always true, and
-Wtype-limits then gives a warning.

By skipping the intermediate variable, the warning can be avoided.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c