[PATCH v3 11/12] media: staging: rkisp1: use the right variants of spin_lock

Tomasz Figa tfiga at chromium.org
Fri Sep 25 16:51:30 EDT 2020


Hi Dafna,

On Tue, Sep 22, 2020 at 01:34:01PM +0200, Dafna Hirschfeld wrote:
> When locking, use either 'spin_lock' or 'spin_lock_irq'
> according to the context. There is nowhere need to
> use 'spin_lock_irqsave'.
> Outside of irq context, always use 'spin_lock_irq'
> to be on the safe side.
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld at collabora.com>
> ---
>  drivers/staging/media/rkisp1/rkisp1-capture.c | 15 ++++++--------
>  drivers/staging/media/rkisp1/rkisp1-params.c  | 20 ++++++++-----------
>  2 files changed, 14 insertions(+), 21 deletions(-)
>

I'd prefer to keep the irqsave variant, as it doesn't hurt, is more
consistent (all the calls on the same spinlock use the same variant) and
makes it possible to refactor the code easier in the future.

Best regards,
Tomasz



More information about the Linux-rockchip mailing list