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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1CF27D55-EEB4-4A75-B767-A30845BD5E1B@gmail.com>
Date:   Thu, 12 Mar 2020 03:58:55 +0530
From:   Shreeya Patel <shreeya.patel23498@...il.com>
To:     Joe Perches <joe@...ches.com>, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        outreachy-kernel@...glegroups.com, sbrivio@...hat.com,
        daniel.baluta@...il.com, nramas@...ux.microsoft.com,
        hverkuil@...all.nl, Larry.Finger@...inger.net
Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions

Hey Joe,

On March 11, 2020 10:56:29 PM GMT+05:30, Joe Perches <joe@...ches.com> wrote:
>On Wed, 2020-03-11 at 19:08 +0530, Shreeya Patel wrote:
>> Remove if and else conditions since both are leading to the
>> initialization of "valueDMATimeout" and "valueDMAPageCount" with
>> the same value.
>
>You might consider removing the
>	/* Timeout value is calculated by 34 / (2^n) */
>comment entirely as it doesn't make much sense.
>

You want me to remove the other comments as well?
Since Julia suggested in another email that the comments are not useful if we are removing the condition since they were applied to only one branch ( i.e. "if" branch )


Thanks

>For what N is "(34 / (2 ^ N))" = 6 ?
>
>> diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
>b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
>[]
>> @@ -551,18 +551,11 @@ static void HalRxAggr8723BSdio(struct adapter
>*padapter)
>>  
>>  	pregistrypriv = &padapter->registrypriv;
>>  
>> -	if (pregistrypriv->wifi_spec) {
>> -		/*  2010.04.27 hpfan */
>> -		/*  Adjust RxAggrTimeout to close to zero disable RxAggr,
>suggested by designer */
>> -		/*  Timeout value is calculated by 34 / (2^n) */
>> -		valueDMATimeout = 0x06;
>> -		valueDMAPageCount = 0x06;
>> -	} else {
>> -		/*  20130530, Isaac@SD1 suggest 3 kinds of parameter */
>> -		/*  TX/RX Balance */
>> -		valueDMATimeout = 0x06;
>> -		valueDMAPageCount = 0x06;
>> -	}
>> +	/*  2010.04.27 hpfan */
>> +	/*  Adjust RxAggrTimeout to close to zero disable RxAggr, suggested
>by designer */
>> +	/*  Timeout value is calculated by 34 / (2^n) */
>> +	valueDMATimeout = 0x06;
>> +	valueDMAPageCount = 0x06;

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ