Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3294922lqo; Tue, 21 May 2024 12:22:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtpx4xLKZ9v44UYr34rGwxcAOkKX5F2O4cd2UGnLKvDUm39XIlHgQvMZdm5izz+peJQSbYFQsc2c3BV07wSpdWlc+YO5ShV86TErgw+Q== X-Google-Smtp-Source: AGHT+IE7CEMSdphHmsOkttXyyefMS1ZSEnGr7fAIX7yj5XUuDW/tN/i0uRq3jeKE464UiO5yNciq X-Received: by 2002:a05:6a20:9689:b0:1ad:7e66:659a with SMTP id adf61e73a8af0-1afde0caf3emr31553831637.15.1716319324061; Tue, 21 May 2024 12:22:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716319324; cv=pass; d=google.com; s=arc-20160816; b=PZVF5BQroZdu1YZCyazJeexIUluT6GuGvHkaJe7RKTxbG/8x+je9nig6UVNfGFwAwY eebz2PsFyHGuNpby/6e6ugZd+xSr2+5AAcktudahbcpgCnITGUSBEHDd4E/Vo2zEV7G3 uIh5U9/vQZ2vESRj+qqZVu4Ypooseeca+wp83Y+xYy019PepCppuyU3+qYC8Fh09e/0+ zlqbpX+2oZsVPvQN7NQTsuB3TKpMZKuP2ltlYTZhya5cvJAIGPDxE2buq37EWs1k2iyl v2UGlVFpv2l+TVD7lAWqxPF1H9bIXXudRVNlLqTiAAG5+t1N+OguewJ63nKV9rEy6YU3 YvKQ== 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=F8Jkqc2xPkd4B5lBv6+BebrYaxwG3k8MeGXp0ip+NU8=; fh=K7YpbkvcezVg4IKswwuA++kTYnDyV76rZkknBFfPyG0=; b=vwzlCMLAn7V9lsATklirXhvqp91q/fpDRmWL0lsqneJJ4aOn48OVaLrHklDhD+wA1K qpdZ6dgag3VOd+07crFnSCZz/GH7EKR3kfgPbOFKYNEwTe92wfWzwQIiId9JuK+b0xmU 2Sr/y8YNIIY9jcxYoscSjB18aE1JgUEa6z7OB8OZcJGW68P+pAR3amQcMXAtCOISerYn aDmWc6oHwb33stNCxOOQqXcmK5y/6iHZjxY05xzdjDbh9xblpUK+p5ToZLxEBV9RWEgj NzC3koODYPrH7khb1Fa5sHuJ1Uo7/uy69qc5/N3/JdRIXA9iOFlOj6QZuU5HBb0VNubB 1uyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OcDVqhZL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185376-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-65a742ad5adsi10663055a12.654.2024.05.21.12.22.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 12:22:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185376-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OcDVqhZL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185376-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185376-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9FA51281540 for ; Tue, 21 May 2024 19:22:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C258C1494A5; Tue, 21 May 2024 19:21:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OcDVqhZL" 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 DC9801865C; Tue, 21 May 2024 19:21:52 +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=1716319313; cv=none; b=ReIHeVHHS+HrAH2BVWLFoiHgNEPzlFRRpNiWiMmUCxkjKTvJ+oucOa8Ev0ergNQzzW1uO6lgVAtQXvZ83A8nstvdDYbVlQNLYWdo+cGJSo7MtvCd/+dnkn4rG96nOIXIywUi9bya6kEauBHEzuY4OE/ix+oVLxSRA6aIT7SFDdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716319313; c=relaxed/simple; bh=u6RvWRROhtl8idk8uNRbZmqRVPX4mzXHvZU6/iUf/SE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h4b72/u6lg0tWTejj+GrYmwkBTeU0XAulwFsHSYs7ve9T8TnSIYj9Mxd/fhFxFV9ZSaJiwLWvyHeegjyf10s2hhkY7ZMX+EDaoeJu8c6JV8pjZPtKt21WXKRKQotuYI0tvQlkjbcUb/eJZs57y4892pOLXwxBKejx88ffbRG6yc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OcDVqhZL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6ED8C2BD11; Tue, 21 May 2024 19:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716319312; bh=u6RvWRROhtl8idk8uNRbZmqRVPX4mzXHvZU6/iUf/SE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OcDVqhZLUolUP9TGlRGcvy9J2HsxqD2CE8Sei9WCiZoXlfQFmXcf4YWevNewmLb94 jErEgGI6YwcDnE4+fCJP8Soap3ehqq1SuJWEcy0enUlJgjWy4mrKhe0jCfq2rW3oil 378tx4gYEtVG0qTkwdgsv7n3Cbn6R+VR/IAOM5lrvNbNMM0YLDZ02G4NjRiuCfL787 l3fMAhDSZ7vivzdOhxp+Y7l+XE1/PCBvPDJKem8Qizpaufyeugi5QCw7hgvzw2qAVq Kf4i2tFN716yOjC8j71KMnrDfOgYXVxR3hjLUIQbweJq0g3LZWP2HRpFEyuOMzo4iW 0Y/ybLyqyah7A== Date: Tue, 21 May 2024 20:21:45 +0100 From: Conor Dooley To: Elliot Berman Cc: Rob Herring , Frank Rowand , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Amrit Anand , Peter Griffin , Caleb Connolly , Andy Gross , Doug Anderson , Simon Glass , Chen-Yu Tsai , Julius Werner , "Humphreys, Jonathan" , Sumit Garg , Jon Hunter , Michal Simek , boot-architecture@lists.linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id Message-ID: <20240521-bonfire-backboned-9ef33c10d447@spud> References: <20240521-board-ids-v3-0-e6c71d05f4d2@quicinc.com> <20240521-board-ids-v3-2-e6c71d05f4d2@quicinc.com> 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="uf6VAPW/MlC6Q9tN" Content-Disposition: inline In-Reply-To: <20240521-board-ids-v3-2-e6c71d05f4d2@quicinc.com> --uf6VAPW/MlC6Q9tN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 21, 2024 at 11:37:59AM -0700, Elliot Berman wrote: > Device manufcturers frequently ship multiple boards or SKUs under a > single softwre package. These software packages ship multiple devicetree > blobs and require some mechanims to pick the correct DTB for the boards > that use the software package. Okay, you've got the problem statement here, nice. > This patch introduces a common language > for adding board identifiers to devicetrees. But then a completely useless remainder of the commit message. I open this patch, see the regexes, say "wtf", look at the commit message and there is absolutely no explanation of what these properties are for. That's quite frankly just not good enough - even for an RFC. >=20 > Signed-off-by: Elliot Berman > --- > .../devicetree/bindings/board/board-id.yaml | 24 ++++++++++++++++= ++++++ > 1 file changed, 24 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/board/board-id.yaml b/Docu= mentation/devicetree/bindings/board/board-id.yaml > new file mode 100644 > index 000000000000..99514aef9718 > --- /dev/null > +++ b/Documentation/devicetree/bindings/board/board-id.yaml > @@ -0,0 +1,24 @@ > +# SPDX-License-Identifier: BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/board/board-id.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: board identifiers > +description: Common property for board-id subnode s/property/properties/ > + > +maintainers: > + - Elliot Berman > + > +properties: > + $nodename: > + const: '/' > + board-id: > + type: object > + patternProperties: > + "^.*(?!_str)$": Does this regex even work? Take "foo_str" as an example - doesn't "^.*" consume all of the string, leaving the negative lookahead with nothing to object to? I didn't properly test this with an example and the dt tooling, but I lazily threw it into regex101 and both the python and emcascript versions agree with me. Did you test this? And while I am here, no underscores in property names please. And if "str" means string, I suggest not saving 3 characters. > + $ref: /schemas/types.yaml#/definitions/uint32-matrix > + "^.*_str$": > + $ref: /schemas/types.yaml#/definitions/string-array Why do we even need two methods? Commit message tells me nothing and there's no description at all... Why do we need regexes here, rather than explicitly defined properties? Your commit message should explain the justification for that and the property descriptions (as comments if needs be for patternProperties) should explain why this is intended to be used. How is anyone supposed to look at this binding and understand how it should be used? Utterly lost, Conor. --uf6VAPW/MlC6Q9tN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZkz0SQAKCRB4tDGHoIJi 0njSAP9bS2FNXcU4nqFnmSCUKGplVQ/vSymPzzigumsrEX1WDwD/XIWhiLbRxeax Ppm78ZkTr4oulTO08z+CHSV95+T75A8= =d9SL -----END PGP SIGNATURE----- --uf6VAPW/MlC6Q9tN--