Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp13204lqh; Thu, 30 May 2024 12:21:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBj593a/bYJJpf4vfjnUhDZ5x2L19qHKiQ3OARl11a8xylDJtei+RSQp5fEJt/GtZLCiIYUa7NyOs437chQJOQBXIyGJEizpMVBKd3QA== X-Google-Smtp-Source: AGHT+IFaEHRv+ImIfsDXy+0CIyQLimOH5EN7TyiDQ37HFKnRTI6R4verIBq3XkeD8qaj0vnmJsDd X-Received: by 2002:a17:903:234a:b0:1e5:3c5:55a5 with SMTP id d9443c01a7336-1f6193f0387mr32345245ad.8.1717096892006; Thu, 30 May 2024 12:21:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717096891; cv=pass; d=google.com; s=arc-20160816; b=BG4Wc20jE3MAV5rjT9yspn/ml7J/BY26rXODmjVlByjd31y+IERwU67AEL2pEbSPTb U79zaT1b8ayZK3tHaXkNtgw9OXsFlgJg7gWI/A4i+6GhRfbwzofMctJGou67jya9sGpe uxcMS0/HFIARYZIhMzEy70dRjR/cFDKlHhrHOYhoYQx/bpLviNwDBavOX66RwUPY7CZ6 zTN5qmAzeJ/JdSmJI+dSuRhMcrUllHrTwFbA13lQqGZesj86CEMCAfr9+ePuh7x15KcZ tGnL5aZ8z7R1EM3Kw6/Uls6YbCfQCISkfdZfhSK3XGCpuZ23WN6i7lKxhxeHGHwkFI82 vr0g== 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:dkim-signature; bh=Lkb2kP/y8Xgi54lbEo58j5RsylRTvTYhqaVfrp9Jjaw=; fh=otLtexaVvPzabPrtR4b9zWa06RcgkhtVsirQ68qV9hI=; b=w6TE76/ePQA6Gq5FO+YSvr8qYhl5y+rJvgdnOtRJf3imFv7aOiiBnX1MIA8W76r989 XYgSbqBo1OvoW0gO3MI56y1QWqim09oM/eWtwXg5JwRGUNsI2zDHpoLzBgkBeLkPjoAh PxBOKM8n9Mtg4nAGyhdkmQvoy2D3mDc4iuNGhZ+8W2isexVZCMwcd6oIgDmBbSGp3XFt CYmoLJMIKml6nLGGBdAs0bUzJ8ShlvqcMHaIYA4whuHs3heqQnsCIUEgPDc0eHFzz0kB djmUXNAMRBlFz65a2DIaAEz4wgvJWcP8ODlb9dIb6zPaYSG3QVi/W8+TkRIAE5pf3HlI GU4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mUGnaW8y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f63235fb4esi1912515ad.157.2024.05.30.12.21.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 12:21:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mUGnaW8y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 55BADB23CB8 for ; Thu, 30 May 2024 19:21:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E947A12F393; Thu, 30 May 2024 19:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mUGnaW8y" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1905580058; Thu, 30 May 2024 19:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717096876; cv=none; b=fAGhi+sqfLzSRpeMl/URG7AF/5Io3kndjO1tWFBMSHuLiSR6moESI8tI9uKJL5udcDBV0SA77Y8PPDMy8Lk29yTCxlnGNzqt21yeQlvWfCcrc9v2w9bukCyrTIJnQzEgfTkdJFIZqlulVSaICmajp52v5rY2QqHG/tN5mmh12j4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717096876; c=relaxed/simple; bh=Cw8n9sFkdrnSp+hf2gxi3CiALqLFC0iIHAkCCK3RWpI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WpN8/cwqjyCFkxr7hWLXCmMeNTFzLg5z5Qu+rUZu/WE+LctnyEK0m9C/+Dd3iPRSdK69TtuHX7r5hvXd3b6S7G/e1DZvvynaWN0cora7xsuBBwdqA1mK/z5CsXcddbE14WQMIyQEYInIiI9CavgLv7qGI0s9ee9ZgTqusFvNHOA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mUGnaW8y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7247BC32781; Thu, 30 May 2024 19:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717096876; bh=Cw8n9sFkdrnSp+hf2gxi3CiALqLFC0iIHAkCCK3RWpI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mUGnaW8yWgrWo8eF7SIlAJEpzMRH8uRwBqHW9GhFFYgH7ykzfFYQtNpnxfLBDF3tv 2SmM+Mfr4KDq7EpNiXMeZReMzRU11FKTbrpjtOCfy9P/55oITXXczNf3BBEcEugAqN LjjiXN0HU8tGVrZaVQkJkYaplYgBR0Spb+WP8wPIJ7Coo7A7/nLF4r76pBEHc+tx3S SYNyDYMQbPBULrnCo4S2i+i1OjBe1kynXN6xrdFrPBiivkj82ZvpZmwhDBKiQDIugN 63y6hkf7jGgL7DLGo/myCxZjzGkpqRixj9NSQyUJ3dMrVeUm+mM9J0vnYDXUxnXLJO PbizAY47q5btw== Date: Thu, 30 May 2024 20:21:12 +0100 From: Conor Dooley To: "Rob Herring (Arm)" Cc: Saravana Kannan , Andreas Larsson , Sam Ravnborg , sparclinux@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] of: WARN on using default root node #address-cells/#size-cells Message-ID: <20240530-surging-sprinkled-f209b2452395@spud> References: <20240530185049.2851617-1-robh@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-sha256; protocol="application/pgp-signature"; boundary="o3RC6Q1iZAKXXjOs" Content-Disposition: inline In-Reply-To: <20240530185049.2851617-1-robh@kernel.org> --o3RC6Q1iZAKXXjOs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 30, 2024 at 01:50:48PM -0500, Rob Herring (Arm) wrote: > While OpenFirmware originally allowed default values of #address-cells > and #size-cells, FDT has long required explicit values. It's been a > warning in dtc for the root node since the beginning (2005) and for > any parent node since 2007. Of course, not all FDT uses dtc, but that > should be the majority by far. The various extracted OF devicetrees I > have dating back to the 1990s (various PowerMac, OLPC, PASemi Nemo) > all have explicit root node properties. >=20 > I have no idea what exists for Sparc, so disabling the warning for it. > If any other platforms hit the warning, then the warning can be > disabled for them. >=20 > Signed-off-by: Rob Herring (Arm) > --- > Sparc folks, If anyone can dump DTs from some Sparc systems it would be > helpful. > --- > drivers/of/base.c | 2 ++ > drivers/of/fdt.c | 2 ++ > 2 files changed, 4 insertions(+) >=20 > diff --git a/drivers/of/base.c b/drivers/of/base.c > index 61fff13bbee5..6930aa29fec1 100644 > --- a/drivers/of/base.c > +++ b/drivers/of/base.c > @@ -96,6 +96,7 @@ int of_bus_n_addr_cells(struct device_node *np) > return cells; > =20 > /* No #address-cells property for the root node */ > + WARN_ONCE(!IS_ENABLED(CONFIG_SPARC), "Only listed platforms should rely= on default '#address-cells'\n"); I assume "listed platforms" means things in the first parameter of WARN_ONCE()? Since that's only SPARC, why not just say it? The error message is rather obtuse as-is I think. --o3RC6Q1iZAKXXjOs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZljRqAAKCRB4tDGHoIJi 0iAJAP4k8TUjNgnDOrkaQcs4tKHQQ+uHNIjHDX/hmEsUeWCHyQEAiDFnImvrWsQE tUUrWkbqwMYUZynPihdkGtIsqQmhNQA= =HErS -----END PGP SIGNATURE----- --o3RC6Q1iZAKXXjOs--