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