Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp828947rdh; Sun, 24 Sep 2023 13:56:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8S07JNw9n0DTDdjsPExTEEMqj+8M0KLBQ77xxVysicW+Mt59EaS41gKRv1POH5ZofSY89 X-Received: by 2002:a05:6870:65a6:b0:1d0:da52:4235 with SMTP id fp38-20020a05687065a600b001d0da524235mr7313918oab.26.1695588975180; Sun, 24 Sep 2023 13:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695588975; cv=none; d=google.com; s=arc-20160816; b=c4HhzQiGH/vq81gKG2pPhtarbKewQXKhCrVKX9OF9eqNyILw84Sylt4+Wd7q1ACszq GJouyPz3QxiwqIwiuT5iD7hIqQ8ue8j/tCP7aBZJr7Ji1iJDljGtfWPRbvBCHwHAGf2l 2bys30TA/TkXGq6hTvd/Dv+51Hy2PDbJ3K2Y1oVhL+GsPa7cqz6URsdQZMcEs6Qo/4Lw 4lMAXSnEMF0GSCseqW8Xxw+gs8zw4Ju4Uc4u4kztfqnZGXn17OLft0tZ2IbvQdxAuTxW RyrLTI+qCp8HtxphybvDRmmdQmRUhWtsdvjO/feA8JYU7MorhP/1W9rLurtXlbEnnaNc L8Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=QcvckET8A5qOfcUES9oFbX6BEVMGiZoxsJ7j1+9U2vQ=; fh=eqyBDWXQqaWxDT2BM64R4p8h8ailHqSCZ3LH5YeO3jo=; b=1K/l5qTsc4UTgfCsSlbS/RzaYs4pK4OpDgQdA3wQUDzszX3K050XOiKTE4A4FllIdq j5uePR80OcTuexVvLj+759snqxNuW060y4qwH4jleKwwKeIdMakk2DXtOR270qsrob5j FW0aJNtIKtUYMK6TLiVF8uj9AKXFIlP2wQxcO6Q50st05ca6EOrpkpXj2WT8uInc8jmj PTJEXdWPWFpIHHgUgRWwxsyW5r4t7foFr+ueiiCwW7skzYnxIjyv6h3t8coAQ4D8fSO9 IeLcNuMgw6BoiVcxwzTcZYXHsTULAwLmMKbGNkYMBQRMLBHcYrnUY9Gq7QCSKSaes9Yh DoKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmGVh311; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bt22-20020a056a00439600b00690dc61cc93si8492100pfb.403.2023.09.24.13.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 13:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmGVh311; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D17368038FB2; Sun, 24 Sep 2023 13:56:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjIXU4L (ORCPT + 99 others); Sun, 24 Sep 2023 16:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjIXU4K (ORCPT ); Sun, 24 Sep 2023 16:56:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0141EE; Sun, 24 Sep 2023 13:56:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C40B1C433C8; Sun, 24 Sep 2023 20:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695588964; bh=eli+a6xpbGKrYE4WULT6ADRUN8cVjtarJkSExGSpHgc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmGVh311sNAiu1ZifEr7U6q4HyZWu9Ztw7iVbdxJteoO5XktWmF/peG+MfZMpUOkU MkzVEAK9zH6Nf3yF7d2tJ4vkYlubPycQzlsROVBlZYxqBGBbysYVZyaaaXIqJl3yNe Mi1ncErtnx740r7+eFxT7jYCJpG4RPLXsyqJTS3Q4jKju2E5kj4znNDh+r7XeLBPXI JqR+8h/BOjDyvpp0Llv8qb6+xJWopK5Afjcf2XbovS9BuLJGjmzqhfzSmWNUZq8rbg uoViV4e/MMkzyfOgBXhmi3z93BkjO03MLipBmjxoD5nm9k5wfJ1SjQeiazBHln39zp j1aiC/4yvuiQw== Date: Sun, 24 Sep 2023 22:56:00 +0200 From: Wolfram Sang To: Jarkko Nikula Cc: Andy Shevchenko , Andi Shyti , Mario Limonciello , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Mika Westerberg , Jan Dabros Subject: Re: [PATCH v1 1/9] i2c: designware: Move has_acpi_companion() to common code Message-ID: Mail-Followup-To: Wolfram Sang , Jarkko Nikula , Andy Shevchenko , Andi Shyti , Mario Limonciello , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Mika Westerberg , Jan Dabros References: <20230725143023.86325-1-andriy.shevchenko@linux.intel.com> <20230725143023.86325-2-andriy.shevchenko@linux.intel.com> <20230725214521.zxjqinryvva2zanx@intel.intel> <928d54c4-ec71-5f09-ed66-5f9c52aca6ba@linux.intel.com> <2e2f4d7e-2831-9161-9564-3d1e89511727@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="OPcQ6rHun7cvimSP" Content-Disposition: inline In-Reply-To: <2e2f4d7e-2831-9161-9564-3d1e89511727@linux.intel.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 24 Sep 2023 13:56:13 -0700 (PDT) --OPcQ6rHun7cvimSP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > >=20 > > ... > >=20 > > > > > -int i2c_dw_acpi_configure(struct device *device) > > > > > +static void i2c_dw_acpi_do_configure(struct dw_i2c_dev *dev, str= uct device *device) > > >=20 > > > Because of this dual dev pointer obscurity which is cleaned in the ne= xt > > > patch and Andi's comment below in my opinion it makes sense to combine > > > patches 1 and 2. > >=20 > > 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 s= eries > > that makes the below disappear. > >=20 > > Not sure that any of these would be the best approach (Git commit is ch= eap, > > maintenance and backporting might be harder). So, ideas are welcome! > >=20 > Unless I'm missing something you won't need to carry both struct dw_i2c_d= ev > *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(). >=20 > Also it feels needless to add new _do_configure() functions since only > reason for them seems to be how patches are organized now. >=20 > So if instead of this in i2c_dw_fw_parse_and_configure() >=20 > 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); >=20 > let end result be >=20 > if (is_of_node(fwnode)) > i2c_dw_of_configure(dev); > else if (is_acpi_node(fwnode)) > i2c_dw_acpi_configure(dev); >=20 > My gut feeling says patchset would be a bit simpler if we aim for this end > result in mind. >=20 > Simplest patches like int to void return type conversion first since eith= er > i2c_dw_acpi_configure() and dw_i2c_of_configure() return is not used now. > Then perhaps dw_i2c_of_configure() renaming. >=20 > 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? --OPcQ6rHun7cvimSP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmUQomAACgkQFA3kzBSg KbYm7g//R3U106FWzwxdqiGWBmStt2qi2WlQG4Jxw2FW9LfeOQkVO42xF1i2noHY iWMPw+F/0li2p/84mpYZ0c4G2D7lgsR88HUuHEwn8c6H9ZwtepjmtkLXngLu2aGC f32rQ/AX04HfnA2DddJN8vM/D05l0IRDlE1t+fImjLsM5NwGRAwAe8ikQrYVgAHy Z7VC/gDrUZRxdWy1bseh35p3BazQdd5KyspgE7p8KGCWHh5054k4xqIZ3aLNIbJg FKLVPLeFLoBc5PbTjT1Ptw8tbxilPrlX4CfRjpLeczYbsts1J/czpxAS4AeNL4sD numdLRJFgVlOdpCVG9YbiPSB0ZzToi9pWOakIrRc4vbUZoSst7tZA6P/30u6v+nu 6HRL5VR6m94LXOSu6Mr2dZgZ7vDcyXMDUyc77s8fmjAmB4rg4TQD7rsLCp8fjv6q 7+/ZubWgsHmzoKmrYiltVVxK7aF7n/Tuxdi2rc4iIXtsX2QeUkJkVWR2N8Yt7zDB WU6RyyOAgwHLa6FAdAgeybUYkzjJ8kc42RcWd1dYY2TY9As4MtdTfyr43vq0/a2p JZ+920CwiD9Hcw+iurABIDYJ6xxrE8zRL1X94zNHAfUidBGq0WY+L4SQALyH1+/g njYuaHw9H7X+wV9O8j87axuqXi8Ihl7SGnqTm1PxZrhFF5lm4f8= =HGOL -----END PGP SIGNATURE----- --OPcQ6rHun7cvimSP--