From: Dan Carpenter <dan.carpenter@linaro.org>
To: laurent.pinchart+renesas@ideasonboard.com
Cc: linux-renesas-soc@vger.kernel.org
Subject: [bug report] [media] v4l: vsp1: Add histogram support
Date: Sat, 4 May 2024 23:13:34 +0300 [thread overview]
Message-ID: <164d74ff-312c-468f-be64-afa7182cd2f4@moroto.mountain> (raw)
Hello Laurent Pinchart,
Commit 99362e32332b ("[media] v4l: vsp1: Add histogram support") from
Sep 7, 2016 (linux-next), leads to the following Smatch static
checker warning:
drivers/media/platform/renesas/vsp1/vsp1_histo.c:153 histo_stop_streaming()
warn: mixing irqsave and irq
drivers/media/platform/renesas/vsp1/vsp1_histo.c
139 static void histo_stop_streaming(struct vb2_queue *vq)
140 {
141 struct vsp1_histogram *histo = vb2_get_drv_priv(vq);
142 struct vsp1_histogram_buffer *buffer;
143 unsigned long flags;
144
145 spin_lock_irqsave(&histo->irqlock, flags);
_irqsave() means that perhaps the caller already has IRQs disabled.
146
147 /* Remove all buffers from the IRQ queue. */
148 list_for_each_entry(buffer, &histo->irqqueue, queue)
149 vb2_buffer_done(&buffer->buf.vb2_buf, VB2_BUF_STATE_ERROR);
150 INIT_LIST_HEAD(&histo->irqqueue);
151
152 /* Wait for the buffer being read out (if any) to complete. */
--> 153 wait_event_lock_irq(histo->wait_queue, !histo->readout, histo->irqlock);
^^^^
This briefly enables IRQs
154
155 spin_unlock_irqrestore(&histo->irqlock, flags);
^^^^^^^^^^^
This resets it back to what we want.
156 }
regards,
dan carpenter
reply other threads:[~2024-05-04 20:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=164d74ff-312c-468f-be64-afa7182cd2f4@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).