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: 18998 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp975186wru; Fri, 11 Nov 2022 13:29:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ykumffSLu2jM3QqGKaKVCD3v81bJ/CaELAHKe2CgPHmhCqZkmexAk8LhY75u1alckHmoV X-Received: by 2002:a63:e053:0:b0:44d:ada:dc78 with SMTP id n19-20020a63e053000000b0044d0adadc78mr3277281pgj.412.1668202179289; Fri, 11 Nov 2022 13:29:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668202179; cv=none; d=google.com; s=arc-20160816; b=OTUXFruG0u3ZkRAFoMSbS36tZCW99YbyDfIYPOaXv95EFunFtEWZbg5jpZQlqiI2HE lzVSL6LB8Y/X5baArb1DL5rWuCkd4lPAREvtucfCSuaHZIp4XbXdTYMCCTZC/AX6/YcR tn3QQgNq7GKI863PW85E/EGbUIYrF4iU2EeSUu3VkOgsYaYVfvGmEjAahCvi5q0eS06T 2juWAh99rmwYPGzxf0wRmVUEyFF2nvitJ046MRV5itHfM35ML74aydH5gOv7XXVyNyPx JzYfVwMQQ1f8iLCG3mpThNhSPzqWjKFySbV31XclARmJEoMKgqznirJnjB5cvls4w2P7 2Gkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yofEEgISmTkFd8KNSd67teL9O9R9Xx2fbkwmtcfVezs=; b=SUTvcRexsweUpErn6FFm9vgY4J4vJzhknuFm8AZ7gTpDEuh9/gI0hGiuKAeJV6BC3D FRGQAsDZ+qD50LpfWY+abAB5DorjIJRorc6Z/RKDgnH6I+xS8I84JfeeZBPjRa0KQtgj vEDtNx2Cl3IV3thHsuNQae6XZ+WH4sy1M6eqTEjfBpUHQDD38coLIn1vA21QYjvxv+zA xLzcbF7NHTrM9s9Ja9IHuyiogAoR/c0/jqMeIdygwpCPSf64D+20axUA0hntQ1oZbVcA h+/QGrAkeAhHZrGy/7u/qour5oHbtkprdwfGcMJoLJU00duWEDZI0vpdPjqAK+mSCcMl Xzcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a170902e84100b0017808c0aa8bsi4110434plg.115.2022.11.11.13.29.25; Fri, 11 Nov 2022 13:29:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232574AbiKKV2l (ORCPT + 99 others); Fri, 11 Nov 2022 16:28:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231911AbiKKV2i (ORCPT ); Fri, 11 Nov 2022 16:28:38 -0500 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D49B65B1; Fri, 11 Nov 2022 13:28:37 -0800 (PST) Received: by mail-oi1-f170.google.com with SMTP id s206so6061017oie.3; Fri, 11 Nov 2022 13:28:37 -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=WYQkfBxq8EZwV+i0hjBrh62vkf8DjdRN92Vg3SdEnQkLhEROs1MeawGc/otL+08M+p XHcUoCd2i99JrTwLTp8F8o+VHm17VrpUpCpdVtHDFYdYNDefwqhI5Liczvgk473msud6 nAAtnUzQCVqPTpHwVIbCjxy4Mb2WIT2VJWgTdvrvgh9M2ARZFWRPUt900lgWly2rxAcq gHuVX68Z3Naip2fz+SdFbgZ+1SN33SaAVT8ly/eqibqhDADSB8MDaTUdqhWgJcCqCiwc 6lsbgPb6imle8pqF3FbHFCOmDZUqwrr3cOxCa7eTbgyzfYjBJ/w5XFK8UE4UA5XH4IGx e25A== X-Gm-Message-State: ANoB5pnOgX1vTOx4UJxQIC4rJMOs0U+C0lapHRMdata4Hxkbn2noRaie 4vLTLokov3eFdxCv4HiaRw== 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-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749236768366179342?= X-GMAIL-MSGID: =?utf-8?q?1749236768366179342?= 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"