public inbox for devicetree-compiler@vger.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/5] checks: Add check_is_cell() for all phandle+arg properties
Date: Tue, 15 Jun 2021 16:02:36 +1000	[thread overview]
Message-ID: <YMhCfKOnsi2UKQEp@yekko> (raw)
In-Reply-To: <CAL_JsqL5ks9G1_q+8LN_ceNjE-d40ri8G2BmnxnPCCa+UrqHgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3602 bytes --]

On Tue, Jun 08, 2021 at 09:45:42AM -0500, Rob Herring wrote:
> On Mon, Jun 7, 2021 at 9:25 PM David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> >
> > On Tue, May 25, 2021 at 08:03:32PM -0500, Rob Herring wrote:
> > > There's already a check for '#.*-cells' properties, so let's enable it for
> > > all the ones we already know about.
> > >
> > > Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >
> > Good idea, applied.
> >
> > > ---
> > >  checks.c | 19 ++++++++++++++++++-
> > >  1 file changed, 18 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/checks.c b/checks.c
> > > index eb91c8ea22fa..6a01a2468c42 100644
> > > --- a/checks.c
> > > +++ b/checks.c
> > > @@ -1466,7 +1466,8 @@ static void check_provider_cells_property(struct check *c,
> > >  }
> > >  #define WARNING_PROPERTY_PHANDLE_CELLS(nm, propname, cells_name, ...) \
> > >       static struct provider nm##_provider = { (propname), (cells_name), __VA_ARGS__ }; \
> > > -     WARNING(nm##_property, check_provider_cells_property, &nm##_provider, &phandle_references);
> > > +     WARNING_IF_NOT_CELL(nm##_is_cell, cells_name); \
> > > +     WARNING(nm##_property, check_provider_cells_property, &nm##_provider, &nm##_is_cell, &phandle_references);
> > >
> > >  WARNING_PROPERTY_PHANDLE_CELLS(clocks, "clocks", "#clock-cells");
> > >  WARNING_PROPERTY_PHANDLE_CELLS(cooling_device, "cooling-device", "#cooling-cells");
> > > @@ -1843,21 +1844,37 @@ static struct check *check_table[] = {
> > >       &chosen_node_is_root, &chosen_node_bootargs, &chosen_node_stdout_path,
> > >
> > >       &clocks_property,
> > > +     &clocks_is_cell,
> > >       &cooling_device_property,
> > > +     &cooling_device_is_cell,
> > >       &dmas_property,
> > > +     &dmas_is_cell,
> > >       &hwlocks_property,
> > > +     &hwlocks_is_cell,
> > >       &interrupts_extended_property,
> > > +     &interrupts_extended_is_cell,
> > >       &io_channels_property,
> > > +     &io_channels_is_cell,
> > >       &iommus_property,
> > > +     &iommus_is_cell,
> > >       &mboxes_property,
> > > +     &mboxes_is_cell,
> > >       &msi_parent_property,
> > > +     &msi_parent_is_cell,
> > >       &mux_controls_property,
> > > +     &mux_controls_is_cell,
> > >       &phys_property,
> > > +     &phys_is_cell,
> > >       &power_domains_property,
> > > +     &power_domains_is_cell,
> > >       &pwms_property,
> > > +     &pwms_is_cell,
> > >       &resets_property,
> > > +     &resets_is_cell,
> > >       &sound_dai_property,
> > > +     &sound_dai_is_cell,
> > >       &thermal_sensors_property,
> > > +     &thermal_sensors_is_cell,
> >
> > Incidentally, if anyone can see a decent, portable way of avoiding the
> > ugly redundancy of listing all the tests in this array, I'd love to
> > hear it.
> 
> If we have a standard prefix to match on, we could generate the list:
> 
> nm -P checks.o | sed -n -e 's/^\(check_[a-zA-Z0-9_]*\).*/\&\1,/p'
> 
> (Obviously, 'check_' is not the right prefix currently.)
> 
> Most of the work here is in the build system and I don't really care
> to implement this twice. :( What happened to the Makefile wrapping
> meson?

There are a handful of issues with the meson stuff that we're (rather
slowly) ironing out before I'm ready to replace the existing makefiles
entirely.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-06-15  6:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26  1:03 [PATCH 0/5] Improve output type formatting Rob Herring
     [not found] ` <20210526010335.860787-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-05-26  1:03   ` [PATCH 1/5] yamltree: Remove marker ordering dependency Rob Herring
     [not found]     ` <20210526010335.860787-2-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-06-08  1:54       ` David Gibson
2021-05-26  1:03   ` [PATCH 2/5] checks: Add check_is_cell() for all phandle+arg properties Rob Herring
     [not found]     ` <20210526010335.860787-3-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-06-08  1:57       ` David Gibson
2021-06-08 14:45         ` Rob Herring
     [not found]           ` <CAL_JsqL5ks9G1_q+8LN_ceNjE-d40ri8G2BmnxnPCCa+UrqHgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-15  6:02             ` David Gibson [this message]
2021-05-26  1:03   ` [PATCH 3/5] checks: Drop interrupt_cells_is_cell check Rob Herring
     [not found]     ` <20210526010335.860787-4-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-06-08  1:58       ` David Gibson
2021-05-26  1:03   ` [PATCH 4/5] checks: Add markers on known properties Rob Herring
     [not found]     ` <20210526010335.860787-5-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2021-06-08  2:25       ` David Gibson
2021-06-08 12:49         ` Rob Herring
     [not found]           ` <CAL_JsqKb-4ay9JNLUOetupxBKNpBsFNB-Ztc1ocbDSj_KxSWsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-15  6:01             ` David Gibson
2021-06-15 14:25               ` Rob Herring
2021-05-26  1:03   ` [PATCH 5/5] dtc: Drop dts source restriction for yaml output Rob Herring

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=YMhCfKOnsi2UKQEp@yekko \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox