From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A01D0ED9 for ; Wed, 27 Jul 2022 12:47:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBCAAC433D6; Wed, 27 Jul 2022 12:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658926051; bh=XuFtqN23dSuIFq0y8p4ETr/6CgsJu41LfPO3wuUj/lY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yeunWGh0a5i/Djb0trgDdUL+hy2MDxqaZrOOCm91Jn0Olo2lWsYiDcNiBD974/r9r AhMrHqGaMPI4pYsS0azgpSUffKtA5TReurhfdtFX2QL8YvUlgCLmDsPjeycy9tAPAY T0/miobKalnlMbuY4EYxjFQKOd9pQsATejIHUHOw= Date: Wed, 27 Jul 2022 14:47:28 +0200 From: Greg KH To: Dan Carpenter Cc: Phillip Potter , Larry.Finger@lwfinger.net, paskripkin@gmail.com, straube.linux@gmail.com, martin@kaiser.cx, abdun.nihaal@gmail.com, philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: r8188eu: convert rtw_pwr_wakeup to correct error code semantics Message-ID: References: <20220725220745.12739-1-phil@philpotter.co.uk> <20220727124342.GR2316@kadam> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220727124342.GR2316@kadam> 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