Devicetree
 help / color / mirror / Atom feed
From: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
To: sashiko-reviews@lists.linux.dev, Rob Herring <robh@kernel.org>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v26 05/10] dt-bindings: arm: Document reboot mode magic
Date: Mon, 28 Sep 2026 22:50:49 +0530	[thread overview]
Message-ID: <043a479c-7ce2-4dca-ab9a-4a3b11e43005@oss.qualcomm.com> (raw)
In-Reply-To: <20260928062613.7BB651F000FF@smtp.kernel.org>



On 9/28/2026 11:56 AM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Low] dt-bindings: ineffective unevaluatedProperties allows undocumented properties
> - [Low] dt-bindings: missing maxItems constraint on mode-* arrays
> --
> 
> commit b385b6956b70c623850aefcc8ceb50fda4b87cc0
> Author: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
> 
> dt-bindings: arm: Document reboot mode magic
> 
> Add bindings to describe vendor-specific reboot modes. Values here
> correspond to valid parameters to vendor-specific reset types in PSCI
> SYSTEM_RESET2 call.
> 
>> diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml
>> index 0d04389c81faa..82ae25e7a3386 100644
>> --- a/Documentation/devicetree/bindings/arm/psci.yaml
>> +++ b/Documentation/devicetree/bindings/arm/psci.yaml
> [ ... ]
>> @@ -98,6 +98,39 @@ properties:
>>         [1] Kernel documentation - ARM idle states bindings
>>           Documentation/devicetree/bindings/cpu/idle-states.yaml
>>   
>> +  reboot-mode:
>> +    type: object
>> +    $ref: /schemas/power/reset/reboot-mode.yaml#
>> +    unevaluatedProperties: false
> 
> [Severity: Low]
> Does unevaluatedProperties here effectively restrict undocumented properties?
> 
> The referenced schema /schemas/power/reset/reboot-mode.yaml# has an open
> additionalProperties: true. Under JSON Schema evaluation rules, this causes
> all properties to be annotated as successfully evaluated.
> 
> Consequently, unevaluatedProperties: false in the referencing schema becomes
> a no-op, allowing any arbitrary property to pass validation silently.
> 
>> +    properties:
>> +      # "mode-normal" is just SYSTEM_RESET
>> +      mode-normal: false
>> +    patternProperties:
>> +      "^mode-.*$":
>> +        $ref: /schemas/types.yaml#/definitions/uint32-array
>> +        minItems: 2
> 
> [Severity: Low]
> Should this also include a maxItems constraint?
> 
> Providing a list of schemas to items constrains the initial array elements
> but does not intrinsically limit the array's maximum length.
> 
> Without maxItems: 3, a device tree defining 4 or more cells for a reboot
> mode will silently pass schema validation, violating the binding's up to
> three 32-bit cells requirement.
> 
>> +        items:
>> +          - description: arg1 (vendor-specific SYSTEM_RESET2 reset_type)
>> +            minimum: 0x80000000
>> +          - description: arg2 (cookie_lo in 2-cell form, cookie_hi in 3-cell form)
>> +          - description: arg3 (cookie_lo in 3-cell form)

I would wait for Rob's review on both comments.

thanks,
Shivendra

  reply	other threads:[~2026-09-28 17:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  6:09 [PATCH v26 00/10] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 01/10] power: reset: reboot-mode: Support up to 3 magic values per mode Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 02/10] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-09-28  6:26   ` sashiko-bot
2026-09-28 17:25     ` Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 03/10] firmware: psci: Introduce command-based resets Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 04/10] firmware: psci: Add support for PSCI auxiliary devices Shivendra Pratap
2026-10-02 13:29   ` Bartosz Golaszewski
2026-09-28  6:09 ` [PATCH v26 05/10] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-09-28  6:26   ` sashiko-bot
2026-09-28 17:20     ` Shivendra Pratap [this message]
2026-10-06  2:53   ` Rob Herring (Arm)
2026-09-28  6:09 ` [PATCH v26 06/10] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-10-02 13:30   ` Bartosz Golaszewski
2026-10-04  7:29     ` Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 07/10] arm64: dts: qcom: Add psci reboot-modes for kodiak boards Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 08/10] arm64: dts: qcom: Add psci reboot-modes for lemans boards Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 09/10] arm64: dts: qcom: Add psci reboot-modes for monaco boards Shivendra Pratap
2026-09-28  6:09 ` [PATCH v26 10/10] arm64: dts: qcom: Add psci reboot-modes for talos boards Shivendra Pratap

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=043a479c-7ce2-4dca-ab9a-4a3b11e43005@oss.qualcomm.com \
    --to=shivendra.pratap@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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