kernel_samsung_a53x/drivers/media/platform/vsp1
Laurent Pinchart de93f11378 media: renesas: vsp1: Fix _irqsave and _irq mix
[ Upstream commit 57edbbcf5258c378a9b9d0c80d33b03a010b22c8 ]

The histogram support mixes _irqsave and _irq, causing the following
smatch warning:

     drivers/media/platform/renesas/vsp1/vsp1_histo.c:153 histo_stop_streaming()
     warn: mixing irqsave and irq

The histo_stop_streaming() calls spin_lock_irqsave() followed by
wait_event_lock_irq(). The former hints that interrupts may be disabled
by the caller, while the latter reenables interrupts unconditionally.
This doesn't cause any real bug, as the function is always called with
interrupts enabled, but the pattern is still incorrect.

Fix the problem by using spin_lock_irq() instead of spin_lock_irqsave()
in histo_stop_streaming(). While at it, switch to spin_lock_irq() and
spin_lock() as appropriate elsewhere.

Fixes: 99362e32332b ("[media] v4l: vsp1: Add histogram support")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-renesas-soc/164d74ff-312c-468f-be64-afa7182cd2f4@moroto.mountain/
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:09 +01:00
..
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_brx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_brx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_clu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_clu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_dl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_dl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_drm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_drm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_drv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_entity.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_entity.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_hgo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_hgo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_hgt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_hgt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_histo.c media: renesas: vsp1: Fix _irqsave and _irq mix 2024-11-23 23:20:09 +01:00
vsp1_histo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_hsit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_hsit.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_lif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_lif.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_lut.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_lut.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_pipe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_pipe.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_rpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_rwpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_rwpf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_sru.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_sru.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_uds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_uds.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_uif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_uif.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_video.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_video.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1_wpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00