Skip to contentSkip to conversation

staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

PATCH Superseded Bruce Qin 2 participants 12 messages Jul 20, 2025 – Jul 25, 2025 Staging

lore
Share & tools
lore

Bruce Qin

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

This patch addresses three checkpatch-reported style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -4
index 383a6f7c06f4..838d2feed883 100644
@@ -258,10 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2)
 			)
 				wakeup_sta_to_xmit(padapter, psta);
 		}
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 21 lines · Bruce Qin

This patch addresses three checkpatch-reported style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +0 -0
index 383a6f7c06f4..838d2feed883 100644
@@ -258,10 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {

drivers/staging/rtl8723bs/core/rtw_ap.c void expire_timeout_chk(struct adapter *padapter) · line 264

Quoted 10 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -4
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2)
 			)

Why is this ")" on this line down here? Shouldn't it be on the previous one?

thanks,

greg k-h

author
#2 lore raw

Hi Greg,

Thank you for reviewing my patch and pointing out the issue with the closing parenthesis.

You're absolutely right — the ')' should not be on its own line. I've corrected it as suggested and am resending the patch as v2.

I really appreciate your time and feedback. It means a lot to me as a new contributor. Thank you for helping keep the codebase clean and consistent.

Best regards,
Bruce Qin

Changes since v1:
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

author
#3 lore raw

PATCH v2 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0
maintainer
#4 lore raw
Quoted 38 lines · Bruce Qin

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot

author
#5 lore raw

PATCH v2 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

In reply to Greg KH

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
Changes in v2:
- Moved closing ')' to the previous line as suggested by Greg Kroah-Hartman.
- Thanks for the review and feedback!

 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0
author
#6 lore raw

PATCH v2 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

In reply to Greg KH

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
Changes in v2:
- Moved closing ')' to the previous line as suggested by Greg Kroah-Hartman.
- Thanks for the review and feedback!

 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0
author
#7 lore raw

PATCH v2 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

In reply to Greg KH

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

---
Changes in v2:
- Moved closing ')' to the previous line as suggested by Greg Kroah-Hartman.
- Thanks for the review and feedback!

 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0
maintainer
#8 lore raw
Quoted 9 lines · Bruce Qin

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability and conform to Linux kernel coding conventions. No functional changes.

Please wrap your changelog text at 72 columns, like checkpatch asks you to.

Quoted 6 lines

---
Changes in v2:
- Moved closing ')' to the previous line as suggested by Greg Kroah-Hartman.
- Thanks for the review and feedback!

You sent 3 copies of this "v2" patch, how do I know which one is correct?

Please fix up and send a v3.

thanks,

greg k-h

author
#9 lore raw

PATCH v3 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line
(as suggested by the maintainer)

These changes improve readability
and conform to Linux kernel coding conventions.
No functional changes.

---
Changes in v3:
- Wrapped commit message lines at 72 columns (checkpatch warning resolved).
- Ensured only one copy is submitted (per Greg's feedback).
- Carried forward the fix from v2 (closing ')' adjustment
as suggested by Greg).
- Thanks again to Greg Kroah-Hartman for the helpful review!

 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0
author
#10 lore raw

PATCH v4 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability
and conform to Linux kernel coding conventions.
No functional changes.

---
Changes in v4:
- Rewrapped several commit message lines to strictly follow the 72-column limit.
- checkpatch.pl allows up to 75 columns, which led to the initial oversight in v3.
- Added back the missing v2 changelog that was accidentally omitted in v3.
- No code changes; only updated the commit message formatting for full compliance.

Changes in v3:
- Wrapped commit message lines at 72 columns (checkpatch warning resolved).
- Ensured only one copy is submitted (per Greg's feedback).
- Carried forward the fix from v2 (closing ')' adjustment as suggested by Greg).
- Thanks again to Greg Kroah-Hartman for the helpful review!

Changes in v2:
- Moved closing ')' to the previous line as suggested by Greg Kroah-Hartman.
- Thanks for the review and feedback!

 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0
author
#11 lore raw

PATCH v5 1/1 staging: rtl8723bs: fix if-statement alignment and line continuation in rtw_ap.c

This patch fixes several style issues in a multiline if-statement:

- Moved '&&' to the end of the previous line to follow logical continuation style
- Fixed indentation to align with the opening parenthesis of the expression
- Avoided ending a line with an open parenthesis '('
- Moved closing ')' to the end of the last expression line (as suggested by the maintainer)

These changes improve readability
and conform to Linux kernel coding conventions.
No functional changes.

---
Changes in v5:
- Fixed incorrect recipient address in v4
(sent to self instead of Greg KH).
- No code or commit message changes.

Changes in v4:
- Rewrapped several commit message lines to strictly follow the 72-column limit.
- checkpatch.pl allows up to 75 columns, which led to the initial oversight in v3.
- Added back the missing v2 changelog that was accidentally omitted in v3.
- No code changes; only updated the commit message formatting for full compliance.

Changes in v3:
- Wrapped commit message lines at 72 columns (checkpatch warning resolved).
- Ensured only one copy is submitted (per Greg's feedback).
- Carried forward the fix from v2 (closing ')' adjustment as suggested by Greg).
- Thanks again to Greg Kroah-Hartman for the helpful review!

Changes in v2:
- Moved closing ')' to the previous line as suggested by Greg Kroah-Hartman.
- Thanks for the review and feedback!

 drivers/staging/rtl8723bs/core/rtw_ap.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +3 -5
index 383a6f7c06f4..c652e0cd35f3 100644
@@ -258,11 +258,9 @@ void expire_timeout_chk(struct adapter *padapter)
 		} else {
 			/* TODO: Aging mechanism to digest frames in sleep_q to */
 			/* avoid running out of xmitframe */
-			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt)
-				&& padapter->xmitpriv.free_xmitframe_cnt < ((
-					NR_XMITFRAME / pstapriv->asoc_list_cnt
-				) / 2)
-			)
+			if (psta->sleepq_len > (NR_XMITFRAME / pstapriv->asoc_list_cnt) &&
+			    padapter->xmitpriv.free_xmitframe_cnt <
+					((NR_XMITFRAME / pstapriv->asoc_list_cnt) / 2))
 				wakeup_sta_to_xmit(padapter, psta);
 		}
 	}
Signature · 1 line
2.43.0