linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Jes Sorensen <Jes.Sorensen@gmail.com>
Subject: RE: [PATCH] wifi: rtl8xxxu: Support new chip RTL8710BU aka RTL8188GU
Date: Wed, 22 Feb 2023 01:16:20 +0000	[thread overview]
Message-ID: <d7e2cb860ca745dbb7b9ec428581af7a@realtek.com> (raw)
In-Reply-To: <1de98de1-1c54-b6b1-b394-cafe8fa4d5f8@gmail.com>



> -----Original Message-----
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Sent: Wednesday, February 22, 2023 2:50 AM
> To: Ping-Ke Shih <pkshih@realtek.com>; linux-wireless@vger.kernel.org
> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>
> Subject: Re: [PATCH] wifi: rtl8xxxu: Support new chip RTL8710BU aka RTL8188GU
> 
> On 21/02/2023 04:45, Ping-Ke Shih wrote:
> >
> >
> >> -----Original Message-----
> >> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> >> Sent: Tuesday, February 21, 2023 12:11 AM
> >> To: linux-wireless@vger.kernel.org
> >> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>
> >> Subject: [PATCH] wifi: rtl8xxxu: Support new chip RTL8710BU aka RTL8188GU
> >>
> >> +
> >> +       do
> >> +               val32 = rtl8xxxu_read32(priv, REG_EFUSE_INDIRECT_CTRL_8710B);
> >> +       while ((val32 & BIT(31)) && (--polling_count > 0));
> >
> > Without a pair of brace, that looks a little odd to me, but the result should
> > be correct.
> >
> I think the rule is that we should not use braces when there is a single
> line inside. I assumed that applies to do...while loops too.

I give it a try about this, and the results are

checkpatch warns 'while':

+       while (1) {
+               x = 1;
+       }


But, don't warn 'do...while'. (your case)

+       do {
+               x = 1;
+       } while (1);


Looking into checkpatch, I found it checks single statement under these
conditions 'if|while|for|else'.


Ping-Ke


  reply	other threads:[~2023-02-22  1:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 16:10 [PATCH] wifi: rtl8xxxu: Support new chip RTL8710BU aka RTL8188GU Bitterblue Smith
2023-02-21  2:45 ` Ping-Ke Shih
2023-02-21 18:49   ` Bitterblue Smith
2023-02-22  1:16     ` Ping-Ke Shih [this message]
2023-02-27  9:18 ` Jiajie Chen
2023-02-27 12:30   ` Bitterblue Smith
2023-02-28  1:38     ` Jiajie Chen

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=d7e2cb860ca745dbb7b9ec428581af7a@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Jes.Sorensen@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@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;
as well as URLs for NNTP newsgroup(s).