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 3/3] wifi: rtl8xxxu: Use u32_get_bits in *_identify_chip
Date: Wed, 9 Nov 2022 00:48:59 +0000 [thread overview]
Message-ID: <49301acbd2264605ae316d61a3a775a4@realtek.com> (raw)
In-Reply-To: <0b053ab0-0760-485f-47df-1ab1705a011c@gmail.com>
> -----Original Message-----
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Sent: Wednesday, November 9, 2022 2:58 AM
> To: linux-wireless@vger.kernel.org
> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>
> Subject: [PATCH 3/3] wifi: rtl8xxxu: Use u32_get_bits in *_identify_chip
>
> It simplifies the code a bit.
>
> Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> This patch should be applied after my older patch:
> "[PATCH v2 2/3] wifi: rtl8xxxu: Split up rtl8xxxu_identify_chip"
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 3 +--
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 5 ++---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 ++---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723a.c | 5 ++---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 5 ++---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_regs.h | 1 -
> 6 files changed, 9 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
> index ef38891ddbd1..2c4f403ba68f 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
> @@ -335,8 +335,7 @@ static int rtl8188fu_identify_chip(struct rtl8xxxu_priv *priv)
> priv->has_wifi = 1;
>
> sys_cfg = rtl8xxxu_read32(priv, REG_SYS_CFG);
> - priv->chip_cut = (sys_cfg & SYS_CFG_CHIP_VERSION_MASK) >>
> - SYS_CFG_CHIP_VERSION_SHIFT;
> + priv->chip_cut = u32_get_bits(sys_cfg, SYS_CFG_CHIP_VERSION_MASK);
Good to use u32_get_bits() instead of FIELD_GET().
I guess you see Kalle reminded me to use u32_encode_bits(), but I forget to
forward this message to you. Anyway, thanks for your works.
[...]
next prev parent reply other threads:[~2022-11-09 0:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 18:54 [PATCH 1/3] wifi: rtl8xxxu: Name some bits used in burst init Bitterblue Smith
2022-11-08 18:56 ` [PATCH 2/3] wifi: rtl8xxxu: Use strscpy instead of sprintf Bitterblue Smith
2022-11-09 0:43 ` Ping-Ke Shih
2022-11-08 18:58 ` [PATCH 3/3] wifi: rtl8xxxu: Use u32_get_bits in *_identify_chip Bitterblue Smith
2022-11-09 0:48 ` Ping-Ke Shih [this message]
2022-11-09 0:41 ` [PATCH 1/3] wifi: rtl8xxxu: Name some bits used in burst init Ping-Ke Shih
2022-11-09 16:40 ` Bitterblue Smith
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=49301acbd2264605ae316d61a3a775a4@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).