mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] staging: greybus: light: add comments to mutex definitions
@ 2026-09-04  5:56 contectforbusiness
  2026-09-07 16:26 ` gregkh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: contectforbusiness @ 2026-09-04  5:56 UTC (permalink / raw)
  To: gregkh; +Cc: rmfrfs, johan, elder, greybus-dev, linux-staging, linux-kernel

checkpatch complains about:

  CHECK: struct mutex definition without comment

Add short comments describing what each mutex protects. The
channel lock protects the channel state and lights_lock protects
the lights array.

No functional change, just quiets checkpatch.

Signed-off-by: Vaibhav <contectforbusiness@proton.me>
---
 drivers/staging/greybus/light.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
index cab02b5da..a036fa2a0 100644
--- a/drivers/staging/greybus/light.c
+++ b/drivers/staging/greybus/light.c
@@ -37,7 +37,7 @@ struct gb_channel {
 	bool				releasing;
 	bool				strobe_state;
 	bool				active;
-	struct mutex			lock;
+	struct mutex			lock; /* protects channel */
 };
 
 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 lights */
 };
 
 static void gb_lights_channel_free(struct gb_channel *channel);

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

end of thread, other threads:[~2026-09-09 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04  5:56 [PATCH 2/2] staging: greybus: light: add comments to mutex definitions contectforbusiness
2026-09-07 16:26 ` gregkh
2026-09-09 13:34 ` contectforbusiness
2026-09-09 14:46 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®