Skip to contentSkip to conversation

Fix various checkpatch.pl warnings

PATCH In review Philippe Dixon 2 participants 5 messages Jun 10, 2021 Staging

lore
Share & tools
lore
#0 lore raw

cover Fix various checkpatch.pl warnings

This patchset contains minor changes to remove some checkpatch.pl warnings and better follow the Linux kernel coding style recommendations.

Philippe Dixon (3):
staging: rtl8723bs: core: add blank line after variable declaration
staging: rtl8723bs: core: add * to each line of block comment
staging: rtl8723bs: core: remove whitespace from beginning of line

 drivers/staging/rtl8723bs/core/rtw_cmd.c | 36 +++++++++++++-----------
 1 file changed, 20 insertions(+), 16 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/3 staging: rtl8723bs: core: add blank line after variable declaration

This patch fixes the following checkpatch.pl warning:

WARNING: Missing a blank line after declarations

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/staging/rtl8723bs/core/rtw_cmd.c +3 -0
index f82f8289bf3b..3199386f5850 100644
@@ -223,6 +223,7 @@ void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 
 	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
 		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
+
 		if (c2h && c2h != (void *)pevtpriv)
 			kfree(c2h);
 	}
@@ -563,6 +564,7 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid,
 	/* prepare ssid list */
 	if (ssid) {
 		int i;
+
 		for (i = 0; i < ssid_num && i < RTW_SSID_SCAN_AMOUNT; i++) {
 			if (ssid[i].SsidLength) {
 				memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(struct ndis_802_11_ssid));
@@ -574,6 +576,7 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid,
 	/* prepare channel list */
 	if (ch) {
 		int i;
+
 		for (i = 0; i < ch_num && i < RTW_CHANNEL_SCAN_AMOUNT; i++) {
 			if (ch[i].hw_value && !(ch[i].flags & RTW_IEEE80211_CHAN_DISABLED)) {
 				memcpy(&psurveyPara->ch[i], &ch[i], sizeof(struct rtw_ieee80211_channel));
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/3 staging: rtl8723bs: core: add * to each line of block comment

In reply to Philippe Dixon

This patch fixes the following checkpatch.pl warning:

WARNING: Block comments use * on subsequent lines

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 31 ++++++++++++------------
 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +16 -15
index 3199386f5850..347c043f5305 100644
@@ -155,9 +155,9 @@ static struct cmd_hdl wlancmds[] = {
 };
 
 /*
-Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
-No irqsave is necessary.
-*/
+ * Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
+ * No irqsave is necessary.
+ */
 
 int rtw_init_cmd_priv(struct	cmd_priv *pcmdpriv)
 {
@@ -242,14 +242,14 @@ void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
 }
 
 /*
-Calling Context:
-
-rtw_enqueue_cmd can only be called between kernel thread,
-since only spin_lock is used.
-
-ISR/Call-Back functions can't call this sub-function.
-
-*/
+ * Calling Context:
+ *
+ * rtw_enqueue_cmd can only be called between kernel thread,
+ * since only spin_lock is used.
+ *
+ * ISR/Call-Back functions can't call this sub-function.
+ *
+ */
 
 int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
 {
@@ -528,10 +528,11 @@ int rtw_cmd_thread(void *context)
 }
 
 /*
-rtw_sitesurvey_cmd(~)
-	### NOTE:#### (!!!!)
-	MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
-*/
+ * rtw_sitesurvey_cmd(~)
+ *	### NOTE:#### (!!!!)
+ *	MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
+ */
+
 u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
 	struct rtw_ieee80211_channel *ch, int ch_num)
 {
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/3 staging: rtl8723bs: core: remove whitespace from beginning of line

In reply to Philippe Dixon

This patch fixes the following checkpatch.pl warning:

WARNING: please, no spaces at the start of a line

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index 347c043f5305..04956ccf485c 100644
@@ -1339,7 +1339,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
 static void dynamic_chk_wk_hdl(struct adapter *padapter)
 {
 	struct mlme_priv *pmlmepriv;
-    
+
 	pmlmepriv = &(padapter->mlmepriv);
 
 	if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
Signature · 1 line
2.25.1
maintainer
#4 lore raw
In reply to Philippe Dixon
Quoted 8 lines · Philippe Dixon

This patchset contains minor changes to remove some checkpatch.pl warnings and better follow the Linux kernel coding style recommendations.

Philippe Dixon (3):
staging: rtl8723bs: core: add blank line after variable declaration
staging: rtl8723bs: core: add * to each line of block comment
staging: rtl8723bs: core: remove whitespace from beginning of line

In the future, make your 0/X email subject line also reflect what part of the kernel you are changing. Something like what your commit messages have in their subject lines would be helpful.

thanks,

greg k-h