DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] staging: rtl8188eu: cleanup long line in odm.c
@ 2020-03-25 21:59 Michael Straube
  2020-03-26  0:08 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Straube @ 2020-03-25 21:59 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Larry.Finger

Cleanup line over 80 characters by removing unnecessary parentheses.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8188eu/hal/odm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c
index a6eb9798b6f8..ed1a6ea0eecf 100644
--- a/drivers/staging/rtl8188eu/hal/odm.c
+++ b/drivers/staging/rtl8188eu/hal/odm.c
@@ -590,7 +590,7 @@ void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
 	if (pDM_Odm->bLinked) {
 		if (pDM_Odm->RSSI_Min > 25) {
 			CurCCK_CCAThres = 0xcd;
-		} else if ((pDM_Odm->RSSI_Min <= 25) && (pDM_Odm->RSSI_Min > 10)) {
+		} else if (pDM_Odm->RSSI_Min <= 25 && pDM_Odm->RSSI_Min > 10) {
 			CurCCK_CCAThres = 0x83;
 		} else {
 			if (FalseAlmCnt->Cnt_Cck_fail > 1000)
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rtl8188eu: cleanup long line in odm.c
  2020-03-25 21:59 [PATCH] staging: rtl8188eu: cleanup long line in odm.c Michael Straube
@ 2020-03-26  0:08 ` Joe Perches
  2020-03-26  8:45   ` Michael Straube
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2020-03-26  0:08 UTC (permalink / raw)
  To: Michael Straube, gregkh; +Cc: devel, linux-kernel, Larry.Finger

On Wed, 2020-03-25 at 22:59 +0100, Michael Straube wrote:
> Cleanup line over 80 characters by removing unnecessary parentheses.
[]
> diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c
[]
> @@ -590,7 +590,7 @@ void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
>  	if (pDM_Odm->bLinked) {
>  		if (pDM_Odm->RSSI_Min > 25) {
>  			CurCCK_CCAThres = 0xcd;
> -		} else if ((pDM_Odm->RSSI_Min <= 25) && (pDM_Odm->RSSI_Min > 10)) {
> +		} else if (pDM_Odm->RSSI_Min <= 25 && pDM_Odm->RSSI_Min > 10) {

The test above this already guarantees pDM_Odm->RSSI_Min <= 25
so the block could be written just

		} else if (pDM->RSSI_Min > 10) {

>  			CurCCK_CCAThres = 0x83;
>  		} else {
>  			if (FalseAlmCnt->Cnt_Cck_fail > 1000)

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rtl8188eu: cleanup long line in odm.c
  2020-03-26  0:08 ` Joe Perches
@ 2020-03-26  8:45   ` Michael Straube
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Straube @ 2020-03-26  8:45 UTC (permalink / raw)
  To: Joe Perches, gregkh; +Cc: devel, linux-kernel, Larry.Finger



On 2020-03-26 01:08, Joe Perches wrote:
> On Wed, 2020-03-25 at 22:59 +0100, Michael Straube wrote:
>> Cleanup line over 80 characters by removing unnecessary parentheses.
> []
>> diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c
> []
>> @@ -590,7 +590,7 @@ void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
>>   	if (pDM_Odm->bLinked) {
>>   		if (pDM_Odm->RSSI_Min > 25) {
>>   			CurCCK_CCAThres = 0xcd;
>> -		} else if ((pDM_Odm->RSSI_Min <= 25) && (pDM_Odm->RSSI_Min > 10)) {
>> +		} else if (pDM_Odm->RSSI_Min <= 25 && pDM_Odm->RSSI_Min > 10) {
> 
> The test above this already guarantees pDM_Odm->RSSI_Min <= 25
> so the block could be written just
> 
> 		} else if (pDM->RSSI_Min > 10) {
> 

Ah, yes. Thank you. :)
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 21:59 [PATCH] staging: rtl8188eu: cleanup long line in odm.c Michael Straube
2020-03-26  0:08 ` Joe Perches
2020-03-26  8:45   ` Michael Straube

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git