From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Rong Qianfeng <rongqianfeng@vivo.com>
Cc: biju.das.jz@bp.renesas.com,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Andi Shyti <andi.shyti@kernel.org>,
Paul Cercueil <paul@crapouillou.net>,
linux-renesas-soc@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
opensource.kernel@vivo.com
Subject: Re: [PATCH v3 1/4] i2c: emev2: Use devm_clk_get_enabled() helpers
Date: Fri, 23 Aug 2024 18:30:36 +0300 [thread overview]
Message-ID: <ZsirHLneY1FiOStJ@black.fi.intel.com> (raw)
In-Reply-To: <20240823035116.21590-2-rongqianfeng@vivo.com>
On Fri, Aug 23, 2024 at 11:51:13AM +0800, Rong Qianfeng wrote:
> The devm_clk_get_enabled() helpers:
> - call devm_clk_get()
> - call clk_prepare_enable() and register what is needed in order to
> call clk_disable_unprepare() when needed, as a managed resource.
>
> This simplifies the code and avoids the calls to clk_disable_unprepare().
...
> ret = platform_get_irq(pdev, 0);
> if (ret < 0)
> - goto err_clk;
> + return ret;
> priv->irq = ret;
(1)
> ret = devm_request_irq(&pdev->dev, priv->irq, em_i2c_irq_handler, 0,
> "em_i2c", priv);
> if (ret)
> - goto err_clk;
> + return ret;
>
> ret = i2c_add_adapter(&priv->adap);
>
While at it, you may move this blank line to (1) above.
> if (ret)
> - goto err_clk;
> + return ret;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-08-23 15:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 3:51 [PATCH v3 0/4] i2c: Use devm_clk_get_enabled() helpers Rong Qianfeng
2024-08-23 3:51 ` [PATCH v3 1/4] i2c: emev2: " Rong Qianfeng
2024-08-23 15:30 ` Andy Shevchenko [this message]
2024-08-23 3:51 ` [PATCH v3 2/4] i2c: emev2: drop sclk from struct em_i2c_device Rong Qianfeng
2024-08-26 9:09 ` Wolfram Sang
2024-08-26 9:29 ` Rong Qianfeng
2024-08-23 3:51 ` [PATCH v3 3/4] i2c: jz4780: Use devm_clk_get_enabled() helpers Rong Qianfeng
2024-08-23 15:33 ` Andy Shevchenko
2024-08-26 3:03 ` Rong Qianfeng
2024-08-26 10:33 ` Andy Shevchenko
2024-08-26 11:56 ` Rong Qianfeng
2024-08-23 3:51 ` [PATCH v3 4/4] i2c: jz4780: Use dev_err_probe() Rong Qianfeng
2024-08-23 15:36 ` Andy Shevchenko
2024-08-26 1:55 ` Rong Qianfeng
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=ZsirHLneY1FiOStJ@black.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andi.shyti@kernel.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=paul@crapouillou.net \
--cc=rongqianfeng@vivo.com \
--cc=wsa+renesas@sang-engineering.com \
/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