Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2971738lqz; Wed, 3 Apr 2024 14:07:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFEytG17F1nOypKYAW4I/4LGaR9u3SVckPZ71jrMJpXyQrQoBCrVzcJJZLdYBJOaIIiUZL8gE41sfef0992OfYdAsiluGLMhxkq/uOlw== X-Google-Smtp-Source: AGHT+IEWyHSoxFt2rERzyO+lrCwxKjVHGHzHw1n3hN9OP1YChrV/DzVeWH3ydybwjCZ20qpcjY3I X-Received: by 2002:a05:6a21:3996:b0:1a3:62d1:2906 with SMTP id ad22-20020a056a21399600b001a362d12906mr1092578pzc.14.1712178460146; Wed, 03 Apr 2024 14:07:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712178460; cv=pass; d=google.com; s=arc-20160816; b=eLBWbsmZjewo5aIcvr8nVtlOFDsFc2drbL6IYjxHaQzb5fei6QSOppqPkIxhFaIzVq VqnpHCEQrGZ90m0nfHp9o7m4Bi88Uo8VElapq7BuBbTJiH5JiZpFlaihytbu+PPzic4+ aV7pQ1AcDFl4Xd2N1txVMsAGZJRmzyV4xOCSztk1ic/L50dppQUp9dHdnB+o3kzdYUsy 9iJdZ80BA8Hzb+9wirx746IZRt7mLcrqH2pRwKbdEpNeHkUAFirfZGcprBYcjbbhml2p hazifmoP4vfawOUKV9R6nSn0j1Bqv5Is+HRuRa2Y0Z/ObphzbNaeteqgJH42ArcKk1fT VEsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=Dxy/4wcbfA9HbVd7lHVqAxgtuGMGVKBe8z0Ad2EOdsc=; fh=bv+ZkodW3MJSPWT0T36odbu6n3M+cbSt6n3suFLarhk=; b=yIPxvg3mmEMhzkYK6vqR8RcjEtSKq2hUNBncmkAq0FksxYdBNLadG9/qf1KhF9XZ0Y rUcr+67arDy4nG33jwqyiHV1hNQ0aJiDwN+C6gbr+009GcVG8x3zMMG//BlkrgntxAVU V0g7z864F4Mj2WKGR9yCXlTIJ+8AjU/xot1jFjPn3XSL38/mSjAtRGR71+prwAUt2n2z NrXwK0zWMiGMS1Mdsg3hC8X85lQkp3PG2l3jNZZxW2V54dsIQJF0zt5pnkSered0uIGG QkC13ieqxRa4VjmNRpCw29/2NOHAqRGVQEjIe0ukF1xOBkcluqde/wBNWGrIiZLAxlZZ hp1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-130604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130604-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s8-20020a17090302c800b001e2a44ff6c5si611536plk.289.2024.04.03.14.07.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 14:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-130604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130604-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 64DBF28BA66 for ; Wed, 3 Apr 2024 21:06:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D10715665C; Wed, 3 Apr 2024 21:06:35 +0000 (UTC) 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--