From: Dan Carpenter <error27@gmail.com>
To: Muhammad Israr <7israr.work@gmail.com>
Cc: parthiban.veerasooran@microchip.com,
christian.gromm@microchip.com, gregkh@linuxfoundation.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: most: video: add comments to mutex and spinlock definitions
Date: Thu, 10 Sep 2026 16:39:17 +0300 [thread overview]
Message-ID: <aqKzBTM-CdBqQzXi@stanley.mountain> (raw)
In-Reply-To: <20260910124403.95741-1-7israr.work@gmail.com>
On Thu, Sep 10, 2026 at 05:44:03PM +0500, Muhammad Israr wrote:
> 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 <7israr.work@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2026-09-10 13:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 12:44 Muhammad Israr
2026-09-10 13:39 ` Dan Carpenter [this message]
2026-09-11 19:21 ` Muhammad Israr
2026-09-12 13:24 ` Dan Carpenter
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=aqKzBTM-CdBqQzXi@stanley.mountain \
--to=error27@gmail.com \
--cc=7israr.work@gmail.com \
--cc=christian.gromm@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=parthiban.veerasooran@microchip.com \
/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
all inboxes | Powered by JetHome®