Skip to contentSkip to conversation

staging: rtl8723bs: fix efuse formatting and brace handling

PATCH Superseded Moksh Panicker 2 participants 7 messages May 17 Staging

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v4 cover staging: rtl8723bs: fix efuse formatting and brace handling

This series fixes coding-style issues in drivers/staging/rtl8723bs/core/rtw_efuse.c and adds a missing brace fix.

Patch 1 reformats rtw_efuse_read_1_byte() signature.
Patch 2 adds braces to the else clause in rtw_efuse.c.
Patch 3 reformats rtw_efuse_one_byte_read() signature.
Patch 4 fixes missing brace/comment formatting in rtw_efuse_read_1_byte().

v3 -> v4: added the missing brace fix as a separate patch and compile-tested the series.

Moksh Panicker (4):
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
staging: rtl8723bs: fix missing brace in rtw_efuse_read_1_byte

 drivers/staging/rtl8723bs/core/rtw_efuse.c | 12 ++++--------
 2 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 1/4 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.

---
 drivers/staging/rtl8723bs/core/rtw_efuse.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -4
index 803a608b74fa..987d05816c5c 100644
@@ -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};
Signature · 1 line
2.34.1
#2 lore raw

PATCH v4 2/4 staging: rtl8723bs: add braces to else clause in rtw_efuse.c

In reply to Moksh Panicker

Add 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
index 987d05816c5c..2be74f2d4ac8 100644
@@ -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
#3 lore raw

PATCH v4 3/4 staging: rtl8723bs: reformat rtw_efuse_one_byte_read() signature

In reply to Moksh Panicker

Reformat 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
index 2be74f2d4ac8..ef0cec40d388 100644
@@ -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
#4 lore raw

PATCH v4 4/4 staging: rtl8723bs: fix missing brace in rtw_efuse_read_1_byte

In reply to Moksh Panicker

Fix missing brace and add space before inline comment in rtw_efuse_read_1_byte() to comply with kernel coding style.

rtw_efuse_read_1_byte

---
 drivers/staging/rtl8723bs/core/rtw_efuse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +2 -2
index ef0cec40d388..a9bbfe2d6fb2 100644
@@ -75,8 +75,8 @@ u8 rtw_efuse_read_1_byte(struct adapter *Adapter, u16 Address)
 		return rtw_read8(Adapter, EFUSE_CTRL);
 	} else {
 		return 0xFF;
-
-} /* rtw_efuse_read_1_byte */
+	}
+} /* 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)
Signature · 1 line
2.34.1
maintainer
#5 lore raw

Re: [PATCH 4/4] staging: rtl8723bs: fix missing brace in rtw_efuse_read_1_byte

Quoted 29 lines · Moksh Panicker

Fix missing brace and add space before inline comment in rtw_efuse_read_1_byte() to comply with kernel coding style.

rtw_efuse_read_1_byte

---
 drivers/staging/rtl8723bs/core/rtw_efuse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +2 -2
index ef0cec40d388..a9bbfe2d6fb2 100644
@@ -75,8 +75,8 @@ u8 rtw_efuse_read_1_byte(struct adapter *Adapter, u16 Address)
 		return rtw_read8(Adapter, EFUSE_CTRL);
 	} else {
 		return 0xFF;
-
-} /* rtw_efuse_read_1_byte */
+	}
+} /* 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)
Signature · 1 line
2.34.1

You can not break the build and then fix it in a later patch. All patches must never add a warning or a build breakage.

thanks,

greg k-h

maintainer
#6 lore raw
In reply to Moksh Panicker
Quoted 10 lines · Moksh Panicker

This series fixes coding-style issues in drivers/staging/rtl8723bs/core/rtw_efuse.c and adds a missing brace fix.

Patch 1 reformats rtw_efuse_read_1_byte() signature.
Patch 2 adds braces to the else clause in rtw_efuse.c.
Patch 3 reformats rtw_efuse_one_byte_read() signature.
Patch 4 fixes missing brace/comment formatting in rtw_efuse_read_1_byte().

v3 -> v4: added the missing brace fix as a separate patch and compile-tested the series.

Quoted 13 lines

Moksh Panicker (4):
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
staging: rtl8723bs: fix missing brace in rtw_efuse_read_1_byte

 drivers/staging/rtl8723bs/core/rtw_efuse.c | 12 ++++--------
 2 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1

This is the second v4 version :(

It should be v5, right? Also, what about the changes from v1 -> v4? You have to list them too.

thanks,

greg k-h