mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Martin Kaiser <martin@kaiser.cx>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Pavel Skripkin <paskripkin@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] staging: r8188eu: remove duplicate bSurpriseRemoved check
Date: Mon, 19 Sep 2022 07:36:11 +0200	[thread overview]
Message-ID: <8b17ac60-b2ec-26eb-d82c-9770e9733cdf@gmail.com> (raw)
In-Reply-To: <20220918175700.215170-6-martin@kaiser.cx>

On 9/18/22 19:56, Martin Kaiser wrote:
> We don't have to check bSurpriseRemoved in the SwLedOn function.
> 
> SwLedOn calls rtw_read8 which in turn calls usb_read. This function checks
> bSurpriseRemoved for us.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/core/rtw_led.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
> index 744247af5956..989808a2b171 100644
> --- a/drivers/staging/r8188eu/core/rtw_led.c
> +++ b/drivers/staging/r8188eu/core/rtw_led.c
> @@ -35,7 +35,7 @@ static void SwLedOn(struct adapter *padapter, struct led_priv *pLed)
>   	u8	LedCfg;
>   	int res;
>   
> -	if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
> +	if (padapter->bDriverStopped)
>   		return;
>   
>   	res = rtw_read8(padapter, REG_LEDCFG2, &LedCfg);

Hi Martin,

same could be done in SwLedOff.

regards,
Michael

  reply	other threads:[~2022-09-19  5:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18 17:56 [PATCH 0/6] staging: r8188eu: another round of led layer cleanups Martin Kaiser
2022-09-18 17:56 ` [PATCH 1/6] staging: r8188eu: cancel blink_work during wps stop Martin Kaiser
2022-09-18 17:56 ` [PATCH 2/6] staging: r8188eu: update status before wps success blinking Martin Kaiser
2022-09-18 17:56 ` [PATCH 3/6] staging: r8188eu: remove bLedNoLinkBlinkInProgress Martin Kaiser
2022-09-18 17:56 ` [PATCH 4/6] staging: r8188eu: remove BlinkingLedState Martin Kaiser
2022-09-18 17:56 ` [PATCH 5/6] staging: r8188eu: remove duplicate bSurpriseRemoved check Martin Kaiser
2022-09-19  5:36   ` Michael Straube [this message]
2022-09-19 20:02     ` Martin Kaiser
2022-09-18 17:57 ` [PATCH 6/6] staging: r8188eu: remove two unused enum entries Martin Kaiser
2022-09-19  1:26 ` [PATCH 0/6] staging: r8188eu: another round of led layer cleanups Philipp Hortmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b17ac60-b2ec-26eb-d82c-9770e9733cdf@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®