[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXiJADHPJ0NXLVNa@smile.fi.intel.com>
Date: Tue, 27 Jan 2026 11:44:32 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: abdurrahman@...thop.ai
Cc: Michal Simek <michal.simek@....com>, Andi Shyti <andi.shyti@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, info@...ean-labs.com,
linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v5 6/6] i2c: xiic: cosmetic cleanup
On Mon, Jan 26, 2026 at 05:08:21PM +0000, Abdurrahman Hussain via B4 Relay wrote:
> Re-use dev pointer instead of referencing &pdev->dev everywhere.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...el.com>
A couple of nit-picks to be addressed though.
...
> - i2c->dev = &pdev->dev;
> - pm_runtime_set_autosuspend_delay(i2c->dev, XIIC_PM_TIMEOUT);
> - pm_runtime_use_autosuspend(i2c->dev);
> + i2c->dev = dev;
+ blank line here.
> + pm_runtime_set_autosuspend_delay(dev, XIIC_PM_TIMEOUT);
> + pm_runtime_use_autosuspend(dev);
> ret = devm_pm_runtime_set_active_enabled(dev);
> if (ret < 0)
> return ret;
...
> ret = xiic_reinit(i2c);
> if (ret < 0) {
> - dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n");
> + dev_err_probe(dev, ret, "Cannot xiic_reinit\n");
> return ret;
> }
It should be integrated in the second patch or so, I have already commented on
that.
...
> - ret = pm_runtime_get_sync(i2c->dev);
> + ret = pm_runtime_get_sync(dev);
>
Drop this blank line as well.
> if (ret < 0)
> - dev_warn(&pdev->dev, "Failed to activate device for removal (%pe)\n",
> + dev_warn(dev, "Failed to activate device for removal (%pe)\n",
> ERR_PTR(ret));
> else
> xiic_deinit(i2c);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists