[bug report] pinctrl: renesas: Renesas RZ/N1 pinctrl driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Phil Edworthy,

The patch 4e53b5004745: "pinctrl: renesas: Renesas RZ/N1 pinctrl
driver" from Sep 26, 2018, leads to 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)'

drivers/pinctrl/pinctrl-rzn1.c
   195  static void rzn1_pinctrl_mdio_select(struct rzn1_pinctrl *ipctl, int mdio,
   196                                       u32 func)
   197  {
   198          if (ipctl->mdio_func[mdio] >= 0 && ipctl->mdio_func[mdio] != func)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
We could change this to != -1 or change the type or something.

   199                  dev_warn(ipctl->dev, "conflicting setting for mdio%d!\n", mdio);
   200          ipctl->mdio_func[mdio] = func;
   201  
   202          dev_dbg(ipctl->dev, "setting mdio%d to %u\n", mdio, func);
   203  
   204          writel(func, &ipctl->lev2->l2_mdio[mdio]);
   205  }

regards,
dan carpenter



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux