linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix various checkpatch.pl warnings
@ 2021-06-10 15:51 Philippe Dixon
  2021-06-10 15:51 ` [PATCH 1/3] staging: rtl8723bs: core: add blank line after variable declaration Philippe Dixon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Philippe Dixon @ 2021-06-10 15:51 UTC (permalink / raw)
  To: hdegoede, Larry.Finger
  Cc: Philippe Dixon, gregkh, linux-staging, linux-kernel

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


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

* [PATCH 1/3] staging: rtl8723bs: core: add blank line after variable declaration
  2021-06-10 15:51 [PATCH 0/3] Fix various checkpatch.pl warnings Philippe Dixon
@ 2021-06-10 15:51 ` Philippe Dixon
  2021-06-10 15:51 ` [PATCH 2/3] staging: rtl8723bs: core: add * to each line of block comment Philippe Dixon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Dixon @ 2021-06-10 15:51 UTC (permalink / raw)
  To: hdegoede, Larry.Finger
  Cc: Philippe Dixon, gregkh, linux-staging, linux-kernel

This patch fixes the following checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: Philippe Dixon <philippesdixon@gmail.com>
---
 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


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

* [PATCH 2/3] staging: rtl8723bs: core: add * to each line of block comment
  2021-06-10 15:51 [PATCH 0/3] Fix various checkpatch.pl warnings Philippe Dixon
  2021-06-10 15:51 ` [PATCH 1/3] staging: rtl8723bs: core: add blank line after variable declaration Philippe Dixon
@ 2021-06-10 15:51 ` Philippe Dixon
  2021-06-10 15:51 ` [PATCH 3/3] staging: rtl8723bs: core: remove whitespace from beginning of line Philippe Dixon
  2021-06-10 16:24 ` [PATCH 0/3] Fix various checkpatch.pl warnings Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Dixon @ 2021-06-10 15:51 UTC (permalink / raw)
  To: hdegoede, Larry.Finger
  Cc: Philippe Dixon, gregkh, linux-staging, linux-kernel

This patch fixes the following checkpatch.pl warning:

WARNING: Block comments use * on subsequent lines

Signed-off-by: Philippe Dixon <philippesdixon@gmail.com>
---
 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


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

* [PATCH 3/3] staging: rtl8723bs: core: remove whitespace from beginning of line
  2021-06-10 15:51 [PATCH 0/3] Fix various checkpatch.pl warnings Philippe Dixon
  2021-06-10 15:51 ` [PATCH 1/3] staging: rtl8723bs: core: add blank line after variable declaration Philippe Dixon
  2021-06-10 15:51 ` [PATCH 2/3] staging: rtl8723bs: core: add * to each line of block comment Philippe Dixon
@ 2021-06-10 15:51 ` Philippe Dixon
  2021-06-10 16:24 ` [PATCH 0/3] Fix various checkpatch.pl warnings Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Dixon @ 2021-06-10 15:51 UTC (permalink / raw)
  To: hdegoede, Larry.Finger
  Cc: Philippe Dixon, gregkh, linux-staging, linux-kernel

This patch fixes the following checkpatch.pl warning:

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

Signed-off-by: Philippe Dixon <philippesdixon@gmail.com>
---
 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


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

* Re: [PATCH 0/3] Fix various checkpatch.pl warnings
  2021-06-10 15:51 [PATCH 0/3] Fix various checkpatch.pl warnings Philippe Dixon
                   ` (2 preceding siblings ...)
  2021-06-10 15:51 ` [PATCH 3/3] staging: rtl8723bs: core: remove whitespace from beginning of line Philippe Dixon
@ 2021-06-10 16:24 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-06-10 16:24 UTC (permalink / raw)
  To: Philippe Dixon; +Cc: hdegoede, Larry.Finger, linux-staging, linux-kernel

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

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

end of thread, other threads:[~2021-06-10 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 15:51 [PATCH 0/3] Fix various checkpatch.pl warnings Philippe Dixon
2021-06-10 15:51 ` [PATCH 1/3] staging: rtl8723bs: core: add blank line after variable declaration Philippe Dixon
2021-06-10 15:51 ` [PATCH 2/3] staging: rtl8723bs: core: add * to each line of block comment Philippe Dixon
2021-06-10 15:51 ` [PATCH 3/3] staging: rtl8723bs: core: remove whitespace from beginning of line Philippe Dixon
2021-06-10 16:24 ` [PATCH 0/3] Fix various checkpatch.pl warnings Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).