Thread (6 messages) 6 messages, 2 authors, 2026-09-12

Re: [PATCH] staging: most: video: add comments to mutex and spinlock definitions

flat view

From: Dan Carpenter <hidden>
Date: 2026-09-10 13:39:24
Also in: lkml

On Thu, Sep 10, 2026 at 05:44:03PM +0500, Muhammad Israr wrote:
quoted hunk ↗ jump to hunk
Add comments describing what the list_lock spinlock and lock mutex
in struct most_video_dev protect, per checkpatch.pl's
"definition without comment" check.

list_lock protects the pending_mbos list. The mutex is registered
as vdev->lock and is used by the V4L2 core to serialize
video_device ioctl calls; it is not locked directly in this file.

Signed-off-by: Muhammad Israr <redacted>
---
 drivers/staging/most/video/video.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 3a0445ff62f4..41b617b553aa 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -33,6 +33,7 @@ struct most_video_dev {
 	bool mute;
 
 	struct list_head pending_mbos;
+	/* protects pending_mbos */
 	spinlock_t list_lock;
It's supposed to but it is buggy...  What prevents multiple
threads from reading comp_vdev_read() at the same time?
I prefer to keep the warning around until someone fixes the
code.

I didn't read the other change.

regards,
dan carpenter

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help