Skip to contentSkip to conversation

staging: greybus: resolved checkpatch checks for light.c

PATCH Superseded Rachit Dhar 2 participants 2 messages Feb 4 – Feb 5

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 4/4 staging: greybus: resolved checkpatch checks for light.c

Added comment to mutex declarations, to resolve checkpatch.pl checks.

---
 drivers/staging/greybus/light.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/light.c +2 -2
index e509fdc715db..1f2faa6d545d 100644
@@ -37,7 +37,7 @@ struct gb_channel {
 	bool				releasing;
 	bool				strobe_state;
 	bool				active;
-	struct mutex			lock;
+	struct mutex			lock; /* protects gb_channel->active */
 };
 
 struct gb_light {
@@ -59,7 +59,7 @@ struct gb_lights {
 	struct gb_connection	*connection;
 	u8			lights_count;
 	struct gb_light		*lights;
-	struct mutex		lights_lock;
+	struct mutex		lights_lock; /* protects gb_lights->lights */
 };
 
 static void gb_lights_channel_free(struct gb_channel *channel);
Signature · 1 line
2.43.0
Acked-by on v3 4/4
#1 lore raw

Hey Rachit,
Thanks for the patch. And the sending corrections along the path.

Quoted 21 lines · Rachit Dhar

Added comment to mutex declarations, to resolve checkpatch.pl checks.

---
 drivers/staging/greybus/light.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/light.c +1 -1
index e509fdc715db..1f2faa6d545d 100644
@@ -37,7 +37,7 @@ struct gb_channel {
 	bool				releasing;
 	bool				strobe_state;
 	bool				active;
-	struct mutex			lock;
+	struct mutex			lock; /* protects gb_channel->active */
 };
 
 struct gb_light {

drivers/staging/greybus/light.c struct gb_lights { · line 64

Quoted 7 lines
drivers/staging/greybus/light.c +1 -1
@@ -59,7 +59,7 @@ struct gb_lights {
 	struct gb_connection	*connection;
 	u8			lights_count;
 	struct gb_light		*lights;
-	struct mutex		lights_lock;
+	struct mutex		lights_lock; /* protects gb_lights->lights */
 };
 

This LGTM.

Cheers,
Rui

Quoted 3 lines
drivers/staging/greybus/light.c +0 -0
 static void gb_lights_channel_free(struct gb_channel *channel);
Signature · 1 line
2.43.0