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]
Date:   Sun, 24 Sep 2023 22:56:00 +0200
From:   Wolfram Sang <wsa@...nel.org>
To:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Andi Shyti <andi.shyti@...nel.org>,
        Mario Limonciello <mario.limonciello@....com>,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Jan Dabros <jsd@...ihalf.com>
Subject: Re: [PATCH v1 1/9] i2c: designware: Move has_acpi_companion() to
 common code

On Thu, Aug 03, 2023 at 04:43:32PM +0300, Jarkko Nikula wrote:
> On 7/31/23 23:14, Andy Shevchenko wrote:
> > On Fri, Jul 28, 2023 at 02:33:07PM +0300, Jarkko Nikula wrote:
> > > On 7/26/23 00:45, Andi Shyti wrote:
> > > > On Tue, Jul 25, 2023 at 05:30:15PM +0300, Andy Shevchenko wrote:
> > 
> > ...
> > 
> > > > > -int i2c_dw_acpi_configure(struct device *device)
> > > > > +static void i2c_dw_acpi_do_configure(struct dw_i2c_dev *dev, struct device *device)
> > > 
> > > Because of this dual dev pointer obscurity which is cleaned in the next
> > > patch and Andi's comment below in my opinion it makes sense to combine
> > > patches 1 and 2.
> > 
> > Besides that these 2 are logically slightly different, the changes don't drop
> > the duality here. And there is also the other patch at the end of the series
> > that makes the below disappear.
> > 
> > Not sure that any of these would be the best approach (Git commit is cheap,
> > maintenance and backporting might be harder). So, ideas are welcome!
> > 
> Unless I'm missing something you won't need to carry both struct dw_i2c_dev
> *dev and struct device *device since struct dw_i2c_dev carries it already
> and it's set before calling the dw_i2c_of_configure() and
> i2c_dw_acpi_configure().
> 
> Also it feels needless to add new _do_configure() functions since only
> reason for them seems to be how patches are organized now.
> 
> So if instead of this in i2c_dw_fw_parse_and_configure()
> 
> 	if (is_of_node(fwnode))
> 		i2c_dw_of_do_configure(dev, dev->dev);
> 	else if (is_acpi_node(fwnode))
> 		i2c_dw_acpi_do_configure(dev, dev->dev);
> 
> let end result be
> 
> 	if (is_of_node(fwnode))
> 		i2c_dw_of_configure(dev);
> 	else if (is_acpi_node(fwnode))
> 		i2c_dw_acpi_configure(dev);
> 
> My gut feeling says patchset would be a bit simpler if we aim for this end
> result in mind.
> 
> Simplest patches like int to void return type conversion first since either
> i2c_dw_acpi_configure() and dw_i2c_of_configure() return is not used now.
> Then perhaps dw_i2c_of_configure() renaming.
> 
> Moving to common code I don't know how well it's splittable into smaller
> patches or would single bigger patch look better.

Does this all mean that the series needs to be refactored?


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ