Re: [PATCH] dtc: Demote graph_child_address checks to W=2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 2, 2025 at 3:50 AM Niklas Söderlund
<niklas.soderlund+renesas@xxxxxxxxxxxx> wrote:
>
> The dtc graph_child_address check can't distinguish between bindings
> where there can only be a single endpoint, and cases where there can be
> multiple endpoints.
>
> In cases where the bindings allow for multiple endpoints but only one is
> described false warnings about unnecessary #address-cells/#size-cells
> can be generated, but only if the endpoint described have an address of
> 0 (A), for single endpoints with a non-zero address (B) no warnings are
> generated.
>
> A)
>     ports {
>         #address-cells = <1>;
>         #size-cells = <0>;
>
>         port@0 {
>             #address-cells = <1>;
>             #size-cells = <0>;
>
>             sourceA: endpoint@0 {
>                 reg = <0>
>             };
>         };
>     };
>
> B)
>     ports {
>         #address-cells = <1>;
>         #size-cells = <0>;
>
>         port@0 {
>             #address-cells = <1>;
>             #size-cells = <0>;
>
>             sourceB: endpoint@1 {
>                 reg = <1>
>             };
>         };
>     };
>
> The false warnings, and especially the confusion on why it only triggers
> for single endpoints where the address is 0, leads to confused user and
> reports of issues with DTS files. To try and mitigate this behavior by
> demote the check to W=2 and document the possibility for false warnings
> in the check itself.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> ---
> Hi,
>
> This solution was lightly hinted at [1] by Rob and I have ran with it
> for a while locally and I'm happy with the result. Lets see what the
> rest of you think.
>
> 1. https://lore.kernel.org/all/20250109150327.GA3352888-robh@xxxxxxxxxx/
> ---
>  scripts/Makefile.dtbs | 6 +++---
>  scripts/dtc/checks.c  | 5 +++++

dtc changes have to go upstream first. I can drop this when applying.

Rob





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux