linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / 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; 4+ messages in thread
From: Michael Straube @ 2020-03-25 21:59 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Michael Straube

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


^ permalink raw reply related	[flat|nested] 4+ 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; 4+ messages in thread
From: Joe Perches @ 2020-03-26  0:08 UTC (permalink / raw)
  To: Michael Straube, gregkh; +Cc: Larry.Finger, devel, linux-kernel

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)


^ permalink raw reply	[flat|nested] 4+ 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; 4+ messages in thread
From: Michael Straube @ 2020-03-26  8:45 UTC (permalink / raw)
  To: Joe Perches, gregkh; +Cc: Larry.Finger, devel, linux-kernel



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. :)

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

* [PATCH] staging: rtl8188eu: cleanup long line in odm.c
@ 2019-03-24 17:21 Michael Straube
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2019-03-24 17:21 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Michael Straube

Align a comment to clear a line over 80 characters
checkpatch warning.

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 ba3c3e5a8216..95a8fc23e62c 100644
--- a/drivers/staging/rtl8188eu/hal/odm.c
+++ b/drivers/staging/rtl8188eu/hal/odm.c
@@ -107,7 +107,7 @@ u8 CCKSwingTable_Ch1_Ch13[CCK_TABLE_SIZE][8] = {
 	{0x0a, 0x0a, 0x09, 0x07, 0x05, 0x03, 0x02, 0x01}, /*  29, -14.5dB */
 	{0x0a, 0x09, 0x08, 0x07, 0x05, 0x03, 0x02, 0x01}, /*  30, -15.0dB */
 	{0x09, 0x09, 0x08, 0x06, 0x05, 0x03, 0x01, 0x01}, /*  31, -15.5dB */
-	{0x09, 0x08, 0x07, 0x06, 0x04, 0x03, 0x01, 0x01}	/*  32, -16.0dB */
+	{0x09, 0x08, 0x07, 0x06, 0x04, 0x03, 0x01, 0x01}  /*  32, -16.0dB */
 };
 
 u8 CCKSwingTable_Ch14[CCK_TABLE_SIZE][8] = {
-- 
2.21.0


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

end of thread, other threads:[~2020-03-26  8:47 UTC | newest]

Thread overview: 4+ 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
  -- strict thread matches above, loose matches on Subject: below --
2019-03-24 17:21 Michael Straube

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).