[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <290473de-5946-49d4-9309-6bebf7cc9873@kili.mountain>
Date: Wed, 10 May 2023 19:56:29 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Yogesh Hegde <yogi.kernel@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] staging: rtl8192e: Rename tmpRegA and TempCCk
On Wed, May 10, 2023 at 08:39:07PM +0530, Yogesh Hegde wrote:
> @@ -680,17 +680,17 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
> return;
> }
>
> - tmpRegA = rtl92e_get_rf_reg(dev, RF90_PATH_A, 0x12, 0x078);
> - if (tmpRegA < 3 || tmpRegA > 13)
> + tmp_reg = rtl92e_get_rf_reg(dev, RF90_PATH_A, 0x12, 0x078);
> + if (tmp_reg < 3 || tmp_reg > 13)
> return;
> - if (tmpRegA >= 12)
> - tmpRegA = 12;
> + if (tmp_reg >= 12)
> + tmp_reg = 12;
Not related to your patch (which is fine) but this if statement can be
deleted.
> priv->thermal_meter[0] = ThermalMeterVal;
> priv->thermal_meter[1] = ThermalMeterVal;
>
> - if (priv->thermal_meter[0] >= (u8)tmpRegA) {
> + if (priv->thermal_meter[0] >= (u8)tmp_reg) {
And casting tmp_reg to u8 is nonsense so that casting can be deleted too.
2 separate patches:
patch 1: delete unecessary if statement
patch 2: delete unecessary casting
regards,
dan carpenter
Powered by blists - more mailing lists