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

* Re: [PATCH 2/2] staging: greybus: light: add comments to mutex definitions
  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
  2 siblings, 0 replies; 4+ messages in thread
From: gregkh @ 2026-09-07 16:26 UTC (permalink / raw)
  To: contectforbusiness
  Cc: rmfrfs, johan, elder, greybus-dev, linux-staging, linux-kernel

On Fri, Sep 04, 2026 at 05:56:25AM +0000, contectforbusiness@proton.me wrote:
> 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(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- It looks like you did not use your "real" name for the patch on either
  the Signed-off-by: line, or the From: line (both of which have to
  match).  Please read the kernel file,
  Documentation/process/submitting-patches.rst for how to do this
  correctly.


If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH 2/2] staging: greybus: light: add comments to mutex definitions
  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
  2 siblings, 0 replies; 4+ messages in thread
From: contectforbusiness @ 2026-09-09 13:34 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 Agarwal <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

* Re: [PATCH 2/2] staging: greybus: light: add comments to mutex definitions
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2026-09-09 14:46 UTC (permalink / raw)
  To: contectforbusiness
  Cc: gregkh, rmfrfs, johan, elder, greybus-dev, linux-staging, linux-kernel

On Fri, Sep 04, 2026 at 05:56:25AM +0000, contectforbusiness@proton.me wrote:
> checkpatch complains about:
> 
>   CHECK: struct mutex definition without comment
> 
> Add short comments describing what each mutex protects.

Is this an AI patch?  Why write a short description?  That's the
opposite of what I want.  I want a complete analysis.

> 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 */

This comment is useless and wrong.

I hate this checkpatch warning...

regards,
dan carpenter


^ 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®