Re: RE: [PATCH v4 2/3] reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P)

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

 



Hi ALOK,

On Mon, Apr 14, 2025 at 5:51 PM ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx> wrote:
>
> Hi Fabrizio,
>
> On 14-04-2025 21:13, Fabrizio Castro wrote:
> > Hi Alok,
> >
> > Thanks for your email.
> >
> >> From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
> >> Sent: 14 April 2025 14:46
> >> Subject: Re: [PATCH v4 2/3] reset: Add USB2PHY port reset driver for Renesas RZ/V2H(P)
> >>
> >>
> >>> +static int rzv2h_usbphy_reset_assert(struct reset_controller_dev *rcdev,
> >>> +                                unsigned long id)
> >>> +{
> >>> +   struct rzv2h_usb2phy_reset_priv *priv = rzv2h_usbphy_rcdev_to_priv(rcdev);
> >>> +   struct device *dev = priv->dev;
> >>> +   int ret;
> >>> +
> >>> +   ret = pm_runtime_resume_and_get(dev);
> >>> +   if (ret) {
> >>
> >> nit: it will good if we check similar to reset-rzg2l-usbphy-ctrl.c
> >> pm_runtime_resume_and_get -> 0 on success, or a negative error code
> >> otherwise.
> >> 1 → if the device was resumed and incremented usage count
> >> 0 → if the device was already active or successfully resumed
> >> if (ret < 0)
> >
> > No.
> >
> > As you can see from:
> > https://urldefense.com/v3/__https://github.com/torvalds/linux/blob/master/include/linux/pm_runtime.h*L444__;Iw!!ACWV5N9M2RV99hQ!Ly8gpEBQHhYXOeCcKQavVHfM1XUSy1IubKnHjuQAgvfkK0jrMXc0ebBcvFRvNDcpaJwoUOk1JLLuzih2fLd7JReyapWOouY$
> >
> > pm_runtime_resume_and_get returns a negative error code or 0 (when
> > successful).
> >
> > The same explanation applies to your other comments.
> >
>
> Thanks to you for the explanation.
> I got you point.
>
> so We are keeping different styles of error checks:
> In reset-rzv2h-usb2phy.c, we check using if (error),
> Whereas in reset-rzg2l-usbphy-ctrl.c, we use if (error < 0)."
> https://github.com/torvalds/linux/blob/master/drivers/reset/reset-rzg2l-usbphy-ctrl.c#L148
>
Thanks for pointing that out. I'll update reset-rzg2l-usbphy-ctrl.c to
use the same style of error checks for consistency.

Cheers,
Prabhakar





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux