public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Rachit Dhar <rchtdhr@gmail.com>
Cc: Rachit Dhar <rchtdhr@gmail.com>,
	Viresh Kumar <vireshk@kernel.org>,
	Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rui Miguel Silva <rmfrfs@gmail.com>,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 2/2] staging: greybus: resolved checkpatch checks for light.c
Date: Sat,  7 Mar 2026 14:09:25 +0000	[thread overview]
Message-ID: <20260307140930.1732-3-rchtdhr@gmail.com> (raw)
In-Reply-To: <20260307140930.1732-1-rchtdhr@gmail.com>

Added comments to mutex declarations, to resolve the associated checkpatch.pl checks:

CHECK: struct mutex definition without comment
+       struct mutex                    lock;

CHECK: struct mutex definition without comment
+       struct mutex            lights_lock;

Signed-off-by: Rachit Dhar <rchtdhr@gmail.com>
---
 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 cab02b5da867..1391c2b5d5f4 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 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);
-- 
2.43.0


  parent reply	other threads:[~2026-03-07 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-07 14:09 [PATCH v4 0/2] staging: greybus: fixing checkpatch issues Rachit Dhar
2026-03-07 14:09 ` [PATCH v4 1/2] staging: greybus: fixed styling issue in fw-management.c Rachit Dhar
2026-03-07 14:09 ` Rachit Dhar [this message]
2026-03-07 14:39   ` [PATCH v4 2/2] staging: greybus: resolved checkpatch checks for light.c Dan Carpenter
2026-03-07 14:44   ` Dan Carpenter
2026-03-08 18:48 ` [PATCH v4 0/2] staging: greybus: fixing checkpatch issues Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260307140930.1732-3-rchtdhr@gmail.com \
    --to=rchtdhr@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=rmfrfs@gmail.com \
    --cc=vireshk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox