linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix block comment warnings
@ 2021-03-31 20:05 Deborah Brouwer
  2021-03-31 20:05 ` [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning Deborah Brouwer
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Deborah Brouwer @ 2021-03-31 20:05 UTC (permalink / raw)
  To: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

This patchset fixes checkpatch warnings arising
from the block comments

Deborah Brouwer (3):
  staging: rtl8723bs: core: fix repeated word warning
  staging: rtl8723bs: core: fix block comment warning
  staging: rtl8723bs: core: remove empty comment

 drivers/staging/rtl8723bs/core/rtw_xmit.c | 61 +++++++++++------------
 1 file changed, 28 insertions(+), 33 deletions(-)

--
2.17.1


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

* [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning
  2021-03-31 20:05 [PATCH 0/3] Fix block comment warnings Deborah Brouwer
@ 2021-03-31 20:05 ` Deborah Brouwer
  2021-03-31 20:17   ` [Outreachy kernel] " Julia Lawall
  2021-03-31 20:05 ` [PATCH 2/3] staging: rtl8723bs: core: fix block comment warning Deborah Brouwer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Deborah Brouwer @ 2021-03-31 20:05 UTC (permalink / raw)
  To: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

Fix checkpatch warning:
WARNING: Possible repeated word: 'very'

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 2daf5c461a4d..3878caf0b56c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1700,7 +1700,7 @@ Calling context:
 If we turn on USE_RXTHREAD, then, no need for critical section.
 Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
 
-Must be very very cautious...
+Must be very, very cautious...
 
 */
 struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pfree_xmit_queue) */
-- 
2.17.1


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

* [PATCH 2/3] staging: rtl8723bs: core: fix block comment warning
  2021-03-31 20:05 [PATCH 0/3] Fix block comment warnings Deborah Brouwer
  2021-03-31 20:05 ` [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning Deborah Brouwer
@ 2021-03-31 20:05 ` Deborah Brouwer
  2021-03-31 20:15   ` [Outreachy kernel] " Julia Lawall
  2021-03-31 20:05 ` [PATCH 3/3] staging: rtl8723bs: core: remove empty comment Deborah Brouwer
  2021-04-01  5:58 ` [PATCH 0/3] Fix block comment warnings Greg KH
  3 siblings, 1 reply; 8+ messages in thread
From: Deborah Brouwer @ 2021-03-31 20:05 UTC (permalink / raw)
  To: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

Fix checkpatch warning:
WARNING: Block comments use * on subsequent lines

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 59 +++++++++++------------
 1 file changed, 28 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 3878caf0b56c..428c71ce0334 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -46,8 +46,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 	init_completion(&pxmitpriv->terminate_xmitthread_comp);
 
 	/*
-	Please insert all the queue initializaiton using _rtw_init_queue below
-	*/
+	 * Please insert all the queue initializaiton using _rtw_init_queue below
+	 */
 
 	pxmitpriv->adapter = padapter;
 
@@ -60,10 +60,10 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 	_rtw_init_queue(&pxmitpriv->free_xmit_queue);
 
 	/*
-	Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME,
-	and initialize free_xmit_frame below.
-	Please also apply  free_txobj to link_up all the xmit_frames...
-	*/
+	 * Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME,
+	 * and initialize free_xmit_frame below.
+	 * Please also apply  free_txobj to link_up all the xmit_frames...
+	 */
 
 	pxmitpriv->pallocated_frame_buf = vzalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
 
@@ -1069,17 +1069,15 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
 }
 
 /*
-
-This sub-routine will perform all the following:
-
-1. remove 802.3 header.
-2. create wlan_header, based on the info in pxmitframe
-3. append sta's iv/ext-iv
-4. append LLC
-5. move frag chunk from pframe to pxmitframe->mem
-6. apply sw-encrypt, if necessary.
-
-*/
+ * This sub-routine will perform all the following:
+ *
+ * 1. remove 802.3 header.
+ * 2. create wlan_header, based on the info in pxmitframe
+ * 3. append sta's iv/ext-iv
+ * 4. append LLC
+ * 5. move frag chunk from pframe to pxmitframe->mem
+ * 6. apply sw-encrypt, if necessary.
+ */
 s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
 {
 	struct pkt_file pktfile;
@@ -1693,23 +1691,22 @@ static void rtw_init_xmitframe(struct xmit_frame *pxframe)
 }
 
 /*
-Calling context:
-1. OS_TXENTRY
-2. RXENTRY (rx_thread or RX_ISR/RX_CallBack)
-
-If we turn on USE_RXTHREAD, then, no need for critical section.
-Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
-
-Must be very, very cautious...
-
-*/
+ * Calling context:
+ * 1. OS_TXENTRY
+ * 2. RXENTRY (rx_thread or RX_ISR/RX_CallBack)
+ *
+ * If we turn on USE_RXTHREAD, then, no need for critical section.
+ * Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
+ *
+ * Must be very, very cautious...
+ */
 struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pfree_xmit_queue) */
 {
 	/*
-		Please remember to use all the osdep_service api,
-		and lock/unlock or _enter/_exit critical to protect
-		pfree_xmit_queue
-	*/
+	 *	Please remember to use all the osdep_service api,
+	 *	and lock/unlock or _enter/_exit critical to protect
+	 *	pfree_xmit_queue
+	 */
 
 	struct xmit_frame *pxframe = NULL;
 	struct list_head *plist, *phead;
-- 
2.17.1


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

* [PATCH 3/3] staging: rtl8723bs: core: remove empty comment
  2021-03-31 20:05 [PATCH 0/3] Fix block comment warnings Deborah Brouwer
  2021-03-31 20:05 ` [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning Deborah Brouwer
  2021-03-31 20:05 ` [PATCH 2/3] staging: rtl8723bs: core: fix block comment warning Deborah Brouwer
@ 2021-03-31 20:05 ` Deborah Brouwer
  2021-03-31 20:12   ` [Outreachy kernel] " Julia Lawall
  2021-04-01  5:58 ` [PATCH 0/3] Fix block comment warnings Greg KH
  3 siblings, 1 reply; 8+ messages in thread
From: Deborah Brouwer @ 2021-03-31 20:05 UTC (permalink / raw)
  To: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

Remove empty comment instead of fixing the checkpatch warning that it was
generating.

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 428c71ce0334..7b4c0f22cd90 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -876,8 +876,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
 					*(payload+curfragnum), *(payload+curfragnum+1), *(payload+curfragnum+2), *(payload+curfragnum+3),
 					*(payload+curfragnum+4), *(payload+curfragnum+5), *(payload+curfragnum+6), *(payload+curfragnum+7)));
 			}
-/*
-*/
 	}
 	return _SUCCESS;
 }
-- 
2.17.1


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

* Re: [Outreachy kernel] [PATCH 3/3] staging: rtl8723bs: core: remove empty comment
  2021-03-31 20:05 ` [PATCH 3/3] staging: rtl8723bs: core: remove empty comment Deborah Brouwer
@ 2021-03-31 20:12   ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-03-31 20:12 UTC (permalink / raw)
  To: Deborah Brouwer
  Cc: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16, linux-staging, linux-kernel,
	outreachy-kernel



On Wed, 31 Mar 2021, Deborah Brouwer wrote:

> Remove empty comment instead of fixing the checkpatch warning that it was
> generating.

Maybe it woudl be better to focus on the purpose of what you are doing.
Something like:

Remove empty comment, which provides no information.

julia

>
> Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 428c71ce0334..7b4c0f22cd90 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -876,8 +876,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
>  					*(payload+curfragnum), *(payload+curfragnum+1), *(payload+curfragnum+2), *(payload+curfragnum+3),
>  					*(payload+curfragnum+4), *(payload+curfragnum+5), *(payload+curfragnum+6), *(payload+curfragnum+7)));
>  			}
> -/*
> -*/
>  	}
>  	return _SUCCESS;
>  }
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/f6be2f84ff5b29a51ca6be0d269c50d54568b2e2.1617221075.git.deborahbrouwer3563%40gmail.com.
>

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

* Re: [Outreachy kernel] [PATCH 2/3] staging: rtl8723bs: core: fix block comment warning
  2021-03-31 20:05 ` [PATCH 2/3] staging: rtl8723bs: core: fix block comment warning Deborah Brouwer
@ 2021-03-31 20:15   ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-03-31 20:15 UTC (permalink / raw)
  To: Deborah Brouwer
  Cc: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16, linux-staging, linux-kernel,
	outreachy-kernel



On Wed, 31 Mar 2021, Deborah Brouwer wrote:

> Fix checkpatch warning:
> WARNING: Block comments use * on subsequent lines

Try to find some way to express what you are doing without using Fix.
It's pretty obvious that a patch fixes something, so the work Fix is not
very useful.  What is your fix and why have you chosen to do that?
Something like the following would be more informative.

Add *s at the begiinning of each line in a block comment to conform to the
Linux kernel coding style.  Issue detected using checkpatch.

julia

>
> Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 59 +++++++++++------------
>  1 file changed, 28 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 3878caf0b56c..428c71ce0334 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -46,8 +46,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
>  	init_completion(&pxmitpriv->terminate_xmitthread_comp);
>
>  	/*
> -	Please insert all the queue initializaiton using _rtw_init_queue below
> -	*/
> +	 * Please insert all the queue initializaiton using _rtw_init_queue below
> +	 */
>
>  	pxmitpriv->adapter = padapter;
>
> @@ -60,10 +60,10 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
>  	_rtw_init_queue(&pxmitpriv->free_xmit_queue);
>
>  	/*
> -	Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME,
> -	and initialize free_xmit_frame below.
> -	Please also apply  free_txobj to link_up all the xmit_frames...
> -	*/
> +	 * Please allocate memory with the sz = (struct xmit_frame) * NR_XMITFRAME,
> +	 * and initialize free_xmit_frame below.
> +	 * Please also apply  free_txobj to link_up all the xmit_frames...
> +	 */
>
>  	pxmitpriv->pallocated_frame_buf = vzalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
>
> @@ -1069,17 +1069,15 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
>  }
>
>  /*
> -
> -This sub-routine will perform all the following:
> -
> -1. remove 802.3 header.
> -2. create wlan_header, based on the info in pxmitframe
> -3. append sta's iv/ext-iv
> -4. append LLC
> -5. move frag chunk from pframe to pxmitframe->mem
> -6. apply sw-encrypt, if necessary.
> -
> -*/
> + * This sub-routine will perform all the following:
> + *
> + * 1. remove 802.3 header.
> + * 2. create wlan_header, based on the info in pxmitframe
> + * 3. append sta's iv/ext-iv
> + * 4. append LLC
> + * 5. move frag chunk from pframe to pxmitframe->mem
> + * 6. apply sw-encrypt, if necessary.
> + */
>  s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
>  {
>  	struct pkt_file pktfile;
> @@ -1693,23 +1691,22 @@ static void rtw_init_xmitframe(struct xmit_frame *pxframe)
>  }
>
>  /*
> -Calling context:
> -1. OS_TXENTRY
> -2. RXENTRY (rx_thread or RX_ISR/RX_CallBack)
> -
> -If we turn on USE_RXTHREAD, then, no need for critical section.
> -Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
> -
> -Must be very, very cautious...
> -
> -*/
> + * Calling context:
> + * 1. OS_TXENTRY
> + * 2. RXENTRY (rx_thread or RX_ISR/RX_CallBack)
> + *
> + * If we turn on USE_RXTHREAD, then, no need for critical section.
> + * Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
> + *
> + * Must be very, very cautious...
> + */
>  struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pfree_xmit_queue) */
>  {
>  	/*
> -		Please remember to use all the osdep_service api,
> -		and lock/unlock or _enter/_exit critical to protect
> -		pfree_xmit_queue
> -	*/
> +	 *	Please remember to use all the osdep_service api,
> +	 *	and lock/unlock or _enter/_exit critical to protect
> +	 *	pfree_xmit_queue
> +	 */
>
>  	struct xmit_frame *pxframe = NULL;
>  	struct list_head *plist, *phead;
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/5ff15315036be9bdf2059bab2ddd00f7dce0d20a.1617221075.git.deborahbrouwer3563%40gmail.com.
>

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

* Re: [Outreachy kernel] [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning
  2021-03-31 20:05 ` [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning Deborah Brouwer
@ 2021-03-31 20:17   ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2021-03-31 20:17 UTC (permalink / raw)
  To: Deborah Brouwer
  Cc: gregkh, ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter,
	phil, amarjargal16, linux-staging, linux-kernel,
	outreachy-kernel



On Wed, 31 Mar 2021, Deborah Brouwer wrote:

> Fix checkpatch warning:
> WARNING: Possible repeated word: 'very'

This is a simple but clear example of how "Fix" doesn't help one
understand the patch.  In reading the log message, one would probably
assume that you removed the repetition, but actually you added a comma.
So it would be better to explain what you did and why.  It's good to
acknowledge checkpatch, but the text of the warning message is not that
useful.

julia

>
> Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 2daf5c461a4d..3878caf0b56c 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -1700,7 +1700,7 @@ Calling context:
>  If we turn on USE_RXTHREAD, then, no need for critical section.
>  Otherwise, we must use _enter/_exit critical to protect free_xmit_queue...
>
> -Must be very very cautious...
> +Must be very, very cautious...
>
>  */
>  struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pfree_xmit_queue) */
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/14c1a1f1f0a34fb821d47ddab6e7e63800ec2736.1617221075.git.deborahbrouwer3563%40gmail.com.
>

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

* Re: [PATCH 0/3] Fix block comment warnings
  2021-03-31 20:05 [PATCH 0/3] Fix block comment warnings Deborah Brouwer
                   ` (2 preceding siblings ...)
  2021-03-31 20:05 ` [PATCH 3/3] staging: rtl8723bs: core: remove empty comment Deborah Brouwer
@ 2021-04-01  5:58 ` Greg KH
  3 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-04-01  5:58 UTC (permalink / raw)
  To: Deborah Brouwer
  Cc: ross.schm.dev, marcocesati, fabioaiuto83, dan.carpenter, phil,
	amarjargal16, linux-staging, linux-kernel, outreachy-kernel

On Wed, Mar 31, 2021 at 01:05:34PM -0700, Deborah Brouwer wrote:
> This patchset fixes checkpatch warnings arising
> from the block comments

Note, your 0/X email subject should also have the subsystem/driver
prefix in there so that we know what this series is for.  Much like your
individual patches do.

thanks,

greg k-h

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

end of thread, other threads:[~2021-04-01  6:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 20:05 [PATCH 0/3] Fix block comment warnings Deborah Brouwer
2021-03-31 20:05 ` [PATCH 1/3] staging: rtl8723bs: core: fix repeated word warning Deborah Brouwer
2021-03-31 20:17   ` [Outreachy kernel] " Julia Lawall
2021-03-31 20:05 ` [PATCH 2/3] staging: rtl8723bs: core: fix block comment warning Deborah Brouwer
2021-03-31 20:15   ` [Outreachy kernel] " Julia Lawall
2021-03-31 20:05 ` [PATCH 3/3] staging: rtl8723bs: core: remove empty comment Deborah Brouwer
2021-03-31 20:12   ` [Outreachy kernel] " Julia Lawall
2021-04-01  5:58 ` [PATCH 0/3] Fix block comment 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).