mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Shivani Patel <patelshivani2283@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
	Christian Gromm <christian.gromm@microchip.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH v2] staging: most: video: Document locks in struct most_video_dev
Date: Tue, 17 Nov 2026 16:07:49 +0300	[thread overview]
Message-ID: <avxRpY8InfnNtkvE@stanley.mountain> (raw)
In-Reply-To: <20261116183355.22563-1-patelshivani2283@gmail.com>

On Tue, Nov 17, 2026 at 12:03:55AM +0530, Shivani Patel wrote:
> checkpatch.pl reports that list_lock and lock in struct most_video_dev
> are defined without a comment.
> 
> list_lock protects the pending_mbos list and the mute flag, which are
> accessed both from file operations and from the rx completion callback
> called by the MOST core. lock is assigned to vdev->lock and is used by
> the V4L2 core to serialize ioctls.
> 
> Add short comments describing what each lock protects.
> 
> Signed-off-by: Shivani Patel <patelshivani2283@gmail.com>
> ---
> v2:
>  - Add a commit message and Signed-off-by (Andy Shevchenko)
>  - Use the "staging: most: video:" subject prefix
>  - Make the comments shorter and accurate
>  - Drop the outreachy list (Julia Lawall)
> 
>  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 3a0445ff6..8833ab5c7 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 and @mute against the rx completion path */

Why is the rx path special?  I feel like if you really look at
this code you will see things that can be done better.  That's
what we really want from this kind of analysis.

regards,
dan carpenter


      reply	other threads:[~2026-11-17 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 18:33 Shivani Patel
2026-11-17 13:07 ` Dan Carpenter [this message]

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=avxRpY8InfnNtkvE@stanley.mountain \
    --to=error27@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=christian.gromm@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=parthiban.veerasooran@microchip.com \
    --cc=patelshivani2283@gmail.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®