public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Mikhail Zhilkin <csharper2005@gmail.com>,
	linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: mtd: fixed-partitions: Fix 'sercomm,scpart-id' schema
Date: Mon, 14 Nov 2022 10:14:28 +0100	[thread overview]
Message-ID: <20221114101428.3932e265@xps-13> (raw)
In-Reply-To: <20221111212824.4103514-1-robh@kernel.org>

Hi Rob,

robh@kernel.org wrote on Fri, 11 Nov 2022 15:28:24 -0600:

> 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 <csharper2005@gmail.com>
> Signed-off-by: Rob Herring <robh@kernel.org>

Mmmh right, I've missed that in my little rework. I'll apply it with
the big series "[PATCH v3 00/17]  Improve MTD bindings" as soon as the
last remaining patch gets reviewed.

> ---
>  .../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"


Thanks,
Miquèl

  reply	other threads:[~2022-11-14  9:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 21:28 [PATCH] dt-bindings: mtd: fixed-partitions: Fix 'sercomm,scpart-id' schema Rob Herring
2022-11-14  9:14 ` Miquel Raynal [this message]
2022-11-17 21:14 ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221114101428.3932e265@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=csharper2005@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox