* [PATCH] staging: greybus: camera: add comment for mutex
@ 2026-02-25 11:05 Jose A. Perez de Azpillaga
2026-02-25 11:18 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Jose A. Perez de Azpillaga @ 2026-02-25 11:05 UTC (permalink / raw)
To: johan, elder, gregkh; +Cc: greybus-dev, linux-staging, linux-kernel, azpijr
Add a comment to the mutex definition in struct gb_camera to
describe what it protects, satisfying a checkpatch.pl CHECK.
Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
---
Hi,
I noticed a CHECK for alignment in this file on line 267. However,
fixing it pushed the line over 100 characters. I felt that adding
extreme indentation might add more noise than value, so I've only
included the mutex comment fix here.
I'd appreciate your guidance on whether you prefer strict alignment
even if it breaks the 100-column rule in these specific cases.
---
drivers/staging/greybus/camera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index 62b55bb28408..a6f3637b8871 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -53,7 +53,7 @@ struct gb_camera {
struct gb_connection *data_connection;
u16 data_cport_id;
- struct mutex mutex;
+ struct mutex mutex; /* Protects camera state */
enum gb_camera_state state;
struct {
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: greybus: camera: add comment for mutex
2026-02-25 11:05 [PATCH] staging: greybus: camera: add comment for mutex Jose A. Perez de Azpillaga
@ 2026-02-25 11:18 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2026-02-25 11:18 UTC (permalink / raw)
To: Jose A. Perez de Azpillaga
Cc: johan, elder, gregkh, greybus-dev, linux-staging, linux-kernel
On Wed, Feb 25, 2026 at 12:05:06PM +0100, Jose A. Perez de Azpillaga wrote:
> diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
> index 62b55bb28408..a6f3637b8871 100644
> --- a/drivers/staging/greybus/camera.c
> +++ b/drivers/staging/greybus/camera.c
> @@ -53,7 +53,7 @@ struct gb_camera {
> struct gb_connection *data_connection;
> u16 data_cport_id;
>
> - struct mutex mutex;
> + struct mutex mutex; /* Protects camera state */
I'm not sure what it means, and looking at how the mutex is used I
don't feel it's accurate either.
To be honest, I rarely love these lock documentation patches... :/
They're often really vague and sometimes seem like just guessing based
on the name.
regards,
dan carpenter
> enum gb_camera_state state;
>
> struct {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: greybus: camera: add comment for mutex
[not found] <DAN_CARPENTERS_MESSAGE_ID>
@ 2026-02-25 11:31 ` Jose A. Perez de Azpillaga
0 siblings, 0 replies; 3+ messages in thread
From: Jose A. Perez de Azpillaga @ 2026-02-25 11:31 UTC (permalink / raw)
To: dan.carpenter
Cc: johan, elder, gregkh, greybus-dev, linux-staging, linux-kernel,
azpijr
Thank you for the honest feedback. I'm a new contributor and I was
trying to resolve the checkpatch.pl CHECKs to get familiar with the
process, but I see now that vague documentation can be worse than none
at all.
I'll withdraw this patch. Since I'm looking to make my first meaningful
contribution to staging, do you have any suggestions on what types of
issues in Greybus are actually helpful for a beginner to tackle?
regards, jose
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-25 11:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 11:05 [PATCH] staging: greybus: camera: add comment for mutex Jose A. Perez de Azpillaga
2026-02-25 11:18 ` Dan Carpenter
[not found] <DAN_CARPENTERS_MESSAGE_ID>
2026-02-25 11:31 ` Jose A. Perez de Azpillaga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox