From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: abdurrahman@nexthop.ai
Cc: Michal Simek <michal.simek@amd.com>,
Andi Shyti <andi.shyti@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
info@mocean-labs.com, linux-arm-kernel@lists.infradead.org,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v5 3/6] i2c: xiic: switch to devres managed APIs
Date: Tue, 27 Jan 2026 11:35:34 +0200 [thread overview]
Message-ID: <aXiG5p9BQ-vkAgbV@smile.fi.intel.com> (raw)
In-Reply-To: <20260126-i2c-xiic-v5-3-88a16a28721c@nexthop.ai>
On Mon, Jan 26, 2026 at 05:08:18PM +0000, Abdurrahman Hussain via B4 Relay wrote:
> Simplify the error code paths by switching to devres managed helper
> functions.
Thanks for the update, my comments below.
...
> + ret = devm_mutex_init(dev, &i2c->lock);
> + if (ret < 0)
Why ' < 0'?
> + return ret;
...
> + ret = devm_pm_runtime_set_active_enabled(dev);
> + if (ret < 0)
Ditto.
> + return ret;
...
> if (ret < 0) {
> dev_err_probe(&pdev->dev, ret, "Cannot claim IRQ\n");
> - goto err_pm_disable;
> + return ret;
return dev_err_probe(...);
> }
...
> ret = xiic_reinit(i2c);
> if (ret < 0) {
> dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n");
Ditto.
> - goto err_pm_disable;
> + return ret;
> }
...
> dev_dbg(&pdev->dev, "mmio %08lx irq %d scl clock frequency %d\n",
> (unsigned long)res->start, irq, i2c->i2c_clk);
Side note, consider using %pR instead of ugly casting for resources.
(separate change).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-01-27 9:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 17:08 [PATCH v5 0/6] i2c: xiic: use generic device property accessors Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-26 17:08 ` [PATCH v5 1/6] dt-bindings: i2c: xiic: make clocks optional Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-26 17:08 ` [PATCH v5 2/6] i2c: xiic: make the clock optional Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-27 9:36 ` Andy Shevchenko
2026-01-26 17:08 ` [PATCH v5 3/6] i2c: xiic: switch to devres managed APIs Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-27 9:35 ` Andy Shevchenko [this message]
2026-01-27 9:39 ` Andy Shevchenko
2026-01-26 17:08 ` [PATCH v5 4/6] i2c: xiic: remove duplicate error message Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-27 9:37 ` Andy Shevchenko
2026-01-26 17:08 ` [PATCH v5 5/6] i2c: xiic: switch to generic device property accessors Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-27 9:41 ` Andy Shevchenko
2026-01-26 17:08 ` [PATCH v5 6/6] i2c: xiic: cosmetic cleanup Abdurrahman Hussain
2026-01-26 17:08 ` Abdurrahman Hussain via B4 Relay
2026-01-27 9:44 ` Andy Shevchenko
2026-01-27 9:45 ` [PATCH v5 0/6] i2c: xiic: use generic device property accessors Andy Shevchenko
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=aXiG5p9BQ-vkAgbV@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=abdurrahman@nexthop.ai \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=info@mocean-labs.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=robh@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.