staging: rtl8723bs: fix remaining checkpatch.pl
v2 cover staging: rtl8723bs: fix remaining checkpatch.pl
This series addresses the style issues that were rejected in the previous v1 series (Patch 3/10 and Patch 6/10). The other 8 patches have been accepted into staging-next.
In this v2 series I have restructured fixes to apply one logical change per patch across multiple files instead of grouping by file, as suggested
by Greg KH.
Changes in v2:
- Fix open parenthesis alignment.
- Remove multiple blank lines.
- Add missing blank line after declaration.
- Fix line length issues by redistributing comments.
Files touched:
- HalHWImg8723B_BB.c
- HalHWImg8723B_MAC.c
Mahad Ibrahim (4):
staging: rtl8723bs: fix open parenthesis alignment
staging: rtl8723bs: fix multiple blank line check
staging: rtl8723bs: fix missing blank line after declaration
staging: rtl8723bs: fix line length check
drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 5 +---- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 10 deletions(-)
Signature · 1 line
2.47.3
PATCH v2 1/4 staging: rtl8723bs: fix open parenthesis alignment
Fix checkpatch.pl check regarding:
- Lines should not end with a '('
Collapse the multi-line function signature of CheckPositive() into a single line to adhere to kernel coding standards.
--- drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 4 +--- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c +1 -3
@@ -8,9 +8,7 @@#include <linux/kernel.h> #include "odm_precomp.h" -static bool CheckPositive ( -struct dm_odm_t *pDM_Odm,const u32 Condition1,const u32 Condition2 -) +static bool CheckPositive (struct dm_odm_t *pDM_Odm,const u32 Condition1,const u32 Condition2) {u8 _BoardType = ((pDM_Odm->BoardType & BIT4) >> 4) << 0 | /* _GLNA */
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +1 -3
@@ -8,9 +8,7 @@#include <linux/kernel.h> #include "odm_precomp.h" -static bool CheckPositive ( -struct dm_odm_t *pDM_Odm,const u32 Condition1,const u32 Condition2 -) +static bool CheckPositive (struct dm_odm_t *pDM_Odm,const u32 Condition1,const u32 Condition2) {u8 _BoardType = ((pDM_Odm->BoardType & BIT4) >> 4) << 0 | /* _GLNA */
Signature · 1 line
2.47.3
PATCH v2 2/4 staging: rtl8723bs: fix multiple blank line check
In reply to Mahad IbrahimFix checkpatch.pl check regarding:
- Please don't use multiple blank lines
Remove multiple blank lines to adhere to kernel coding standards.
--- drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 1 - drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 1 - 2 files changed, 2 deletions(-)
drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c +0 -1
@@ -31,7 +31,6 @@ static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, const pDM_Odm->TypeALNA <<16 | pDM_Odm->TypeAPA <<24 ; -/* Value Defined Check =============== */ /* QFN Type [15:12] and Cut Version [27:24] need to do value check */
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +0 -1
@@ -31,7 +31,6 @@ static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, const pDM_Odm->TypeALNA <<16 | pDM_Odm->TypeAPA <<24 ; -/* Value Defined Check =============== */ /* QFN Type [15:12] and Cut Version [27:24] need to do value check */
Signature · 1 line
2.47.3
PATCH v2 3/4 staging: rtl8723bs: fix missing blank line after declaration
In reply to Mahad IbrahimFix checkpatch.pl warning regarding:
- Missing a blank line after declarations
Adhere to kernel coding standards by adding a blank line after variable declaration.
--- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +1 -0
@@ -47,6 +47,7 @@ static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, constif ((cond1 & driver1) == cond1) {u32 bitMask =0 ; +if ((cond1 &0x0F ) ==0 )/* BoardType is DONTCARE */ return true;
Signature · 1 line
2.47.3
PATCH v2 4/4 staging: rtl8723bs: fix line length check
In reply to Mahad IbrahimFix checkpatch.pl check regarding:
- Line length of X exceeds 100 columns
Redistribute comments to multiple lines to adhere to kernel coding standards.
--- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +6 -2
@@ -60,7 +60,8 @@ static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, constif ((cond1 &BIT3 ) !=0 )/* APA */ bitMask |=0xFF000000 ; -if ((cond2 & bitMask) == (driver2 & bitMask))/* BoardType of each RF path is matched */ +/* BoardType of each RF path is matched */ +if ((cond2 & bitMask) == (driver2 & bitMask))return true; }return false;
@@ -210,7 +211,10 @@ void ODM_ReadAndConfig_MP_8723B_MAC_REG(struct dm_odm_t *pDM_Odm) }if (!bMatched) { -/* Condition isn't matched. Discard the following (offset, data) pairs. */ +/* +* Condition isn't matched. +* Discard the following (offset, data) pairs. +*/ while (v1 <0x40000000 && i < ArrayLen -2 )READ_NEXT_PAIR (v1, v2, i);
Signature · 1 line
2.47.3
Greg KH
maintainerRe: [PATCH v2 4/4] staging: rtl8723bs: fix line length check
Quoted 16 lines · Mahad Ibrahim
Fix checkpatch.pl check regarding:
- Line length of X exceeds 100 columnsRedistribute comments to multiple lines to adhere to kernel coding standards.
Signed-off-by Mahad Ibrahim <[email protected]>--- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +0
-0
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, const · line 63
Quoted 5 lines
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +1
-1@@ -60,7 +60,8 @@ static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, constif ((cond1 &BIT3 ) !=0 )/* APA */ bitMask |=0xFF000000 ; -if ((cond2 & bitMask) == (driver2 & bitMask))/* BoardType of each RF path is matched */ +/* BoardType of each RF path is matched */
Why the extra space after /* and before BoardType?
thanks,
greg k-h
Re: [PATCH v2 4/4] staging: rtl8723bs: fix line length check
Quoted 8 lines · Greg KH
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, const · line 63
Quoted 2 lines
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +1
-1-if ((cond2 & bitMask) == (driver2 & bitMask))/* BoardType of each RF path is matched */ +/* BoardType of each RF path is matched */ Why the extra space after /* and before BoardType?
thanks,
greg k-h
Thank you for the review.
I included it to match the existing comment style prevalent in this specific file. Not adding it would have caused inconsistency.
However I realize this violates the kernel coding standards.
I will send a v3 series that addresses this issue, as well as fix the line comment style in that file as a separate logical change.
thanks,
Mahad Ibrahim