On Thu, Aug 1, 2019 at 1:52 AM Randy Dunlap rdunlap@infradead.org wrote:
However, there are lots of type/cast warnings in both mdio-octeon and mdio-cavium:
../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_probe’: ../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u64)devm_ioremap(&pdev->dev, mdio_phys, regsize); ^
cavium_mdiobus.register_base should be "void __iomem *" instead of "u64", and the cast should be dropped.
In file included from ../drivers/net/phy/mdio-octeon.c:14:0: ../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) ^
... which allows to drop this cast as well.
Casts are evil, and usually a sign that you're doing something wrong.
Gr{oetje,eeting}s,
Geert