mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Michael Straube <straube.linux@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	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 22:02:20 +0200	[thread overview]
Message-ID: <20220919200220.c2cslbua6defxmwb@viti.kaiser.cx> (raw)
In-Reply-To: <8b17ac60-b2ec-26eb-d82c-9770e9733cdf@gmail.com>

Hi Michael,

Thus wrote Michael Straube (straube.linux@gmail.com):

> 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.

you're right. I wanted to kick off the bSurpriseRemoved cleanup with a
simple patch and wait for people's comments. I'll do SwLedOff when this
one's accepted.

Thanks,
Martin

  reply	other threads:[~2022-09-19 20:02 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
2022-09-19 20:02     ` Martin Kaiser [this message]
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=20220919200220.c2cslbua6defxmwb@viti.kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /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®