From: Phillip Potter <phil@philpotter.co.uk>
To: Michael Straube <straube.linux@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
Larry Finger <Larry.Finger@lwfinger.net>,
Martin Kaiser <martin@kaiser.cx>,
linux-staging@lists.linux.dev,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] staging: r8188eu: convert return type of Hal_GetChnlGroup88E() to void
Date: Sat, 14 Aug 2021 18:12:27 +0100 [thread overview]
Message-ID: <CAA=Fs0mfUYvDo6jEHVbOz7MkFDpKd_M+xwyELd0jdw-8TP3i6g@mail.gmail.com> (raw)
In-Reply-To: <20210813073109.25609-3-straube.linux@gmail.com>
On Fri, 13 Aug 2021 at 08:32, Michael Straube <straube.linux@gmail.com> wrote:
>
> After the removal of 5GHz code from Hal_GetChnlGroup88E() the function
> always returns true now. Convert the return type to void and change the
> only user Hal_ReadTxPowerInfo88E() accordingly.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> .../staging/r8188eu/hal/rtl8188e_hal_init.c | 30 ++++++++-----------
> 1 file changed, 13 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> index 634a0a022727..d3345fa0eb60 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> @@ -2060,7 +2060,7 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G,
> }
> }
>
> -static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup)
> +static void Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup)
> {
> if (chnl < 3) /* Channel 1-2 */
> *pGroup = 0;
> @@ -2074,8 +2074,6 @@ static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup)
> *pGroup = 4;
> else if (chnl == 14) /* Channel 14 */
> *pGroup = 5;
> -
> - return true;
> }
>
> void Hal_ReadPowerSavingMode88E(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail)
> @@ -2107,7 +2105,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto
> struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
> struct txpowerinfo24g pwrInfo24G;
> u8 rfPath, ch, group;
> - u8 bIn24G, TxCount;
> + u8 TxCount;
>
> Hal_ReadPowerValueFromPROM_8188E(&pwrInfo24G, PROMContent, AutoLoadFail);
>
> @@ -2116,19 +2114,17 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto
>
> for (rfPath = 0; rfPath < pHalData->NumTotalRFPath; rfPath++) {
> for (ch = 0; ch < CHANNEL_MAX_NUMBER; ch++) {
> - bIn24G = Hal_GetChnlGroup88E(ch, &group);
> - if (bIn24G) {
> - pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group];
> - if (ch == 14)
> - pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][4];
> - else
> - pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][group];
> - }
> - if (bIn24G) {
> - DBG_88E("======= Path %d, Channel %d =======\n", rfPath, ch);
> - DBG_88E("Index24G_CCK_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_CCK_Base[rfPath][ch]);
> - DBG_88E("Index24G_BW40_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_BW40_Base[rfPath][ch]);
> - }
> + Hal_GetChnlGroup88E(ch, &group);
> +
> + pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group];
> + if (ch == 14)
> + pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][4];
> + else
> + pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][group];
> +
> + DBG_88E("======= Path %d, Channel %d =======\n", rfPath, ch);
> + DBG_88E("Index24G_CCK_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_CCK_Base[rfPath][ch]);
> + DBG_88E("Index24G_BW40_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_BW40_Base[rfPath][ch]);
> }
> for (TxCount = 0; TxCount < MAX_TX_COUNT; TxCount++) {
> pHalData->CCK_24G_Diff[rfPath][TxCount] = pwrInfo24G.CCK_Diff[rfPath][TxCount];
> --
> 2.32.0
>
Dear Michael,
Looks good to me, thanks.
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Regards,
Phil
next prev parent reply other threads:[~2021-08-14 17:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 7:31 [PATCH 0/4] staging: r8188eu: refactor Hal_GetChnlGroup88E() Michael Straube
2021-08-13 7:31 ` [PATCH 1/4] staging: r8188eu: remove 5GHz code from Hal_GetChnlGroup88E() Michael Straube
2021-08-13 16:27 ` Fabio M. De Francesco
2021-08-13 18:25 ` Michael Straube
2021-08-14 17:11 ` Phillip Potter
2021-08-13 7:31 ` [PATCH 2/4] staging: r8188eu: convert return type of Hal_GetChnlGroup88E() to void Michael Straube
2021-08-14 17:12 ` Phillip Potter [this message]
2021-08-13 7:31 ` [PATCH 3/4] staging: r8188eu: rename parameter of Hal_GetChnlGroup88E() Michael Straube
2021-08-14 17:12 ` Phillip Potter
2021-08-13 7:31 ` [PATCH 4/4] staging: r8188eu: rename Hal_GetChnlGroup88E() Michael Straube
2021-08-14 17:13 ` Phillip Potter
2021-08-13 9:44 ` [PATCH 0/4] staging: r8188eu: refactor Hal_GetChnlGroup88E() Martin Kaiser
2021-08-14 6:30 ` Michael Straube
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='CAA=Fs0mfUYvDo6jEHVbOz7MkFDpKd_M+xwyELd0jdw-8TP3i6g@mail.gmail.com' \
--to=phil@philpotter.co.uk \
--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=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;
as well as URLs for NNTP newsgroup(s).