[PATCH 0/3] Fix various checkpatch.pl warnings

STALE1891d

5 messages, 2 authors, 2021-06-10 · open the first message on its own page

[PATCH 0/3] Fix various checkpatch.pl warnings

From: Philippe Dixon <hidden>
Date: 2021-06-10 15:53:05

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

-- 
2.25.1

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

From: Philippe Dixon <hidden>
Date: 2021-06-10 15:53:10

This patch fixes the following checkpatch.pl warning:

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

Signed-off-by: Philippe Dixon <redacted>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 347c043f5305..04956ccf485c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -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)
-- 
2.25.1

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

From: Philippe Dixon <hidden>
Date: 2021-06-10 15:53:41

This patch fixes the following checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: Philippe Dixon <redacted>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index f82f8289bf3b..3199386f5850 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -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));
-- 
2.25.1

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

From: Philippe Dixon <hidden>
Date: 2021-06-10 15:53:44

This patch fixes the following checkpatch.pl warning:

WARNING: Block comments use * on subsequent lines

Signed-off-by: Philippe Dixon <redacted>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 31 ++++++++++++------------
 1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 3199386f5850..347c043f5305 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -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)
 {
-- 
2.25.1

Re: [PATCH 0/3] Fix various checkpatch.pl warnings

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-06-10 16:25:16

On Thu, Jun 10, 2021 at 08:51:14AM -0700, Philippe Dixon wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help