public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Checkpatch cleanup patches
@ 2026-02-17 14:54 Bryant Boatright
  2026-02-17 14:54 ` [PATCH v4 1/2] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
  2026-02-17 14:54 ` [PATCH v4 2/2] staging: rtl8723bs: Rename camel case variable Bryant Boatright
  0 siblings, 2 replies; 5+ messages in thread
From: Bryant Boatright @ 2026-02-17 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, Bryant Boatright

Correct camel case names reported by checkpatch.

These patches are not required to be applied in any order.

Changes in v4:
   1. Use `git send-email` to properly link patch series per feedback from
      gregkh@linuxfoundation.org.

Changes in v3:
   1. Patch 1: Updated parse_res to parse_result for clearer purpose per
      feedback from gregkh@linuxfoundation.org.
   2. Patch 1: Change definition of parse_result to multi-line definition per
      feed feedback from gregkh@linuxfoundation.org.
   3. Patch 2: Fix typo in commit message introduced in v2 per feedback from
      gregkh@linuxfoundation.org.
   4. Remove patch 2 (from v2) as name change was not needed per feedback from
      gregkh@linuxfoundation.org.
   5. Add changelog for patchset to cover letter per feedback from
      gregkh@linuxfoundation.org.

Changes in v2:
   1. Patch 1: Make enumeration constant names all upper case per feedback from
   straube.linux@gmail.com.

Bryant Boatright (2):
  staging: rtl8723bs: Rename camel case enumeration
  staging: rtl8723bs: Rename camel case variable

 .../staging/rtl8723bs/core/rtw_ieee80211.c    | 26 +++++++++----------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c |  2 +-
 drivers/staging/rtl8723bs/include/ieee80211.h | 12 ++++++---
 3 files changed, 22 insertions(+), 18 deletions(-)

-- 
2.43.0



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

* [PATCH v4 1/2] staging: rtl8723bs: Rename camel case enumeration
  2026-02-17 14:54 [PATCH v4 0/2] Checkpatch cleanup patches Bryant Boatright
@ 2026-02-17 14:54 ` Bryant Boatright
  2026-02-18  4:51   ` Ethan Tidmore
  2026-02-17 14:54 ` [PATCH v4 2/2] staging: rtl8723bs: Rename camel case variable Bryant Boatright
  1 sibling, 1 reply; 5+ messages in thread
From: Bryant Boatright @ 2026-02-17 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, Bryant Boatright

Rename camel case enumeration to snake case and expand enumeration name
for clarity. Update indentation of function prototype/definition based
on new name length. Move enumeration definition from single line to
multi-line definition.

Reported by checkpatch:

CHECK: Avoid CamelCase: <ParseRes>
CHECK: Avoid CamelCase: <ParseFailed>
CHECK: Avoid CamelCase: <ParseUnknown>
CHECK: Avoid CamelCase: <ParseOK>

Signed-off-by: Bryant Boatright <bryant.boatright@proton.me>
---
Changes in v3:
- Change parse_result definition to multi-line definition.
- Change parse_res to parse_result for clearer enumeration purpose.
- Update indentation in function prototype/definitions due to name
  change for parse_result.

Changes in v2:
- Make enumeration constant names all upper case.

 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 12 ++++++------
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c  |  2 +-
 drivers/staging/rtl8723bs/include/ieee80211.h  | 12 ++++++++----
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index febc14de6bc0..3c3ab3694b4a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -845,9 +845,9 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
  * @show_errors: Whether to show parsing errors in debug log
  * Returns: Parsing result
  */
-enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
-				struct rtw_ieee802_11_elems *elems,
-				int show_errors)
+enum parse_result rtw_ieee802_11_parse_elems(u8 *start, uint len,
+					     struct rtw_ieee802_11_elems *elems,
+					     int show_errors)
 {
 	uint left = len;
 	u8 *pos = start;
@@ -863,7 +863,7 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 		left -= 2;
 
 		if (elen > left)
-			return ParseFailed;
+			return PARSE_FAILED;
 
 		switch (id) {
 		case WLAN_EID_SSID:
@@ -966,9 +966,9 @@ enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
 	}
 
 	if (left)
-		return ParseFailed;
+		return PARSE_FAILED;
 
-	return unknown ? ParseUnknown : ParseOK;
+	return unknown ? PARSE_UNKNOWN : PARSE_OK;
 }
 
 void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 78abc5f5191f..14753287f3bc 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -990,7 +990,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
 	pstat->capability = capab_info;
 
 	/* now parse all ieee802_11 ie to point to elems */
-	if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed ||
+	if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == PARSE_FAILED ||
 	    !elems.ssid) {
 		status = WLAN_STATUS_CHALLENGE_FAIL;
 		goto OnAssocReqFail;
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index 0f28c904a714..97fd5f75096b 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -723,11 +723,15 @@ struct rtw_ieee802_11_elems {
 	u8 vht_op_mode_notify_len;
 };
 
-enum ParseRes { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 };
+enum parse_result {
+	PARSE_OK = 0,
+	PARSE_UNKNOWN = 1,
+	PARSE_FAILED = -1
+};
 
-enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
-				struct rtw_ieee802_11_elems *elems,
-				int show_errors);
+enum parse_result rtw_ieee802_11_parse_elems(u8 *start, uint len,
+					     struct rtw_ieee802_11_elems *elems,
+					     int show_errors);
 
 u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, unsigned int *frlen);
 u8 *rtw_set_ie(u8 *pbuf, signed int index, uint len, u8 *source, uint *frlen);
-- 
2.43.0



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

* [PATCH v4 2/2] staging: rtl8723bs: Rename camel case variable
  2026-02-17 14:54 [PATCH v4 0/2] Checkpatch cleanup patches Bryant Boatright
  2026-02-17 14:54 ` [PATCH v4 1/2] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
@ 2026-02-17 14:54 ` Bryant Boatright
  2026-02-18  5:11   ` Ethan Tidmore
  1 sibling, 1 reply; 5+ messages in thread
From: Bryant Boatright @ 2026-02-17 14:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, Bryant Boatright

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Avoid CamelCase: <rateLen>

Signed-off-by: Bryant Boatright <bryant.boatright@proton.me>
---
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 3c3ab3694b4a..0673dd411283 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -285,7 +285,7 @@ uint rtw_get_rateset_len(u8 *rateset)
 int rtw_generate_ie(struct registry_priv *pregistrypriv)
 {
 	u8 wireless_mode;
-	int	sz = 0, rateLen;
+	int	sz = 0, rate_len;
 	struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network;
 	u8 *ie = pdev_network->ies;
 
@@ -320,13 +320,13 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
 
 	rtw_set_supported_rate(pdev_network->supported_rates, wireless_mode);
 
-	rateLen = rtw_get_rateset_len(pdev_network->supported_rates);
+	rate_len = rtw_get_rateset_len(pdev_network->supported_rates);
 
-	if (rateLen > 8) {
+	if (rate_len > 8) {
 		ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, 8, pdev_network->supported_rates, &sz);
-		/* ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->supported_rates + 8), &sz); */
+		/* ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (pdev_network->supported_rates + 8), &sz); */
 	} else {
-		ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, rateLen, pdev_network->supported_rates, &sz);
+		ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, rate_len, pdev_network->supported_rates, &sz);
 	}
 
 	/* DS parameter set */
@@ -336,8 +336,8 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
 
 	ie = rtw_set_ie(ie, WLAN_EID_IBSS_PARAMS, 2, (u8 *)&(pdev_network->configuration.atim_window), &sz);
 
-	if (rateLen > 8)
-		ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->supported_rates + 8), &sz);
+	if (rate_len > 8)
+		ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (pdev_network->supported_rates + 8), &sz);
 
 	/* HT Cap. */
 	if ((pregistrypriv->wireless_mode & WIRELESS_11_24N) &&
-- 
2.43.0



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

* Re: [PATCH v4 1/2] staging: rtl8723bs: Rename camel case enumeration
  2026-02-17 14:54 ` [PATCH v4 1/2] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
@ 2026-02-18  4:51   ` Ethan Tidmore
  0 siblings, 0 replies; 5+ messages in thread
From: Ethan Tidmore @ 2026-02-18  4:51 UTC (permalink / raw)
  To: Bryant Boatright, gregkh; +Cc: linux-staging

On Tue Feb 17, 2026 at 8:54 AM CST, Bryant Boatright wrote:
> Rename camel case enumeration to snake case and expand enumeration name
> for clarity. Update indentation of function prototype/definition based
> on new name length. Move enumeration definition from single line to
> multi-line definition.
>
> Reported by checkpatch:
>
> CHECK: Avoid CamelCase: <ParseRes>
> CHECK: Avoid CamelCase: <ParseFailed>
> CHECK: Avoid CamelCase: <ParseUnknown>
> CHECK: Avoid CamelCase: <ParseOK>
>
> Signed-off-by: Bryant Boatright <bryant.boatright@proton.me>
> ---

LGTM.

Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>

Thanks,

ET

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

* Re: [PATCH v4 2/2] staging: rtl8723bs: Rename camel case variable
  2026-02-17 14:54 ` [PATCH v4 2/2] staging: rtl8723bs: Rename camel case variable Bryant Boatright
@ 2026-02-18  5:11   ` Ethan Tidmore
  0 siblings, 0 replies; 5+ messages in thread
From: Ethan Tidmore @ 2026-02-18  5:11 UTC (permalink / raw)
  To: Bryant Boatright, gregkh; +Cc: linux-staging

On Tue Feb 17, 2026 at 8:54 AM CST, Bryant Boatright wrote:
> Adhere to Linux kernel coding style.
>
> Reported by checkpatch:
>
> CHECK: Avoid CamelCase: <rateLen>
>
> Signed-off-by: Bryant Boatright <bryant.boatright@proton.me>
> ---

...

> -	if (rateLen > 8) {
> +	if (rate_len > 8) {
>  		ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, 8, pdev_network->supported_rates, &sz);
> -		/* ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->supported_rates + 8), &sz); */
> +		/* ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (pdev_network->supported_rates + 8), &sz); */

You can probably just delete this comment, it's more like dead code than
a comment.

Thanks,

ET

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

end of thread, other threads:[~2026-02-18  5:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17 14:54 [PATCH v4 0/2] Checkpatch cleanup patches Bryant Boatright
2026-02-17 14:54 ` [PATCH v4 1/2] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
2026-02-18  4:51   ` Ethan Tidmore
2026-02-17 14:54 ` [PATCH v4 2/2] staging: rtl8723bs: Rename camel case variable Bryant Boatright
2026-02-18  5:11   ` Ethan Tidmore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox