All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] USB: PHY: JZ4770: Add support for new Ingenic SoCs.
@ 2020-07-28 11:51 dan.carpenter
  2020-07-28 15:47 ` Zhou Yanjie
  0 siblings, 1 reply; 2+ messages in thread
From: dan.carpenter @ 2020-07-28 11:51 UTC (permalink / raw)
  To: zhouyanjie; +Cc: linux-usb

Hello 周琰杰 (Zhou Yanjie),

The patch 2a6c0b82e651: "USB: PHY: JZ4770: Add support for new
Ingenic SoCs." from Jul 23, 2020, leads to the following static
checker warning:

	drivers/usb/phy/phy-jz4770.c:179 ingenic_usb_phy_init()
	error: uninitialized symbol 'reg'.

drivers/usb/phy/phy-jz4770.c
   157  static int ingenic_usb_phy_init(struct usb_phy *phy)
   158  {
   159          struct jz4770_phy *priv = phy_to_jz4770_phy(phy);
   160          int err;
   161          u32 reg;
                    ^^^
   162  
   163          err = regulator_enable(priv->vcc_supply);
   164          if (err) {
   165                  dev_err(priv->dev, "Unable to enable VCC: %d\n", err);
   166                  return err;
   167          }
   168  
   169          err = clk_prepare_enable(priv->clk);
   170          if (err) {
   171                  dev_err(priv->dev, "Unable to start clock: %d\n", err);
   172                  return err;
   173          }
   174  
   175          priv->soc_info->usb_phy_init(phy);
   176  
   177          /* Wait for PHY to reset */
   178          usleep_range(30, 300);
   179          writel(reg & ~USBPCR_POR, priv->base + REG_USBPCR_OFFSET);
                       ^^^
Not initialized any more.

   180          usleep_range(300, 1000);
   181  
   182          return 0;
   183  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] USB: PHY: JZ4770: Add support for new Ingenic SoCs.
  2020-07-28 11:51 [bug report] USB: PHY: JZ4770: Add support for new Ingenic SoCs dan.carpenter
@ 2020-07-28 15:47 ` Zhou Yanjie
  0 siblings, 0 replies; 2+ messages in thread
From: Zhou Yanjie @ 2020-07-28 15:47 UTC (permalink / raw)
  To: dan.carpenter; +Cc: linux-usb

Hello,

在 2020/7/28 下午7:51, dan.carpenter@oracle.com 写道:
> Hello 周琰杰 (Zhou Yanjie),
>
> The patch 2a6c0b82e651: "USB: PHY: JZ4770: Add support for new
> Ingenic SoCs." from Jul 23, 2020, leads to the following static
> checker warning:
>
> 	drivers/usb/phy/phy-jz4770.c:179 ingenic_usb_phy_init()
> 	error: uninitialized symbol 'reg'.
>
> drivers/usb/phy/phy-jz4770.c
>     157  static int ingenic_usb_phy_init(struct usb_phy *phy)
>     158  {
>     159          struct jz4770_phy *priv = phy_to_jz4770_phy(phy);
>     160          int err;
>     161          u32 reg;
>                      ^^^
>     162
>     163          err = regulator_enable(priv->vcc_supply);
>     164          if (err) {
>     165                  dev_err(priv->dev, "Unable to enable VCC: %d\n", err);
>     166                  return err;
>     167          }
>     168
>     169          err = clk_prepare_enable(priv->clk);
>     170          if (err) {
>     171                  dev_err(priv->dev, "Unable to start clock: %d\n", err);
>     172                  return err;
>     173          }
>     174
>     175          priv->soc_info->usb_phy_init(phy);
>     176
>     177          /* Wait for PHY to reset */
>     178          usleep_range(30, 300);
>     179          writel(reg & ~USBPCR_POR, priv->base + REG_USBPCR_OFFSET);
>                         ^^^
> Not initialized any more.
>
>     180          usleep_range(300, 1000);
>     181
>     182          return 0;
>     183  }
>
> regards,
> dan carpenter

Thanks for report this, I will fix this soon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-28 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 11:51 [bug report] USB: PHY: JZ4770: Add support for new Ingenic SoCs dan.carpenter
2020-07-28 15:47 ` Zhou Yanjie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.