lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aH51idxbwW1SAExG@smile.fi.intel.com>
Date: Mon, 21 Jul 2025 20:14:49 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: sboyd@...nel.org, jic23@...nel.org, dlechner@...libre.com,
	nuno.sa@...log.com, andy@...nel.org, arnd@...db.de,
	gregkh@...uxfoundation.org, srini@...nel.org, vkoul@...nel.org,
	kishon@...nel.org, sre@...nel.org, krzysztof.kozlowski@...aro.org,
	u.kleine-koenig@...libre.com, linux-arm-msm@...r.kernel.org,
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-phy@...ts.infradead.org, linux-pm@...r.kernel.org,
	kernel@...labora.com, wenst@...omium.org
Subject: Re: [PATCH v1 3/7] power: reset: qcom-pon: Migrate to
 devm_spmi_subdevice_alloc_and_add()

On Mon, Jul 21, 2025 at 03:05:46PM +0200, AngeloGioacchino Del Regno wrote:
> Il 21/07/25 13:36, Andy Shevchenko ha scritto:
> > On Mon, Jul 21, 2025 at 09:55:21AM +0200, AngeloGioacchino Del Regno wrote:

...

> > > +	if (!pdev->dev.parent)
> > > +		return -ENODEV;
> > 
> > You can start using
> > 
> > 	struct device *dev = &pdev->dev;
> > 
> > here and perhaps one may convert the rest to it...
> > 
> > ...
> > 
> > >   	error = of_property_read_u32(pdev->dev.of_node, "reg",
> > 
> > ...including, but not limited to, use of device_property_read_u32(dev, ...) here.
> > 
> 
> I didn't do that for one single reason: I did not want to add noise to the commits
> and wanted those to exclusively migrate the drivers to the new API, literally
> without doing *anything* else unnecessary, even if I have located some almost
> effortless improvements that I could've done to those drivers.
> 
> Please - I prefer to keep it this way: these are the first commits that add the
> usage of the new functions and of the concept of SPMI subdevices, and I really
> want those to contain just that and nothing else - because I suspect that these
> will be taken as example and will be read by the next person that is implementing
> a new SPMI (sub)driver or converting any remaining ones to subdevice.

You can introduce a temporary variable in this change and use it only in the
lines you have added/touched. We have similar approach in several drivers.
Then somebody (not specifically should be you) can move it forward.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ