Skip to contentSkip to conversation

staging: greybus: loopback: Add comment for mutex definition

PATCH In review Noah Techoueyres 2 participants 2 messages Aug 3 – Aug 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: greybus: loopback: Add comment for mutex definition

Add a comment to the mutex field explaining what it protects, as required by kernel coding style for lock definitions.

---
 drivers/staging/greybus/loopback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/loopback.c +1 -1
index c33b8aa5871c..f94077a9d64b 100644
@@ -61,7 +61,7 @@ struct gb_loopback {
 
 	struct dentry *file;
 	struct kfifo kfifo_lat;
-	struct mutex mutex;
+	struct mutex mutex; /* Protects sysfs attributes */
 	struct task_struct *task;
 	struct device *dev;
 	wait_queue_head_t wq;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 13 lines · Noah Techoueyres

Add a comment to the mutex field explaining what it protects, as required by kernel coding style for lock definitions.

---
 drivers/staging/greybus/loopback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/loopback.c +0 -0
index c33b8aa5871c..f94077a9d64b 100644

drivers/staging/greybus/loopback.c struct gb_loopback { · line 64

Quoted 5 lines
drivers/staging/greybus/loopback.c +1 -1
@@ -61,7 +61,7 @@ struct gb_loopback {
 
 	struct dentry *file;
 	struct kfifo kfifo_lat;
-	struct mutex mutex;
+	struct mutex mutex; /* Protects sysfs attributes */

This comment is wrong.

regards,
dan carpenter

Quoted 6 lines
drivers/staging/greybus/loopback.c +0 -0
 	struct task_struct *task;
 	struct device *dev;
 	wait_queue_head_t wq;
Signature · 1 line
2.43.0