From patchwork Fri Nov 11 21:28:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 623770 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1042206pvb; Fri, 11 Nov 2022 13:29:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf7I+i0Xe2rXHgdljnDzWXqslEicraoa0nji1Cn/+SII7ax7nfie2JSDxUizh+qOsy7qoImu X-Received: by 2002:a63:f150:0:b0:470:5d17:a62e with SMTP id o16-20020a63f150000000b004705d17a62emr3145418pgk.620.1668202172118; Fri, 11 Nov 2022 13:29:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668202172; cv=none; d=google.com; s=arc-20160816; b=Ac9GqR2eva5lMaHacv4EiLSw3Lcc7g8MRlkV/vgwLFOzebbfXYXhZozS4iZAJBYBEN nGB7DAAE/ZZy6MEYGxeABA8uchBYFH2p/8laUYpeBbyhStyPtsIreI6pXJp2fkx4BEZw cNUu2ZYz7f2eYYdqjD5efur4U8jnXjMdBFKeDV+BEC4l8RALdrL2dn0w+LKl5kfY1YAE k856tR9wk1BsRKZIE8bzudvtJzlzlMVhFPrbhfQ4749p/XEGiNJ+jQmJf3x3wuwVSy/4 EjO9N4knm8ezMsgxrEusVHMEi9CI6mb48oFyEdq7N46DmAVO868or8tfyK8TRu+B0+wX N40Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=aD5lUddOaBhUhOgnORNGJNYwDveU8X7x9nmzpkxTK3o=; b=lSBjCuVXyruzTcqeTAggM/+fKjobv4AFpj5MEYlxkfMgIh0CIEwcFT80OwM4E+webo MPUyCPKKzv7DJ2stpJV/IqdUW8mfNtUVgMU/GtSQ/jn9oCFgjgOReKb8qETGo4t9I8IP BDtx5S9CvhBcROUFe8Ze6ygh9zIaVLdqoqXgqAI1UW83j17NhhL2pKgB6fib2jqJ/aUf M10masAhINXYk7KnW6X0xVwYzuiDmc2sRWUynmY2vACzLjLR8sct2Mooyxggf4q8EA8Y 6f4KTQTQxgySZSYWBeyTJMqPrfzSv/+wkQuOhYOpjhQYjhLThms7PveoedcfL9+bfxff Zxow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=0s9X2Vnw; spf=none (google.com: lists.infradead.org does not designate permitted sender hosts) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:3::133]) by mx.google.com with ESMTPS id 38-20020a630c66000000b0046af247a436si3583765pgm.644.2022.11.11.13.29.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 13:29:32 -0800 (PST) Received-SPF: none (google.com: lists.infradead.org does not designate permitted sender hosts) client-ip=2607:7c80:54:3::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=0s9X2Vnw; spf=none (google.com: lists.infradead.org does not designate permitted sender hosts) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aD5lUddOaBhUhOgnORNGJNYwDveU8X7x9nmzpkxTK3o=; b=0s9X2VnwPJBDXI wwW9aFBAC45YvNfL8yyGNrkMlbgXQDlK8+8gdOL1Sr/dVFvd9xKd+OGeapH9QqrHqbBxGdWvNMePF VKaS6pvpRtV6K0mRBEXMC3SKETTfPhpToa9NRRGB6ldzs706xy1lofKhpyBtO1yUp+VZFY1JTUdnc hZuOr2A4fr3f3jOyDKmf3qb4yDJ9u2CD0iF7f+OmMHOk+pmZTBxUkIWi3fztbBD/w41nRTiDf8EQy HZYKNErI7R2ZR1M9/OFritDdx4491qqmvxiExw2Xry5T9Vl0b9FfYfBRYHDzSpl6p5xXNywMoTIU7 CHJnsirpMgkFW+EE8qog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otbZn-001F9n-DW; Fri, 11 Nov 2022 21:28:39 +0000 Received: from mail-oi1-f174.google.com ([209.85.167.174]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otbZk-001F8D-RC for linux-mtd@lists.infradead.org; Fri, 11 Nov 2022 21:28:38 +0000 Received: by mail-oi1-f174.google.com with SMTP id m204so6045051oib.6 for ; Fri, 11 Nov 2022 13:28:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yofEEgISmTkFd8KNSd67teL9O9R9Xx2fbkwmtcfVezs=; b=5Lj9DqiKecjQnC8UWPukY/icFT4+dQd6WyBXgwTk5BEuMb7d1fUp7F20rWpnjt4ULk ZSaIsS0EHEJPh7VsYsptvDleIV9pAD6mFPaQIIO/l64egqUXkaIaBrjCyAP1vI+TNEdU r1OqaaAhkh7HsQDBaJJdj/aCOnbK86cTQh0MUaJi0WEG+Qow+I7SvxUbZzzDLIu3t1YV PhmnzCeqpl3Ug+ANlq6Z9JJWTku5KF92uTC+0no0x+mTBVNdHtlOYgOhtE74bxNnOEWZ G+45QvhyooEg/pDGqr81YM2nJ72nKALz0hTQHHk1+ZMzgwHKdcCGXZq8djF22c18ubmo Ji8w== X-Gm-Message-State: ANoB5pmeRdy7776l08dd5CCYnN2jmpDhsOISJXY05QO0H8G8HwTO+Qu1 rckD5Uv2LHfCI+OzV2Akow== X-Received: by 2002:aca:210d:0:b0:342:ff90:1867 with SMTP id 13-20020aca210d000000b00342ff901867mr1692144oiz.297.1668202114153; Fri, 11 Nov 2022 13:28:34 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id f7-20020a9d2c07000000b00660e833baddsm1432403otb.29.2022.11.11.13.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 13:28:33 -0800 (PST) Received: (nullmailer pid 4103770 invoked by uid 1000); Fri, 11 Nov 2022 21:28:35 -0000 From: Rob Herring To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Krzysztof Kozlowski Cc: Mikhail Zhilkin , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: mtd: fixed-partitions: Fix 'sercomm,scpart-id' schema Date: Fri, 11 Nov 2022 15:28:24 -0600 Message-Id: <20221111212824.4103514-1-robh@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_132836_898582_146DE650 X-CRM114-Status: GOOD ( 13.93 ) X-Spam-Score: 0.7 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The schema for 'sercomm,scpart-id' is broken. The 'if' condition is never true because 'compatible' is in the parent node, not the child node the sub-schema applies to. The example passes as there are [...] Content analysis details: (0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.174 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.174 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org The schema for 'sercomm,scpart-id' is broken. The 'if' condition is never true because 'compatible' is in the parent node, not the child node the sub-schema applies to. The example passes as there are no constraints on additional/unevaluated properties. That's a secondary issue which is complicated due to nested partitions. Drop the if/then schema and the unnecessary 'allOf' so that the 'sercomm,scpart-id' property is at least defined. Cc: Mikhail Zhilkin Signed-off-by: Rob Herring --- .../mtd/partitions/fixed-partitions.yaml | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index ad3ccd250802..39b715aad2dc 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -31,24 +31,17 @@ properties: patternProperties: "@[0-9a-f]+$": - allOf: - - $ref: "partition.yaml#" - - if: - properties: - compatible: - contains: - const: sercomm,sc-partitions - then: - properties: - sercomm,scpart-id: - description: Partition id in Sercomm partition map. Mtd - parser uses this id to find a record in the partition map - containing offset and size of the current partition. The - values from partition map overrides partition offset and - size defined in reg property of the dts. Frequently these - values are the same, but may differ if device has bad - eraseblocks on a flash. - $ref: /schemas/types.yaml#/definitions/uint32 + $ref: partition.yaml# + + properties: + sercomm,scpart-id: + description: Partition id in Sercomm partition map. Mtd parser + uses this id to find a record in the partition map containing + offset and size of the current partition. The values from + partition map overrides partition offset and size defined in + reg property of the dts. Frequently these values are the same, + but may differ if device has bad eraseblocks on a flash. + $ref: /schemas/types.yaml#/definitions/uint32 required: - "#address-cells"