Skip to contentSkip to conversation

staging: pi433: add comment to rx_lock mutex definition

PATCH Superseded Paulo Miguel Almeida 2 participants 3 messages Dec 30, 2021 – Jan 3, 2022 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: pi433: add comment to rx_lock mutex definition

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

---
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/[email protected]/

---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.c +1 -1
index 29bd37669059..68c09fa016ed 100644
@@ -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 */
Signature · 1 line
2.25.4
maintainer
#1 lore raw
Quoted 2 lines · Paulo Miguel Almeida

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

#2 lore raw

PATCH v4 1/1 staging: pi433: add comment to rx_lock mutex definition

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

---
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/[email protected]/

---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.c +1 -1
index 29bd37669059..68c09fa016ed 100644
@@ -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 */
Signature · 1 line
2.25.4