public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Mario Limonciello <mario.limonciello@amd.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Jan Dabros <jsd@semihalf.com>
Subject: Re: [PATCH v1 1/9] i2c: designware: Move has_acpi_companion() to common code
Date: Sun, 24 Sep 2023 22:56:00 +0200	[thread overview]
Message-ID: <ZRCiYI5SMEVxxJ98@shikoro> (raw)
In-Reply-To: <2e2f4d7e-2831-9161-9564-3d1e89511727@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2303 bytes --]

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?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-09-24 20:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 14:30 [PATCH v1 0/9] i2c: designware: code consolidation & cleanups Andy Shevchenko
2023-07-25 14:30 ` [PATCH v1 1/9] i2c: designware: Move has_acpi_companion() to common code Andy Shevchenko
2023-07-25 21:45   ` Andi Shyti
2023-07-28 11:33     ` Jarkko Nikula
2023-07-31 20:14       ` Andy Shevchenko
2023-08-03 13:43         ` Jarkko Nikula
2023-09-24 20:56           ` Wolfram Sang [this message]
2023-09-25  6:46             ` Andy Shevchenko
2023-09-25  6:55               ` Wolfram Sang
2023-07-25 14:30 ` [PATCH v1 2/9] i2c: designware: Change i2c_dw_acpi_configure() prototype Andy Shevchenko
2023-07-25 21:45   ` Andi Shyti
2023-07-25 14:30 ` [PATCH v1 3/9] i2c: designware: Align dw_i2c_of_configure() with i2c_dw_acpi_configure() Andy Shevchenko
2023-07-25 21:48   ` Andi Shyti
2023-07-26 14:48     ` Andy Shevchenko
2023-07-25 14:30 ` [PATCH v1 4/9] i2c: designware: Propagate firmware node Andy Shevchenko
2023-07-28 12:25   ` Jarkko Nikula
2023-07-31 20:09     ` Andy Shevchenko
2023-08-04 20:59       ` Andi Shyti
2023-08-07 14:32         ` Andy Shevchenko
2023-07-25 14:30 ` [PATCH v1 5/9] i2c: designware: Always provide ID tables Andy Shevchenko
2023-07-28 12:33   ` Jarkko Nikula
2023-07-31 20:05     ` Andy Shevchenko
2023-08-04 21:00       ` Andi Shyti
2023-08-07 14:34         ` Andy Shevchenko
2023-07-25 14:30 ` [PATCH v1 6/9] i2c: designware: Consolidate firmware parsing and configure code Andy Shevchenko
2023-08-04 21:22   ` Andi Shyti
2023-07-25 14:30 ` [PATCH v1 7/9] i2c: desingware: Unify firmware type checks Andy Shevchenko
2023-08-04 21:31   ` Andi Shyti
2023-07-25 14:30 ` [PATCH v1 8/9] i2c: designware: Get rid of redundant 'else' Andy Shevchenko
2023-08-04 21:33   ` Andi Shyti
2023-07-25 14:30 ` [PATCH v1 9/9] i2c: designware: Fix spelling and other issues in the comments Andy Shevchenko
2023-08-04 21:41   ` Andi Shyti
2023-08-07 14:37     ` Andy Shevchenko
2023-08-07 15:04       ` Andi Shyti
2023-07-25 15:22 ` [PATCH v1 0/9] i2c: designware: code consolidation & cleanups Limonciello, Mario

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=ZRCiYI5SMEVxxJ98@shikoro \
    --to=wsa@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mika.westerberg@linux.intel.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