OSDN Git Service

pinctrl: rzn1: Fix check for used MDIO bus
authorPhil Edworthy <phil.edworthy@renesas.com>
Fri, 23 Nov 2018 10:54:27 +0000 (10:54 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 4 Dec 2018 09:33:08 +0000 (10:33 +0100)
This fixes the check for unused mdio bus setting and the following static
checker warning:
 drivers/pinctrl/pinctrl-rzn1.c:198 rzn1_pinctrl_mdio_select()
 warn: always true condition '(ipctl->mdio_func[mdio] >= 0) => (0-u32max >= 0)'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/pinctrl-rzn1.c

index 57886dc..a04235e 100644 (file)
@@ -112,7 +112,7 @@ struct rzn1_pinctrl {
        struct rzn1_pinctrl_regs __iomem *lev2;
        u32 lev1_protect_phys;
        u32 lev2_protect_phys;
-       u32 mdio_func[2];
+       int mdio_func[2];
 
        struct rzn1_pin_group *groups;
        unsigned int ngroups;