[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d4b8cc3-8433-24f9-1fc5-12d71e640952@gmail.com>
Date: Tue, 31 May 2022 16:43:18 -0400
From: Frank Rowand <frowand.list@...il.com>
To: Qun-Wei Lin <qun-wei.lin@...iatek.com>, robh+dt@...nel.org,
matthias.bgg@...il.com
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, casper.li@...iatek.com,
chinwen.chang@...iatek.com, kuan-ying.lee@...iatek.com
Subject: Re: [PATCH] scripts: dtc: fix a false alarm for
node_name_chars_strict
On 5/31/22 01:33, Qun-Wei Lin wrote:
> The function check_node_name_chars_strict issues a false alarm when
> compiling an overlay dts.
>
> /fragment@..._overlay__: Character '_' not recommended in node name
>
> This workaround will fix it by skip checking for node named __overlay__.
This is not a false alarm.
Do not special case node name "__overlay__". This node name should never
occur in a modern overlay source file.
For details, see "Overlay Source Format" in the "Overlays" section of:
https://elinux.org/Device_Tree_Reference#Overlays
That paragraph also has a pointer to the correct format for overlay
source files, which is slides 29-34 of:
https://elinux.org/Device_Tree_Reference#Overlays
-Frank
>
> Signed-off-by: Qun-Wei Lin <qun-wei.lin@...iatek.com>
> ---
> scripts/dtc/checks.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c
> index 781ba1129a8e..6ef4f2cd67b9 100644
> --- a/scripts/dtc/checks.c
> +++ b/scripts/dtc/checks.c
> @@ -325,6 +325,11 @@ static void check_node_name_chars_strict(struct check *c, struct dt_info *dti,
> {
> int n = strspn(node->name, c->data);
>
> + if (streq(node->name, "__overlay__")) {
> + /* HACK: Overlay fragments are a special case */
> + return;
> + }
> +
> if (n < node->basenamelen)
> FAIL(c, dti, node, "Character '%c' not recommended in node name",
> node->name[n]);
Powered by blists - more mailing lists