mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: most: video: document lock fields
@ 2026-11-05 10:12 Hussain Sitamouwala
  2026-11-05 12:48 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Hussain Sitamouwala @ 2026-11-05 10:12 UTC (permalink / raw)
  To: outreachy
  Cc: parthiban.veerasooran, christian.gromm, gregkh, linux-staging,
	linux-kernel, Hussain Sitamouwala

Fix checkpatch.pl checks:

CHECK: spinlock_t definition without comment
CHECK: struct mutex definition without comment

Add a comment to each lock in struct most_video_dev describing what it
protects. No functional change.

Signed-off-by: Hussain Sitamouwala <husainsitamuwala21@gmail.com>
---
 drivers/staging/most/video/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 3a0445ff62f4..d60be8a741ed 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -33,14 +33,14 @@ struct most_video_dev {
 	bool mute;
 
 	struct list_head pending_mbos;
-	spinlock_t list_lock;
+	spinlock_t list_lock; /* protects pending_mbos */
 
 	struct v4l2_device v4l2_dev;
 	atomic_t access_ref;
 	struct video_device *vdev;
 	unsigned int ctrl_input;
 
-	struct mutex lock;
+	struct mutex lock; /* serialization lock used by the V4L2 core */
 
 	wait_queue_head_t wait_data;
 };
-- 
2.53.0


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

* Re: [PATCH] staging: most: video: document lock fields
  2026-11-05 10:12 [PATCH] staging: most: video: document lock fields Hussain Sitamouwala
@ 2026-11-05 12:48 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-11-05 12:48 UTC (permalink / raw)
  To: Hussain Sitamouwala
  Cc: outreachy, parthiban.veerasooran, christian.gromm, gregkh,
	linux-staging, linux-kernel

On Thu, Nov 05, 2026 at 10:12:22AM +0000, Hussain Sitamouwala wrote:
> Fix checkpatch.pl checks:
> 
> CHECK: spinlock_t definition without comment
> CHECK: struct mutex definition without comment
> 
> Add a comment to each lock in struct most_video_dev describing what it
> protects. No functional change.
> 
> Signed-off-by: Hussain Sitamouwala <husainsitamuwala21@gmail.com>
> ---
>  drivers/staging/most/video/video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
> index 3a0445ff62f4..d60be8a741ed 100644
> --- a/drivers/staging/most/video/video.c
> +++ b/drivers/staging/most/video/video.c
> @@ -33,14 +33,14 @@ struct most_video_dev {
>  	bool mute;
>  
>  	struct list_head pending_mbos;
> -	spinlock_t list_lock;
> +	spinlock_t list_lock; /* protects pending_mbos */

What I want here is an audit of the locking.  I imagine that the result
of the audit will be more than a two word summary.

regards,
dan carpenter


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

end of thread, other threads:[~2026-11-05 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 10:12 [PATCH] staging: most: video: document lock fields Hussain Sitamouwala
2026-11-05 12:48 ` 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®