All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	"Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	"open list:STAGING SUBSYSTEM" <linux-staging@lists.linux.dev>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] staging: r8188eu: remove local variable Indexforchannel
Date: Mon, 30 Aug 2021 01:17:40 +0100	[thread overview]
Message-ID: <CAA=Fs0maUfQ9ZybeaifcNHyzzCGPS-UPhPMFY_14v9xZ=to8JA@mail.gmail.com> (raw)
In-Reply-To: <20210829175624.5915-1-straube.linux@gmail.com>

On Sun, 29 Aug 2021 at 18:56, Michael Straube <straube.linux@gmail.com> wrote:
>
> The local variable Indexforchannel in function
> odm_TXPowerTrackingCallback_ThermalMeter_8188E() is initilaized to 0
> and never changed. Remove the variable and replace its usage with 0.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
>  drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> index 356885e27edd..1b0e1e7307cd 100644
> --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> @@ -110,7 +110,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
>         bool is2t = false;
>
>         u8 OFDM_min_index = 6, rf; /* OFDM BB Swing should be less than +3.0dB, which is required by Arthur */
> -       u8 Indexforchannel = 0/*GetRightChnlPlaceforIQK(pHalData->CurrentChannel)*/;
>         s8 OFDM_index_mapping[2][index_mapping_NUM_88E] = {
>                 {0, 0, 2, 3, 4, 4,              /* 2.4G, decrease power */
>                 5, 6, 7, 7, 8, 9,
> @@ -280,8 +279,8 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
>
>                                 /* Adujst OFDM Ant_A according to IQK result */
>                                 ele_D = (OFDMSwingTable[(u8)OFDM_index[0]] & 0xFFC00000) >> 22;
> -                               X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][0];
> -                               Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][1];
> +                               X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][0];
> +                               Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][1];
>
>                                 /*  Revse TX power table. */
>                                 dm_odm->BbSwingIdxOfdm          = (u8)OFDM_index[0];
> @@ -315,8 +314,8 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
>                                         ele_D = (OFDMSwingTable[(u8)OFDM_index[1]] & 0xFFC00000) >> 22;
>
>                                         /* new element A = element D x X */
> -                                       X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][4];
> -                                       Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][5];
> +                                       X = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][4];
> +                                       Y = dm_odm->RFCalibrateInfo.IQKMatrixRegSetting[0].Value[0][5];
>
>                                         if ((X != 0) && (*dm_odm->pBandType == ODM_BAND_2_4G)) {
>                                                 if ((X & 0x00000200) != 0)      /* consider minus */
> --
> 2.33.0
>

Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

  parent reply	other threads:[~2021-08-30  0:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29 17:56 [PATCH 1/2] staging: r8188eu: remove local variable Indexforchannel Michael Straube
2021-08-29 17:56 ` [PATCH 2/2] staging: r8188eu: refactor field of struct odm_rf_cal Michael Straube
2021-08-30  0:19   ` Phillip Potter
2021-08-30  0:19     ` Phillip Potter
2021-08-30  0:17 ` Phillip Potter [this message]
2021-08-30  0:17   ` [PATCH 1/2] staging: r8188eu: remove local variable Indexforchannel Phillip Potter

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=Fs0maUfQ9ZybeaifcNHyzzCGPS-UPhPMFY_14v9xZ=to8JA@mail.gmail.com' \
    --to=phil@philpotter.co.uk \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.