linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: rtl8723bs: fix coding style issues and improve readability
@ 2025-07-20 14:55 Ali Nasrolahi
  2025-07-20 14:55 ` [PATCH v2 1/3] staging: rtl8723bs: fix comment style and formatting in osdep_service.c Ali Nasrolahi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ali Nasrolahi @ 2025-07-20 14:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging, Ali Nasrolahi

This patch series addresses several coding style and comment formatting issues
in the rtl8723bs staging driver as reported by checkpatch.pl.

Changes include:
- Fixing block comment markers and alignment
- Improving function declaration readability
- Replacing unnamed parameters with named ones
- Removing redundant semicolons and excess spacing

No functional changes are introduced in this series.

Ali Nasrolahi (3):
  staging: rtl8723bs: fix comment style and formatting in osdep_service.c
  staging: rtl8723bs: fix comment formatting in basic_types.h
  staging: rtl8723bs: replace unnamed parameters in hal_btcoex.h for consistency

 drivers/staging/rtl8723bs/include/basic_types.h  | 15 +++++++--------
 drivers/staging/rtl8723bs/include/hal_btcoex.h   |  8 ++++----
 drivers/staging/rtl8723bs/os_dep/osdep_service.c | 11 ++++++-----
 3 files changed, 17 insertions(+), 17 deletions(-)

--
2.50.1


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

* [PATCH v2 1/3] staging: rtl8723bs: fix comment style and formatting in osdep_service.c
  2025-07-20 14:55 [PATCH v2 0/3] staging: rtl8723bs: fix coding style issues and improve readability Ali Nasrolahi
@ 2025-07-20 14:55 ` Ali Nasrolahi
  2025-07-20 14:55 ` [PATCH v2 2/3] staging: rtl8723bs: fix comment formatting in basic_types.h Ali Nasrolahi
  2025-07-20 14:55 ` [PATCH v2 3/3] staging: rtl8723bs: replace unnamed parameters in hal_btcoex.h for consistency Ali Nasrolahi
  2 siblings, 0 replies; 5+ messages in thread
From: Ali Nasrolahi @ 2025-07-20 14:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging, Ali Nasrolahi

This patch fixes minor coding style issues reported by checkpatch:
- Corrected comment block formatting
- Removed redundant blank line
- Improved variable assignment readability

Signed-off-by: Ali Nasrolahi <A.Nasrolahi01@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/osdep_service.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index a00f9f0c85c..60c3da009a5 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -7,9 +7,9 @@
 #include <drv_types.h>
 
 /*
-* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
-* @return: one of RTW_STATUS_CODE
-*/
+ * Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
+ * @return: one of RTW_STATUS_CODE
+ */
 inline int RTW_STATUS_CODE(int error_code)
 {
 	if (error_code >= 0)
@@ -152,7 +152,6 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
 		kfree(ori);
 }
 
-
 /**
  * rtw_cbuf_full - test if cbuf is full
  * @cbuf: pointer of struct rtw_cbuf
@@ -204,6 +203,7 @@ bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf)
 void *rtw_cbuf_pop(struct rtw_cbuf *cbuf)
 {
 	void *buf;
+
 	if (rtw_cbuf_empty(cbuf))
 		return NULL;
 
@@ -226,7 +226,8 @@ struct rtw_cbuf *rtw_cbuf_alloc(u32 size)
 	cbuf = rtw_malloc(struct_size(cbuf, bufs, size));
 
 	if (cbuf) {
-		cbuf->write = cbuf->read = 0;
+		cbuf->read = 0;
+		cbuf->write = 0;
 		cbuf->size = size;
 	}
 
-- 
2.50.1


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

* [PATCH v2 2/3] staging: rtl8723bs: fix comment formatting in basic_types.h
  2025-07-20 14:55 [PATCH v2 0/3] staging: rtl8723bs: fix coding style issues and improve readability Ali Nasrolahi
  2025-07-20 14:55 ` [PATCH v2 1/3] staging: rtl8723bs: fix comment style and formatting in osdep_service.c Ali Nasrolahi
@ 2025-07-20 14:55 ` Ali Nasrolahi
  2025-07-21  5:54   ` Greg KH
  2025-07-20 14:55 ` [PATCH v2 3/3] staging: rtl8723bs: replace unnamed parameters in hal_btcoex.h for consistency Ali Nasrolahi
  2 siblings, 1 reply; 5+ messages in thread
From: Ali Nasrolahi @ 2025-07-20 14:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging, Ali Nasrolahi

Fix coding style issues reported by checkpatch.pl:
- Adjusted block comment trailing markers
- Unified comment spacing and indentation
- Removed redundant semicolon from macro definition

Signed-off-by: Ali Nasrolahi <A.Nasrolahi01@gmail.com>
---
 drivers/staging/rtl8723bs/include/basic_types.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/basic_types.h b/drivers/staging/rtl8723bs/include/basic_types.h
index 57bb717327c..640db1e79e7 100644
--- a/drivers/staging/rtl8723bs/include/basic_types.h
+++ b/drivers/staging/rtl8723bs/include/basic_types.h
@@ -26,7 +26,7 @@
  *	1. Read/write packet content.
  *	2. Before write integer to IO.
  *	3. After read integer from IO.
-*/
+ */
 
 /*  */
 /*  Byte Swapping routine. */
@@ -94,7 +94,7 @@
 #define BIT_OFFSET_LEN_MASK_8(__bitoffset, __bitlen) \
 	(BIT_LEN_MASK_8(__bitlen) << (__bitoffset))
 
-/*Description:
+/* Description:
  * Return 4-byte value in host byte ordering from
  * 4-byte pointer in little-endian system.
  */
@@ -105,11 +105,10 @@
 #define LE_P1BYTE_TO_HOST_1BYTE(__pstart) \
 	(EF1BYTE(*((u8 *)(__pstart))))
 
-/*  */
-/* 	Description: */
-/* 		Translate subfield (continuous bits in little-endian) of 4-byte value in litten byte to */
-/* 		4-byte value in host byte ordering. */
-/*  */
+/* Description:
+ *	Translate subfield (continuous bits in little-endian) of 4-byte value in litten byte to
+ *	4-byte value in host byte ordering.
+ */
 #define LE_BITS_TO_4BYTE(__pstart, __bitoffset, __bitlen) \
 	(\
 		(LE_P4BYTE_TO_HOST_4BYTE(__pstart) >> (__bitoffset))  & \
@@ -163,7 +162,7 @@
 		(					\
 		LE_BITS_CLEARED_TO_2BYTE(__pstart, __bitoffset, __bitlen) | \
 		((((u16)__val) & BIT_LEN_MASK_16(__bitlen)) << (__bitoffset)) \
-		);
+		)
 
 #define SET_BITS_TO_LE_1BYTE(__pstart, __bitoffset, __bitlen, __val) \
 		*((u8 *)(__pstart)) = EF1BYTE			\
-- 
2.50.1


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

* [PATCH v2 3/3] staging: rtl8723bs: replace unnamed parameters in hal_btcoex.h for consistency
  2025-07-20 14:55 [PATCH v2 0/3] staging: rtl8723bs: fix coding style issues and improve readability Ali Nasrolahi
  2025-07-20 14:55 ` [PATCH v2 1/3] staging: rtl8723bs: fix comment style and formatting in osdep_service.c Ali Nasrolahi
  2025-07-20 14:55 ` [PATCH v2 2/3] staging: rtl8723bs: fix comment formatting in basic_types.h Ali Nasrolahi
@ 2025-07-20 14:55 ` Ali Nasrolahi
  2 siblings, 0 replies; 5+ messages in thread
From: Ali Nasrolahi @ 2025-07-20 14:55 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-staging, Ali Nasrolahi

Update unnamed parameters in function declarations with explicit names
to be consistent with the rest of the functions in hal_btcoex.h file.

Signed-off-by: Ali Nasrolahi <A.Nasrolahi01@gmail.com>
---
 drivers/staging/rtl8723bs/include/hal_btcoex.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index 525cce3574f..df58b11605f 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -22,7 +22,7 @@ struct bt_coexist {
 
 void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist);
 bool hal_btcoex_IsBtExist(struct adapter *padapter);
-bool hal_btcoex_IsBtDisabled(struct adapter *);
+bool hal_btcoex_IsBtDisabled(struct adapter *padapter);
 void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum);
 void hal_btcoex_SetSingleAntPath(struct adapter *padapter, u8 singleAntPath);
 
@@ -46,9 +46,9 @@ void hal_btcoex_Handler(struct adapter *padapter);
 s32 hal_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter);
 bool hal_btcoex_IsBtControlLps(struct adapter *padapter);
 bool hal_btcoex_IsLpsOn(struct adapter *padapter);
-u8 hal_btcoex_RpwmVal(struct adapter *);
-u8 hal_btcoex_LpsVal(struct adapter *);
-u32 hal_btcoex_GetRaMask(struct adapter *);
+u8 hal_btcoex_RpwmVal(struct adapter *padapter);
+u8 hal_btcoex_LpsVal(struct adapter *padapter);
+u32 hal_btcoex_GetRaMask(struct adapter *padapter);
 void hal_btcoex_RecordPwrMode(struct adapter *padapter, u8 *pCmdBuf, u8 cmdLen);
 
 #endif /*  !__HAL_BTCOEX_H__ */
-- 
2.50.1


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

* Re: [PATCH v2 2/3] staging: rtl8723bs: fix comment formatting in basic_types.h
  2025-07-20 14:55 ` [PATCH v2 2/3] staging: rtl8723bs: fix comment formatting in basic_types.h Ali Nasrolahi
@ 2025-07-21  5:54   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2025-07-21  5:54 UTC (permalink / raw)
  To: Ali Nasrolahi; +Cc: linux-kernel, linux-staging

On Sun, Jul 20, 2025 at 06:25:23PM +0330, Ali Nasrolahi wrote:
> Fix coding style issues reported by checkpatch.pl:
> - Adjusted block comment trailing markers
> - Unified comment spacing and indentation

These two are fine, but:

> - Removed redundant semicolon from macro definition

This needs to be a separate patch.

Again, each patch needs to do only one "logical" thing.  And that
logical thing can not be "fix a bunch of coding style issues that are of
different types", sorry.

Please fix up for this patch, and the 3/3 patch and submit an updated
series.

thanks,

greg k-h

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

end of thread, other threads:[~2025-07-21  5:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-20 14:55 [PATCH v2 0/3] staging: rtl8723bs: fix coding style issues and improve readability Ali Nasrolahi
2025-07-20 14:55 ` [PATCH v2 1/3] staging: rtl8723bs: fix comment style and formatting in osdep_service.c Ali Nasrolahi
2025-07-20 14:55 ` [PATCH v2 2/3] staging: rtl8723bs: fix comment formatting in basic_types.h Ali Nasrolahi
2025-07-21  5:54   ` Greg KH
2025-07-20 14:55 ` [PATCH v2 3/3] staging: rtl8723bs: replace unnamed parameters in hal_btcoex.h for consistency Ali Nasrolahi

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