Skip to contentSkip to conversation

staging: android: ion: add comment to mutex

PATCH In review Anchal Jain 2 participants 2 messages Oct 2, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: android: ion: add comment to mutex

Fix the checkpatch.pl issues:
CHECK: struct mutes definition without comment

---
 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.c +2 -2
index 5f94aee..0941b63 100644
@@ -53,7 +53,7 @@
 struct ion_device {
 	struct miscdevice dev;
 	struct rb_root buffers;
-	struct mutex buffer_lock;
+	struct mutex buffer_lock; /* protect from buffer */
 	struct rw_semaphore lock;
 	struct plist_head heaps;
 	long (*custom_ioctl)(struct ion_client *client, unsigned int cmd,
@@ -85,7 +85,7 @@ struct ion_client {
 	struct ion_device *dev;
 	struct rb_root handles;
 	struct idr idr;
-	struct mutex lock;
+	struct mutex lock; /* protect from handles */
 	const char *name;
 	char *display_name;
 	int display_serial;
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 13 lines · Anchal Jain

Fix the checkpatch.pl issues:
CHECK: struct mutes definition without comment

---
 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.c +0 -0
index 5f94aee..0941b63 100644

drivers/staging/android/ion/ion.c line 56

Quoted 5 lines
drivers/staging/android/ion/ion.c +1 -1
@@ -53,7 +53,7 @@
 struct ion_device {
 	struct miscdevice dev;
 	struct rb_root buffers;
-	struct mutex buffer_lock;
+	struct mutex buffer_lock; /* protect from buffer */

Again, this isn't a good comment :(