From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 378E214C5B3 for ; Wed, 3 Apr 2024 21:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712178395; cv=none; b=V+BxTTq4Ri1pEYtpo2g7c4rH/JrQymqxFYvWs5qDiKwxWUoRQa4NuOUQ/d//9z9mvfEqzUlRs8nnZBo3X8Wu5dWdmJg/o/j08wwAaf09YuBbDyuMVZeorPnQfmkS4s2WXa38UPfHyduIZl7PkrH89AedwdtISwpqiIi4Dq8XlF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712178395; c=relaxed/simple; bh=bvE6+Ioe65Pvy3tTo3/DekL3m3PgUp+qr/wE3M2vlMU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YZGBl58cStmwFw2KpeDRlMceVle334rnxphLiAwlVQjbK0bt6smoOzyhwlCBLpJ4sXb5FO+drOtVz3jmHxnTW6IN4MEYK+xGGoQ1soanX6XFztFJ3C+qD2DMzi+PoA5AG1bCMN4SpDZdgzboEVPSduP49rJYqz2rYHNf3XtELeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rs7nv-0001NX-2i; Wed, 03 Apr 2024 23:05:55 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs7nr-00AFDj-LI; Wed, 03 Apr 2024 23:05:51 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rs7nr-00EqVT-1m; Wed, 03 Apr 2024 23:05:51 +0200 Date: Wed, 3 Apr 2024 23:05:51 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Mark Brown Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman , Heiko Stuebner , Andi Shyti , Krzysztof Kozlowski , Arnd Bergmann , Jerome Brunet , Martin Blumenstingl , Alim Akhtar , Li Zetao , Jonathan Cameron , Rob Herring , Yang Yingliang , Andy Shevchenko , Luis de Arquer , Tudor Ambarus , Sam Protsenko , Peter Griffin , Jaewon Kim , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 31/34] spi: remove incorrect of_match_ptr annotations Message-ID: <5f3qvhasho4mfnf6f7i6djak3ankje375mt4fzvv3gqrlj242o@zdk2ajvha6hx> References: <20240403080702.3509288-1-arnd@kernel.org> <20240403080702.3509288-32-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j3dyffzs5mph63yw" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --j3dyffzs5mph63yw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2024 at 10:56:58AM +0100, Mark Brown wrote: > On Wed, Apr 03, 2024 at 10:06:49AM +0200, Arnd Bergmann wrote: >=20 > > These appear to all be copied from the same original driver, so fix the= m at the > > same time by removing the unnecessary of_match_ptr() annotation. As far= as I > > can tell, all these drivers are only actually used on configurations th= at > > have CONFIG_OF enabled. >=20 > Why are we not fixing of_match_ptr() here, or at least adding the ifdefs > in case someone does end up wanting to run without OF? Fixing of_match_ptr =3D diff --git a/include/linux/of.h b/include/linux/of.h index a0bedd038a05..d980bccffda0 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -890,7 +890,7 @@ static inline const void *of_device_get_match_data(cons= t struct device *dev) return NULL; } =20 -#define of_match_ptr(_ptr) NULL +#define of_match_ptr(_ptr) (0 ? (_ptr) : NULL) #define of_match_node(_matches, _node) NULL #endif /* CONFIG_OF */ =20 ? Assuming this helps, I agree this would be the better fix. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --j3dyffzs5mph63yw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYNxK4ACgkQj4D7WH0S /k4RIQf+N9Iy5vdLQiMUAN6AC+cOYMVtNTWEXHv3Iu8OMI4BbFULD/p4hJYx4A/Y +4trHVq0G7vFcqwJIyZ8XD7U0NnRLweSBCiBdm6lh/R7j8pyI32zbpvrJb8ge/Wm LTfO5dGPLQMf1kIpjRlpYniRKxzxOTWIsnKpr801JczfdZDvZ236nLgQNNFTtYNP 4X9v+IjyFHuXxEjYvIZ52EsIgHnfGsNT7RNmncSBQSxLRwliB6gAO/Bzo1ulw1xS iSIatTBxMMTV5D3fDRS1Ve4g7VIjI0LAO+I784HK+wg9jWI4tEwQz2eO5GZXxDXp WbiT8oxPt4xi8tsgDAu681Ac2zeUOg== =qPPD -----END PGP SIGNATURE----- --j3dyffzs5mph63yw-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C87DCD1288 for ; Wed, 3 Apr 2024 21:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XnNhgsrmPptDCJUYn6eU3KztkhJmTZjEZRFvmpMJb9k=; b=KqBWvr75euYb37NFeHbNa+JD00 whoI0wW36xoUrNw55zdpUrwKyPkGvSAk6OIMjX8nnpo0/5eWptVw0z9wiRnv6pJzRA7EX/tfpgRMY QiDm7qK9EIQVHkutm4lvmxFbKtfidzQYald31Gxkzg1ZlAjliLlkvq9VhNJ4FeglveFtAGbvaMKTP dYj5qFkRc/1wVC+QN3QifjFdl+8GRTAbmhP+HLWoImHfajqU/46w5jAOIpC+VDWIt+T08fLcfMVi6 Ua3+wzJw72LdsS2DXv4G/+OLVpkOvAqpPWveQQgsre5tgxL6XFguIEUVR+dhe3nAXwr12NGea0ziD 7QSOcPdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7oW-00000000Bqo-0P8V; Wed, 03 Apr 2024 21:06:32 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7oT-00000000Bpi-1Xmg for linux-amlogic@lists.infradead.org; Wed, 03 Apr 2024 21:06:31 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rs7nv-0001NX-2i; Wed, 03 Apr 2024 23:05:55 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs7nr-00AFDj-LI; Wed, 03 Apr 2024 23:05:51 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rs7nr-00EqVT-1m; Wed, 03 Apr 2024 23:05:51 +0200 Date: Wed, 3 Apr 2024 23:05:51 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Mark Brown Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman , Heiko Stuebner , Andi Shyti , Krzysztof Kozlowski , Arnd Bergmann , Jerome Brunet , Martin Blumenstingl , Alim Akhtar , Li Zetao , Jonathan Cameron , Rob Herring , Yang Yingliang , Andy Shevchenko , Luis de Arquer , Tudor Ambarus , Sam Protsenko , Peter Griffin , Jaewon Kim , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 31/34] spi: remove incorrect of_match_ptr annotations Message-ID: <5f3qvhasho4mfnf6f7i6djak3ankje375mt4fzvv3gqrlj242o@zdk2ajvha6hx> References: <20240403080702.3509288-1-arnd@kernel.org> <20240403080702.3509288-32-arnd@kernel.org> MIME-Version: 1.0 In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-amlogic@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_140629_545826_24D82E23 X-CRM114-Status: GOOD ( 18.84 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4307611117474316848==" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org --===============4307611117474316848== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j3dyffzs5mph63yw" Content-Disposition: inline --j3dyffzs5mph63yw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2024 at 10:56:58AM +0100, Mark Brown wrote: > On Wed, Apr 03, 2024 at 10:06:49AM +0200, Arnd Bergmann wrote: >=20 > > These appear to all be copied from the same original driver, so fix the= m at the > > same time by removing the unnecessary of_match_ptr() annotation. As far= as I > > can tell, all these drivers are only actually used on configurations th= at > > have CONFIG_OF enabled. >=20 > Why are we not fixing of_match_ptr() here, or at least adding the ifdefs > in case someone does end up wanting to run without OF? Fixing of_match_ptr =3D diff --git a/include/linux/of.h b/include/linux/of.h index a0bedd038a05..d980bccffda0 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -890,7 +890,7 @@ static inline const void *of_device_get_match_data(cons= t struct device *dev) return NULL; } =20 -#define of_match_ptr(_ptr) NULL +#define of_match_ptr(_ptr) (0 ? (_ptr) : NULL) #define of_match_node(_matches, _node) NULL #endif /* CONFIG_OF */ =20 ? Assuming this helps, I agree this would be the better fix. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --j3dyffzs5mph63yw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYNxK4ACgkQj4D7WH0S /k4RIQf+N9Iy5vdLQiMUAN6AC+cOYMVtNTWEXHv3Iu8OMI4BbFULD/p4hJYx4A/Y +4trHVq0G7vFcqwJIyZ8XD7U0NnRLweSBCiBdm6lh/R7j8pyI32zbpvrJb8ge/Wm LTfO5dGPLQMf1kIpjRlpYniRKxzxOTWIsnKpr801JczfdZDvZ236nLgQNNFTtYNP 4X9v+IjyFHuXxEjYvIZ52EsIgHnfGsNT7RNmncSBQSxLRwliB6gAO/Bzo1ulw1xS iSIatTBxMMTV5D3fDRS1Ve4g7VIjI0LAO+I784HK+wg9jWI4tEwQz2eO5GZXxDXp WbiT8oxPt4xi8tsgDAu681Ac2zeUOg== =qPPD -----END PGP SIGNATURE----- --j3dyffzs5mph63yw-- --===============4307611117474316848== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic --===============4307611117474316848==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAE16CD128A for ; Wed, 3 Apr 2024 21:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wc0P5OdK3/M0kd3mU8ikbCGCR9bkreylhwTSJgSkcSI=; b=jKwPxfavLaSnnw4wxwkQdDsFg1 ThWoM6zvqyjW74biPDbKC9HMb2+B4j98Fb3WPEZUudSNXT7ZNzX5w1FDts5fjM3SSjCO/IMpDJyNQ uSp9hCeFUDOJ4dc3aGVMEkaU99uLicQe03A2kddjJKrsQmSWrEVTk5tdIwf50iIlbmr8Z3cyndDTo nQipkMBRitZS0snOyeEKFcq8F5Yf+/lODFlRXtSf7FbNIowCsir/HxZzIcCDXQ49XntUbbp3OsB86 xLelBICbq/L2OhGZRBmIWtiO37V/l9CGf1DjsjL3yF9T9kUL5xTsGjh1UjjtIGvQcyQfTu63bKhY2 a8yu7gbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7oW-00000000Bqx-2MGc; Wed, 03 Apr 2024 21:06:32 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7oT-00000000Bph-1Xe6 for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2024 21:06:31 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rs7nv-0001NX-2i; Wed, 03 Apr 2024 23:05:55 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs7nr-00AFDj-LI; Wed, 03 Apr 2024 23:05:51 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rs7nr-00EqVT-1m; Wed, 03 Apr 2024 23:05:51 +0200 Date: Wed, 3 Apr 2024 23:05:51 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Mark Brown Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman , Heiko Stuebner , Andi Shyti , Krzysztof Kozlowski , Arnd Bergmann , Jerome Brunet , Martin Blumenstingl , Alim Akhtar , Li Zetao , Jonathan Cameron , Rob Herring , Yang Yingliang , Andy Shevchenko , Luis de Arquer , Tudor Ambarus , Sam Protsenko , Peter Griffin , Jaewon Kim , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 31/34] spi: remove incorrect of_match_ptr annotations Message-ID: <5f3qvhasho4mfnf6f7i6djak3ankje375mt4fzvv3gqrlj242o@zdk2ajvha6hx> References: <20240403080702.3509288-1-arnd@kernel.org> <20240403080702.3509288-32-arnd@kernel.org> MIME-Version: 1.0 In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_140629_518568_A7BCECBA X-CRM114-Status: GOOD ( 20.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4357955886080822313==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4357955886080822313== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j3dyffzs5mph63yw" Content-Disposition: inline --j3dyffzs5mph63yw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2024 at 10:56:58AM +0100, Mark Brown wrote: > On Wed, Apr 03, 2024 at 10:06:49AM +0200, Arnd Bergmann wrote: >=20 > > These appear to all be copied from the same original driver, so fix the= m at the > > same time by removing the unnecessary of_match_ptr() annotation. As far= as I > > can tell, all these drivers are only actually used on configurations th= at > > have CONFIG_OF enabled. >=20 > Why are we not fixing of_match_ptr() here, or at least adding the ifdefs > in case someone does end up wanting to run without OF? Fixing of_match_ptr =3D diff --git a/include/linux/of.h b/include/linux/of.h index a0bedd038a05..d980bccffda0 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -890,7 +890,7 @@ static inline const void *of_device_get_match_data(cons= t struct device *dev) return NULL; } =20 -#define of_match_ptr(_ptr) NULL +#define of_match_ptr(_ptr) (0 ? (_ptr) : NULL) #define of_match_node(_matches, _node) NULL #endif /* CONFIG_OF */ =20 ? Assuming this helps, I agree this would be the better fix. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --j3dyffzs5mph63yw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYNxK4ACgkQj4D7WH0S /k4RIQf+N9Iy5vdLQiMUAN6AC+cOYMVtNTWEXHv3Iu8OMI4BbFULD/p4hJYx4A/Y +4trHVq0G7vFcqwJIyZ8XD7U0NnRLweSBCiBdm6lh/R7j8pyI32zbpvrJb8ge/Wm LTfO5dGPLQMf1kIpjRlpYniRKxzxOTWIsnKpr801JczfdZDvZ236nLgQNNFTtYNP 4X9v+IjyFHuXxEjYvIZ52EsIgHnfGsNT7RNmncSBQSxLRwliB6gAO/Bzo1ulw1xS iSIatTBxMMTV5D3fDRS1Ve4g7VIjI0LAO+I784HK+wg9jWI4tEwQz2eO5GZXxDXp WbiT8oxPt4xi8tsgDAu681Ac2zeUOg== =qPPD -----END PGP SIGNATURE----- --j3dyffzs5mph63yw-- --===============4357955886080822313== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4357955886080822313==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B29ECD1297 for ; Wed, 3 Apr 2024 21:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ljSusbWl0rMA1lSFm+jn5XJb/M/vIdHh6QK3Xl/nUoE=; b=vKggied1FuYiDsVzVH/jAWrB8L DCLBoja2qODtiYOV74ke/IcFw3atCCKEzufyi9DApVVpCL8Rhiuexo3rvMYsl5emzMUnp9Nwyjtwe xWW8/NBFnvSvtQKgbOVa6E9n3+c6xh9yN5AilbIi2b2nB9nfT53vcHXslCoClckYN+K3XK77mJTkY EZLxEOntjN9qwcoFaDI2KDmXlGu4EzD1oUXzrOvqHy6ML2eD9AtbhNeNQJg22hlVc8BHJOUe7N6Fy odrF38VrzK1EnUK5OX7h4jFq+uniVrenmrBXFXltX9q0vboPZAkwgqb54MFHDLwtn+doXxv/FiaMt v7mkyijA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7oZ-00000000Brl-2A0E; Wed, 03 Apr 2024 21:06:35 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7oW-00000000Bqk-2AFZ for linux-rockchip@lists.infradead.org; Wed, 03 Apr 2024 21:06:33 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rs7nv-0001NX-2i; Wed, 03 Apr 2024 23:05:55 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs7nr-00AFDj-LI; Wed, 03 Apr 2024 23:05:51 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rs7nr-00EqVT-1m; Wed, 03 Apr 2024 23:05:51 +0200 Date: Wed, 3 Apr 2024 23:05:51 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Mark Brown Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman , Heiko Stuebner , Andi Shyti , Krzysztof Kozlowski , Arnd Bergmann , Jerome Brunet , Martin Blumenstingl , Alim Akhtar , Li Zetao , Jonathan Cameron , Rob Herring , Yang Yingliang , Andy Shevchenko , Luis de Arquer , Tudor Ambarus , Sam Protsenko , Peter Griffin , Jaewon Kim , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 31/34] spi: remove incorrect of_match_ptr annotations Message-ID: <5f3qvhasho4mfnf6f7i6djak3ankje375mt4fzvv3gqrlj242o@zdk2ajvha6hx> References: <20240403080702.3509288-1-arnd@kernel.org> <20240403080702.3509288-32-arnd@kernel.org> MIME-Version: 1.0 In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_140632_630438_62294342 X-CRM114-Status: GOOD ( 19.36 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============9193644394037124872==" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org --===============9193644394037124872== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j3dyffzs5mph63yw" Content-Disposition: inline --j3dyffzs5mph63yw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2024 at 10:56:58AM +0100, Mark Brown wrote: > On Wed, Apr 03, 2024 at 10:06:49AM +0200, Arnd Bergmann wrote: >=20 > > These appear to all be copied from the same original driver, so fix the= m at the > > same time by removing the unnecessary of_match_ptr() annotation. As far= as I > > can tell, all these drivers are only actually used on configurations th= at > > have CONFIG_OF enabled. >=20 > Why are we not fixing of_match_ptr() here, or at least adding the ifdefs > in case someone does end up wanting to run without OF? Fixing of_match_ptr =3D diff --git a/include/linux/of.h b/include/linux/of.h index a0bedd038a05..d980bccffda0 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -890,7 +890,7 @@ static inline const void *of_device_get_match_data(cons= t struct device *dev) return NULL; } =20 -#define of_match_ptr(_ptr) NULL +#define of_match_ptr(_ptr) (0 ? (_ptr) : NULL) #define of_match_node(_matches, _node) NULL #endif /* CONFIG_OF */ =20 ? Assuming this helps, I agree this would be the better fix. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --j3dyffzs5mph63yw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYNxK4ACgkQj4D7WH0S /k4RIQf+N9Iy5vdLQiMUAN6AC+cOYMVtNTWEXHv3Iu8OMI4BbFULD/p4hJYx4A/Y +4trHVq0G7vFcqwJIyZ8XD7U0NnRLweSBCiBdm6lh/R7j8pyI32zbpvrJb8ge/Wm LTfO5dGPLQMf1kIpjRlpYniRKxzxOTWIsnKpr801JczfdZDvZ236nLgQNNFTtYNP 4X9v+IjyFHuXxEjYvIZ52EsIgHnfGsNT7RNmncSBQSxLRwliB6gAO/Bzo1ulw1xS iSIatTBxMMTV5D3fDRS1Ve4g7VIjI0LAO+I784HK+wg9jWI4tEwQz2eO5GZXxDXp WbiT8oxPt4xi8tsgDAu681Ac2zeUOg== =qPPD -----END PGP SIGNATURE----- --j3dyffzs5mph63yw-- --===============9193644394037124872== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip --===============9193644394037124872==--