Re: [PATCH v3 12/12] gpio: rockchip: replace mutex_lock() with guard()

From: Andy Shevchenko
Date: Tue Sep 03 2024 - 12:11:15 EST


On Tue, Sep 03, 2024 at 03:36:49PM +0800, Ye Zhang wrote:
> Replacing mutex_lock with guard() simplifies the code and helps avoid

mutex_lock()

avoiding

> deadlocks.

...

> --- a/drivers/gpio/gpio-rockchip.c
> +++ b/drivers/gpio/gpio-rockchip.c

+ cleanup.h

...

> }
> - mutex_lock(&bank->deferred_lock);
> + guard(mutex)(&bank->deferred_lock);

Make it surrounded by blank lines.

> + ret = rockchip_get_bank_data(bank);
> + if (ret)
> + goto err_disabled_clk;

--
With Best Regards,
Andy Shevchenko