* [PATCH 0/3] Checkpatch cleanup patches
@ 2025-11-08 4:54 Bryant Boatright
2025-11-08 4:54 ` [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Bryant Boatright @ 2025-11-08 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Correct camel case names reported by checkpatch.
These patches are not required to be applied in any order.
Bryant Boatright (3):
staging: rtl8723bs: Rename camel case enumeration
staging: rtl8723bs: Rename camel case argument
staging: rtl8723bs: Rename camel case variiable
.../staging/rtl8723bs/core/rtw_ieee80211.c | 40 +++++++++----------
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8723bs/include/ieee80211.h | 6 +--
3 files changed, 24 insertions(+), 24 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration
2025-11-08 4:54 [PATCH 0/3] Checkpatch cleanup patches Bryant Boatright
@ 2025-11-08 4:54 ` Bryant Boatright
2025-11-08 5:51 ` Michael Straube
2025-11-08 4:55 ` [PATCH 2/3] staging: rtl8723bs: Rename camel case argument Bryant Boatright
2025-11-08 4:55 ` [PATCH 3/3] staging: rtl8723bs: Rename camel case variable Bryant Boatright
2 siblings, 1 reply; 6+ messages in thread
From: Bryant Boatright @ 2025-11-08 4:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Adhere to Linux kernel style.
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>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 8 ++++----
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8723bs/include/ieee80211.h | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 027b2dd0a4b9..ed00cec80911 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -839,7 +839,7 @@ 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,
+enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
struct rtw_ieee802_11_elems *elems,
int show_errors)
{
@@ -857,7 +857,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:
@@ -960,9 +960,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 8fe0555ab033..d79b29143fc5 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1005,7 +1005,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 1098b0209200..e94efe8f964b 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -724,9 +724,9 @@ struct rtw_ieee802_11_elems {
u8 vht_op_mode_notify_len;
};
-enum ParseRes { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 };
+enum parse_res { parse_ok = 0, parse_unknown = 1, parse_failed = -1 };
-enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
+enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
struct rtw_ieee802_11_elems *elems,
int show_errors);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] staging: rtl8723bs: Rename camel case argument
2025-11-08 4:54 [PATCH 0/3] Checkpatch cleanup patches Bryant Boatright
2025-11-08 4:54 ` [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
@ 2025-11-08 4:55 ` Bryant Boatright
2025-11-08 4:55 ` [PATCH 3/3] staging: rtl8723bs: Rename camel case variable Bryant Boatright
2 siblings, 0 replies; 6+ messages in thread
From: Bryant Boatright @ 2025-11-08 4:55 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Adhere to Linux kernel style.
Reported by checkpatch:
CHECK: Avoid CamelCase: <bw_40MHz>
Signed-off-by: Bryant Boatright <bryant.boatright@proton.me>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 18 +++++++++---------
drivers/staging/rtl8723bs/include/ieee80211.h | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index ed00cec80911..d0bb09177bdf 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1077,26 +1077,26 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
}
/* show MCS rate, unit: 100Kbps */
-u16 rtw_mcs_rate(u8 bw_40MHz, u8 short_GI, unsigned char *MCS_rate)
+u16 rtw_mcs_rate(u8 bw_40_mhz, u8 short_GI, unsigned char *MCS_rate)
{
u16 max_rate = 0;
if (MCS_rate[0] & BIT(7))
- max_rate = (bw_40MHz) ? ((short_GI)?1500:1350):((short_GI)?722:650);
+ max_rate = (bw_40_mhz) ? ((short_GI)?1500:1350):((short_GI)?722:650);
else if (MCS_rate[0] & BIT(6))
- max_rate = (bw_40MHz) ? ((short_GI)?1350:1215):((short_GI)?650:585);
+ max_rate = (bw_40_mhz) ? ((short_GI)?1350:1215):((short_GI)?650:585);
else if (MCS_rate[0] & BIT(5))
- max_rate = (bw_40MHz) ? ((short_GI)?1200:1080):((short_GI)?578:520);
+ max_rate = (bw_40_mhz) ? ((short_GI)?1200:1080):((short_GI)?578:520);
else if (MCS_rate[0] & BIT(4))
- max_rate = (bw_40MHz) ? ((short_GI)?900:810):((short_GI)?433:390);
+ max_rate = (bw_40_mhz) ? ((short_GI)?900:810):((short_GI)?433:390);
else if (MCS_rate[0] & BIT(3))
- max_rate = (bw_40MHz) ? ((short_GI)?600:540):((short_GI)?289:260);
+ max_rate = (bw_40_mhz) ? ((short_GI)?600:540):((short_GI)?289:260);
else if (MCS_rate[0] & BIT(2))
- max_rate = (bw_40MHz) ? ((short_GI)?450:405):((short_GI)?217:195);
+ max_rate = (bw_40_mhz) ? ((short_GI)?450:405):((short_GI)?217:195);
else if (MCS_rate[0] & BIT(1))
- max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
+ max_rate = (bw_40_mhz) ? ((short_GI)?300:270):((short_GI)?144:130);
else if (MCS_rate[0] & BIT(0))
- max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65);
+ max_rate = (bw_40_mhz) ? ((short_GI)?150:135):((short_GI)?72:65);
return max_rate;
}
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index e94efe8f964b..79354f009087 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -781,7 +781,7 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork);
void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr);
-u16 rtw_mcs_rate(u8 bw_40MHz, u8 short_GI, unsigned char *MCS_rate);
+u16 rtw_mcs_rate(u8 bw_40_mhz, u8 short_GI, unsigned char *MCS_rate);
int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action);
const char *action_public_str(u8 action);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: Rename camel case variable
2025-11-08 4:54 [PATCH 0/3] Checkpatch cleanup patches Bryant Boatright
2025-11-08 4:54 ` [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
2025-11-08 4:55 ` [PATCH 2/3] staging: rtl8723bs: Rename camel case argument Bryant Boatright
@ 2025-11-08 4:55 ` Bryant Boatright
2 siblings, 0 replies; 6+ messages in thread
From: Bryant Boatright @ 2025-11-08 4:55 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
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 d0bb09177bdf..6098425ed038 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] 6+ messages in thread
* Re: [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration
2025-11-08 4:54 ` [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
@ 2025-11-08 5:51 ` Michael Straube
2025-11-10 17:24 ` Bryant Boatright
0 siblings, 1 reply; 6+ messages in thread
From: Michael Straube @ 2025-11-08 5:51 UTC (permalink / raw)
To: Bryant Boatright, Greg Kroah-Hartman, linux-staging, linux-kernel
Hi Bryant,
Am 08.11.25 um 05:54 schrieb Bryant Boatright:
> -enum ParseRes { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 };
> +enum parse_res { parse_ok = 0, parse_unknown = 1, parse_failed = -1 };
The constants in enums are usually named all upper case.
PARSE_OK, PARSE_UNKNOWN, PARSE_FAILED
Best regards,
Michael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration
2025-11-08 5:51 ` Michael Straube
@ 2025-11-10 17:24 ` Bryant Boatright
0 siblings, 0 replies; 6+ messages in thread
From: Bryant Boatright @ 2025-11-10 17:24 UTC (permalink / raw)
To: Michael Straube; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Sat, Nov 08, 2025 at 06:51:45AM +0100, Michael Straube wrote:
> Hi Bryant,
>
> Am 08.11.25 um 05:54 schrieb Bryant Boatright:
> > -enum ParseRes { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 };
> > +enum parse_res { parse_ok = 0, parse_unknown = 1, parse_failed = -1 };
>
> The constants in enums are usually named all upper case.
> PARSE_OK, PARSE_UNKNOWN, PARSE_FAILED
>
> Best regards,
> Michael
Michael,
Thanks for the feedback, I'll correct that and resubmit in a
V2 patchset.
Best,
Bryant
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-10 17:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-08 4:54 [PATCH 0/3] Checkpatch cleanup patches Bryant Boatright
2025-11-08 4:54 ` [PATCH 1/3] staging: rtl8723bs: Rename camel case enumeration Bryant Boatright
2025-11-08 5:51 ` Michael Straube
2025-11-10 17:24 ` Bryant Boatright
2025-11-08 4:55 ` [PATCH 2/3] staging: rtl8723bs: Rename camel case argument Bryant Boatright
2025-11-08 4:55 ` [PATCH 3/3] staging: rtl8723bs: Rename camel case variable Bryant Boatright
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.