[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YuEz4Edtp8J3Honj@kroah.com>
Date: Wed, 27 Jul 2022 14:47:28 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Phillip Potter <phil@...lpotter.co.uk>, Larry.Finger@...inger.net,
paskripkin@...il.com, straube.linux@...il.com, martin@...ser.cx,
abdun.nihaal@...il.com, philipp.g.hortmann@...il.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: r8188eu: convert rtw_pwr_wakeup to correct
error code semantics
On Wed, Jul 27, 2022 at 03:43:42PM +0300, Dan Carpenter wrote:
> On Wed, Jul 27, 2022 at 08:33:14AM +0200, Greg KH wrote:
> > > diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> > > index cf9020a73933..8b1c50668dfe 100644
> > > --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> > > +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> > > @@ -381,24 +381,24 @@ int rtw_pwr_wakeup(struct adapter *padapter)
> > > struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> > > unsigned long timeout = jiffies + msecs_to_jiffies(3000);
> > > unsigned long deny_time;
> > > - int ret = _SUCCESS;
> > > + int ret = 0;
> > >
> > > while (pwrpriv->ps_processing && time_before(jiffies, timeout))
> > > msleep(10);
> > >
> > > /* I think this should be check in IPS, LPS, autosuspend functions... */
> > > if (check_fwstate(pmlmepriv, _FW_LINKED)) {
> > > - ret = _SUCCESS;
> > > + ret = 0;
> >
> > Nit, you don't need to set this again, as you already set it above to 0.
> >
>
> I would sort of prefer to drop the initialization and keep this one.
Fine with me, either works.
greg k-h
Powered by blists - more mailing lists