lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZFz5Lxc/gUTKkLNX@pop-os.localdomain>
Date:   Thu, 11 May 2023 19:48:23 +0530
From:   Yogesh Hegde <yogi.kernel@...il.com>
To:     Dan Carpenter <dan.carpenter@...aro.org>
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 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ