All of lore.kernel.org
 help / color / mirror / Atom feed
From: qun-wei.lin <qun-wei.lin@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>, <casper.li@mediatek.com>,
	<chinwen.chang@mediatek.com>, <kuan-ying.lee@mediatek.com>
Subject: Re: [PATCH] scripts: dtc: fix a false alarm for node_name_chars_strict
Date: Wed, 1 Jun 2022 21:58:28 +0800	[thread overview]
Message-ID: <96fdee041ed8ec7d0414fa989c50bf9082005f9b.camel@mediatek.com> (raw)
In-Reply-To: <CAL_JsqJnir+qA1Cgm5ATzsAH-pMqQSychLG=JQyUQg02dYb8TQ@mail.gmail.com>

On Tue, 2022-05-31 at 08:06 -0500, Rob Herring wrote:
> On Tue, May 31, 2022 at 12:34 AM Qun-Wei Lin <
> qun-wei.lin@mediatek.com> wrote:
> > 
> > The function check_node_name_chars_strict issues a false alarm when
> > compiling an overlay dts.
> > 
> > /fragment@0/__overlay__: Character '_' not recommended in node name
> > 
> > This workaround will fix it by skip checking for node named
> > __overlay__.
> > 
> > Signed-off-by: Qun-Wei Lin <qun-wei.lin@mediatek.com>
> > ---
> >  scripts/dtc/checks.c | 5 +++++
> 
> We don't take patches for dtc. You must send them to upstream dtc and
> then it will be sync'ed to the kernel tree.

Ok, I'll send this patch to the correct upstream.

> 
> >  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 */
> 
> Not a hack IMO.
> 
> However, this should be checking for any node name starting with
> '__'.

Did you mean it needs to skip the check for all nodes whose names start
with "_", such as __overlay__, __fixup__, __local_fixup__, and
__symbols__?

> 
> Also, doesn't 'fragment@0' cause a warning about missing 'reg'?

No, it doesn't.
Actually, the check_unit_address_vs_reg function suppress the common
warnings about the fragment names [1].

[1] 
https://github.com/dgibson/dtc/commit/afbddcd418fbf70467419b91f73cce972482449c


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: qun-wei.lin <qun-wei.lin@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>, <casper.li@mediatek.com>,
	<chinwen.chang@mediatek.com>, <kuan-ying.lee@mediatek.com>
Subject: Re: [PATCH] scripts: dtc: fix a false alarm for node_name_chars_strict
Date: Wed, 1 Jun 2022 21:58:28 +0800	[thread overview]
Message-ID: <96fdee041ed8ec7d0414fa989c50bf9082005f9b.camel@mediatek.com> (raw)
In-Reply-To: <CAL_JsqJnir+qA1Cgm5ATzsAH-pMqQSychLG=JQyUQg02dYb8TQ@mail.gmail.com>

On Tue, 2022-05-31 at 08:06 -0500, Rob Herring wrote:
> On Tue, May 31, 2022 at 12:34 AM Qun-Wei Lin <
> qun-wei.lin@mediatek.com> wrote:
> > 
> > The function check_node_name_chars_strict issues a false alarm when
> > compiling an overlay dts.
> > 
> > /fragment@0/__overlay__: Character '_' not recommended in node name
> > 
> > This workaround will fix it by skip checking for node named
> > __overlay__.
> > 
> > Signed-off-by: Qun-Wei Lin <qun-wei.lin@mediatek.com>
> > ---
> >  scripts/dtc/checks.c | 5 +++++
> 
> We don't take patches for dtc. You must send them to upstream dtc and
> then it will be sync'ed to the kernel tree.

Ok, I'll send this patch to the correct upstream.

> 
> >  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 */
> 
> Not a hack IMO.
> 
> However, this should be checking for any node name starting with
> '__'.

Did you mean it needs to skip the check for all nodes whose names start
with "_", such as __overlay__, __fixup__, __local_fixup__, and
__symbols__?

> 
> Also, doesn't 'fragment@0' cause a warning about missing 'reg'?

No, it doesn't.
Actually, the check_unit_address_vs_reg function suppress the common
warnings about the fragment names [1].

[1] 
https://github.com/dgibson/dtc/commit/afbddcd418fbf70467419b91f73cce972482449c


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-01 14:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31  5:33 [PATCH] scripts: dtc: fix a false alarm for node_name_chars_strict Qun-Wei Lin
2022-05-31  5:33 ` Qun-Wei Lin
2022-05-31  5:33 ` Qun-Wei Lin
2022-05-31 13:06 ` Rob Herring
2022-05-31 13:06   ` Rob Herring
2022-05-31 13:06   ` Rob Herring
2022-06-01 13:58   ` qun-wei.lin [this message]
2022-06-01 13:58     ` qun-wei.lin
2022-05-31 20:43 ` Frank Rowand
2022-05-31 20:43   ` Frank Rowand
2022-05-31 20:43   ` Frank Rowand
2022-05-31 21:49   ` Rob Herring
2022-05-31 21:49     ` Rob Herring
2022-05-31 21:49     ` Rob Herring
2022-06-01  1:45     ` Frank Rowand
2022-06-01  1:45       ` Frank Rowand
2022-06-01  1:45       ` Frank Rowand
2022-06-01 13:59       ` qun-wei.lin
2022-06-01 13:59         ` qun-wei.lin
2022-06-02  3:07         ` Frank Rowand
2022-06-02  3:07           ` Frank Rowand
2022-06-02  3:07           ` Frank Rowand

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=96fdee041ed8ec7d0414fa989c50bf9082005f9b.camel@mediatek.com \
    --to=qun-wei.lin@mediatek.com \
    --cc=casper.li@mediatek.com \
    --cc=chinwen.chang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=kuan-ying.lee@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.