All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] staging: pi433: add comment to rx_lock mutex definition
@ 2021-12-30 15:29 Paulo Miguel Almeida
  2022-01-03 13:29 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Miguel Almeida @ 2021-12-30 15:29 UTC (permalink / raw)
  To: gregkh, realwakka, paulo.miguel.almeida.rodenas
  Cc: linux-staging, linux-kernel

Checkpatch reports: CHECK: struct mutex definition without comment.
Fix this by documenting what rx_mutex struct is used for in pi433 driver.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
---
v3: wrote a more succinct desc so it doesn't become out-of-date (Req: Greg k-h) 
v2: ellaborate on reasons why the mutex lock is used in the driver (Req: Greg k-h)
v1: https://lore.kernel.org/lkml/20211222093626.GA13332@localhost.localdomain/

---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 29bd37669059..68c09fa016ed 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -92,7 +92,7 @@ struct pi433_device {
 	u32			rx_bytes_to_drop;
 	u32			rx_bytes_dropped;
 	unsigned int		rx_position;
-	struct mutex		rx_lock;
+	struct mutex		rx_lock; /* protects rx_* variable accesses */
 	wait_queue_head_t	rx_wait_queue;
 
 	/* fifo wait queue */
-- 
2.25.4


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

* Re: [PATCH v3] staging: pi433: add comment to rx_lock mutex definition
  2021-12-30 15:29 [PATCH v3] staging: pi433: add comment to rx_lock mutex definition Paulo Miguel Almeida
@ 2022-01-03 13:29 ` Greg KH
  2022-01-03 23:26   ` [PATCH v4] " Paulo Miguel Almeida
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2022-01-03 13:29 UTC (permalink / raw)
  To: Paulo Miguel Almeida; +Cc: realwakka, linux-staging, linux-kernel

On Fri, Dec 31, 2021 at 04:29:31AM +1300, Paulo Miguel Almeida wrote:
> Checkpatch reports: CHECK: struct mutex definition without comment.
> Fix this by documenting what rx_mutex struct is used for in pi433 driver.

Please wrap your changelog comments at 72 columns.

thanks,

greg k-h

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

* [PATCH v4] staging: pi433: add comment to rx_lock mutex definition
  2022-01-03 13:29 ` Greg KH
@ 2022-01-03 23:26   ` Paulo Miguel Almeida
  0 siblings, 0 replies; 3+ messages in thread
From: Paulo Miguel Almeida @ 2022-01-03 23:26 UTC (permalink / raw)
  To: gregkh, realwakka, paulo.miguel.almeida.rodenas
  Cc: linux-staging, linux-kernel

Checkpatch reports: CHECK: struct mutex definition without comment.
Fix this by documenting what rx_mutex struct is used for in pi433
driver.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
---
v4: wrap changelog comments at 72 columns where possible (Req:
 Greg k-h)
v3: wrote a more succinct desc so it doesn't become out-of-date (Req:
 Greg k-h)
v2: ellaborate on reasons why the mutex lock is used in driver (Req:
 Greg k-h)
v1: https://lore.kernel.org/lkml/20211222093626.GA13332@localhost.localdomain/
---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 29bd37669059..68c09fa016ed 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -92,7 +92,7 @@ struct pi433_device {
 	u32			rx_bytes_to_drop;
 	u32			rx_bytes_dropped;
 	unsigned int		rx_position;
-	struct mutex		rx_lock;
+	struct mutex		rx_lock; /* protects rx_* variable accesses */
 	wait_queue_head_t	rx_wait_queue;
 
 	/* fifo wait queue */
-- 
2.25.4


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

end of thread, other threads:[~2022-01-03 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 15:29 [PATCH v3] staging: pi433: add comment to rx_lock mutex definition Paulo Miguel Almeida
2022-01-03 13:29 ` Greg KH
2022-01-03 23:26   ` [PATCH v4] " Paulo Miguel Almeida

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.