linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: pi433: add descriptions for mutex locks
@ 2018-03-23  9:47 Valentin Vidic
  2018-03-23 10:22 ` Marcus Wolf
  0 siblings, 1 reply; 21+ messages in thread
From: Valentin Vidic @ 2018-03-23  9:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Derek Robson, Michael Panzlaff, Valentin Vidic,
	Luca Söthe, linux-kernel, Marcin Ciupak, Marcus Wolf,
	Simon Sandström

Removes TODO for tx_fifo_lock as tx_fifo is modified from
both pi433_tx_thread and pi433_write.

Fixes checkpatch warning:

  CHECK: struct mutex definition without comment

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/pi433_if.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index d1e0ddbc79ce..f6f106a3ff8e 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -87,7 +87,7 @@ struct pi433_device {
 
 	/* tx related values */
 	STRUCT_KFIFO_REC_1(MSG_FIFO_SIZE) tx_fifo;
-	struct mutex		tx_fifo_lock; // TODO: check, whether necessary or obsolete
+	struct mutex		tx_fifo_lock; /* serialize access to tx_fifo */
 	struct task_struct	*tx_task_struct;
 	wait_queue_head_t	tx_wait_queue;
 	u8			free_in_fifo;
@@ -100,7 +100,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; /* serialize read requests */
 	wait_queue_head_t	rx_wait_queue;
 
 	/* fifo wait queue */
-- 
2.16.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2018-04-19 10:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23  9:47 [PATCH] staging: pi433: add descriptions for mutex locks Valentin Vidic
2018-03-23 10:22 ` Marcus Wolf
2018-03-23 11:42   ` Valentin Vidic
2018-03-23 15:38     ` Marcus Wolf
2018-03-23 18:00       ` Valentin Vidic
2018-03-23 22:18         ` Valentin Vidic
2018-03-24 22:09           ` [PATCH] staging: pi433: cleanup tx_fifo locking Valentin Vidic
2018-03-25 13:00           ` [PATCH] staging: pi433: add descriptions for mutex locks Marcus Wolf
2018-03-25 13:09             ` Valentin Vidic
2018-03-25 13:12               ` Marcus Wolf
2018-03-25 14:24                 ` Valentin Vidic
2018-04-08 14:15                   ` Marcus Wolf
2018-04-12 17:15                     ` Valentin Vidic
2018-04-19  9:25                       ` Marcus Wolf
2018-04-19  9:47                         ` Valentin Vidic
2018-04-19  9:55                           ` Marcus Wolf
2018-04-08 15:22               ` Marcus Wolf
2018-04-12 18:46                 ` Valentin Vidic
2018-04-19  9:33                   ` Marcus Wolf
2018-04-19 10:25                     ` [PATCH v2] staging: pi433: cleanup tx_fifo locking Valentin Vidic
2018-04-19 10:40                       ` Marcus Wolf

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