staging: rtl8723bs: efuse cleanup and brace fix
v5 cover staging: rtl8723bs: efuse cleanup and brace fix
This series cleans up the rtl8723bs efuse helpers and fixes the brace/comment spacing issue in rtw_efuse.c. The series has been rechecked, sent to myself, and compile-tested.
Patch 1 reflows the rtw_efuse_read_1_byte() signature to a single line and fixes the brace/comment spacing at the end of the function.
Patch 2 adds braces around the else clause in rtw_efuse.c.
Patch 3 reflows the rtw_efuse_one_byte_read() signature to a single line.
Changes from v1 to v2:
1)Reworked the efuse helper signatures to improve
line length and coding style.
2) Split the cleanup into smaller patches.
3) Fixed the missing brace/comment spacing issue in rtw_efuse.c.
Changes from v2 to v3:
1) Addressed review feedback on the efuse cleanup.
2) Kept the brace fix separate from the helper signature cleanup.
3) Reordered the patches to keep the series easier to review.
Changes from v3 to v4:
1) Folded related cleanup into a more coherent series.
2) Adjusted the patch boundaries.
3) Rechecked the series for style and build correctness.
Changes from v4 to v5:
1) Squashed the redundant efuse brace/comment fix into the final series.
2) Kept the series at 3 patches plus cover letter.
3) Re-ran checkpatch and compile-tested the rtl8723bs build.
4) Addressed Dan Carpenter’s concern about the previous version of the brace fix.
Moksh Panicker (3):
staging: rtl8723bs: reformat rtw_efuse_read_1_byte() signature
staging: rtl8723bs: add braces to else clause in rtw_efuse.c
staging: rtl8723bs: reformat rtw_efuse_one_byte_read() signature
drivers/staging/rtl8723bs/core/rtw_efuse.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
Signature · 1 line
2.34.1
PATCH v5 1/3 staging: rtl8723bs: reformat rtw_efuse_read_1_byte() signature
Reformat multi-line function signature to a single line to fix line length and coding style warnings from checkpatch.pl.
Also fix the missing brace/comment spacing in rtw_efuse_read_1_byte().
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +2 -5
@@ -41,10 +41,7 @@ rtw_efuse_calculate_word_counts(u8 word_en)* 09/23/2008 MHC Copy from WMAC. * */ -u8 -rtw_efuse_read_1_byte ( -struct adapter *Adapter, -u16 Address) +u8 rtw_efuse_read_1_byte (struct adapter *Adapter,u16 Address) {u8 Bytetemp = {0x00 };u8 temp = {0x00 };
@@ -78,7 +75,7 @@ u16 Address)return rtw_read8 (Adapter,EFUSE_CTRL ); }else return 0xFF ; - + } }/* rtw_efuse_read_1_byte */ /* 11/16/2008 MH Read one byte from real Efuse. */
Signature · 1 line
2.34.1
Re: [PATCH v5 1/3] staging: rtl8723bs: reformat rtw_efuse_read_1_byte() signature
Quoted 27 lines · Moksh Panicker
Reformat multi-line function signature to a single line to fix line length and coding style warnings from checkpatch.pl.
Also fix the missing brace/comment spacing in
rtw_efuse_read_1_byte().Signed-off-by Moksh Panicker <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/staging/rtl8723bs/core/rtw_efuse.c +1
-4@@ -41,10 +41,7 @@ rtw_efuse_calculate_word_counts(u8 word_en)* 09/23/2008 MHC Copy from WMAC. * */ -u8 -rtw_efuse_read_1_byte ( -struct adapter *Adapter, -u16 Address) +u8 rtw_efuse_read_1_byte (struct adapter *Adapter,u16 Address) {u8 Bytetemp = {0x00 };u8 temp = {0x00 };
drivers/staging/rtl8723bs/core/rtw_efuse.c u16 Address) · line 78
Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_efuse.c +1
-1@@ -78,7 +75,7 @@ u16 Address)return rtw_read8 (Adapter,EFUSE_CTRL ); }else return 0xFF ; - + }
No. You're not compile testing your patches. This is the fifth version and you're still breaking the build. Take a break and come back in a few days or something.
regards,
dan carpenter
Re: [PATCH v5 1/3] staging: rtl8723bs: reformat rtw_efuse_read_1_byte() signature
Thanks for the review. I’ll reproduce the build failure locally, fix the issue, and resend a revised version after proper compile testing.
Quoted 42 lines · Dan Carpenter
Quoted 27 lines · Moksh Panicker
Reformat multi-line function signature to a single line to fix line length and coding style warnings from checkpatch.pl.
Also fix the missing brace/comment spacing in
rtw_efuse_read_1_byte().Signed-off-by Moksh Panicker <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/staging/rtl8723bs/core/rtw_efuse.c +1
-4@@ -41,10 +41,7 @@ rtw_efuse_calculate_word_counts(u8 word_en)* 09/23/2008 MHC Copy from WMAC. * */ -u8 -rtw_efuse_read_1_byte ( -struct adapter *Adapter, -u16 Address) +u8 rtw_efuse_read_1_byte (struct adapter *Adapter,u16 Address) {u8 Bytetemp = {0x00 };u8 temp = {0x00 };drivers/staging/rtl8723bs/core/rtw_efuse.c u16 Address) · line 78
Quoted 5 lines
drivers/staging/rtl8723bs/core/rtw_efuse.c +1
-1@@ -78,7 +75,7 @@ u16 Address)return rtw_read8 (Adapter,EFUSE_CTRL ); }else return 0xFF ; - + }No. You're not compile testing your patches. This is the fifth version and you're still breaking the build. Take a break and come back in a few days or something.
regards,
dan carpenter
PATCH v5 2/3 staging: rtl8723bs: add braces to else clause in rtw_efuse.c
In reply to Moksh PanickerAdd missing braces to the else clause to satisfy the coding style requirement that both arms of an if/else statement use braces.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -1
@@ -73,7 +73,7 @@ u8 rtw_efuse_read_1_byte(struct adapter *Adapter, u16 Address)break ; }return rtw_read8 (Adapter,EFUSE_CTRL ); - }else + }else {return 0xFF ; } }/* rtw_efuse_read_1_byte */
Signature · 1 line
2.34.1
PATCH v5 3/3 staging: rtl8723bs: reformat rtw_efuse_one_byte_read() signature
In reply to Moksh PanickerReformat multi-line function signature to a single line to fix line length and coding style warnings from checkpatch.pl.
--- drivers/staging/rtl8723bs/core/rtw_efuse.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -5
@@ -79,11 +79,7 @@ u8 rtw_efuse_read_1_byte(struct adapter *Adapter, u16 Address) }/* rtw_efuse_read_1_byte */ /* 11/16/2008 MH Read one byte from real Efuse. */ -u8 -rtw_efuse_one_byte_read ( -struct adapter *padapter, -u16 addr, -u8 *data) +u8 rtw_efuse_one_byte_read (struct adapter *padapter,u16 addr,u8 *data) {u32 tmpidx =0 ;u8 bResult;
Signature · 1 line
2.34.1