Re: [PATCH 1/4] staging: rtl8192e: Rename tmpRegA and TempCCk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 10, 2023 at 07:56:29PM +0300, Dan Carpenter wrote:
> 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

Thank you for taking the time to review my patch and provide your
feedback. Your suggestions are duly noted, and I appreciate your 
guidance.

I will make them into separate patches and submit it. 

Thank you for your time and valuable input.

Regards 
Yogesh




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux