[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ztc03cbpPjPZatoL@smile.fi.intel.com>
Date: Tue, 3 Sep 2024 19:10:05 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ye Zhang <ye.zhang@...k-chips.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl, heiko@...ech.de,
linux-gpio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
mika.westerberg@...ux.intel.com, tao.huang@...k-chips.com,
finley.xiao@...k-chips.com, tim.chen@...k-chips.com,
elaine.zhang@...k-chips.com
Subject: Re: [PATCH v3 12/12] gpio: rockchip: replace mutex_lock() with
guard()
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
Powered by blists - more mailing lists