2022-05-16 23:28:49

by Pavel Skripkin

[permalink] [raw]
Subject: Re: [PATCH 2/3] staging: r8188eu: fix checkpatch.pl warnings in rtw_pwrctrl

Hi Vihas,

On 5/16/22 20:03, Vihas Makwana wrote:
> Refactor the code to fix following warnings:
> WARNING: Comparisons should place the constant on the right side of the test
>
> Signed-off-by: Vihas Makwana <[email protected]>
> ---

[code snip]

> if ((pwrpriv->smart_ps == smart_ps) &&
> @@ -356,7 +356,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
>
> pwrctrlpriv->LpsIdleCount = 0;
> pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/* PS_MODE_MIN; */
> - pwrctrlpriv->bLeisurePs = PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt;
> + pwrctrlpriv->bLeisurePs = pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
>

Please remove extra space




With regards,
Pavel Skripkin


2022-05-18 04:01:15

by Vihas Makwana

[permalink] [raw]
Subject: Re: [PATCH 2/3] staging: r8188eu: fix checkpatch.pl warnings in rtw_pwrctrl

On Tue, May 17, 2022 at 1:15 AM Pavel Skripkin <[email protected]> wrote:
>
> Hi Vihas,
>
> On 5/16/22 20:03, Vihas Makwana wrote:
> > Refactor the code to fix following warnings:
> > WARNING: Comparisons should place the constant on the right side of the test
> >
> > Signed-off-by: Vihas Makwana <[email protected]>
> > ---
>
> [code snip]
>
> > if ((pwrpriv->smart_ps == smart_ps) &&
> > @@ -356,7 +356,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
> >
> > pwrctrlpriv->LpsIdleCount = 0;
> > pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/* PS_MODE_MIN; */
> > - pwrctrlpriv->bLeisurePs = PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt;
> > + pwrctrlpriv->bLeisurePs = pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
> >
>
> Please remove extra space
>
Oh sorry, my bad. Will submit a v2.
>
>
> With regards,
> Pavel Skripkin



--
Thanks,
Vihas