On Mon, Oct 11, 2021 at 02:12:44PM -0500, Rob Herring wrote: > The interrupt provider check currently checks if an interrupt provider > has #interrupt-cells, but not whether #interrupt-cells is present > outside of interrupt-providers. Rework the check to cover the latter > case. > > Cc: Andre Przywara <andre.przywara@xxxxxxx> > Reviewed-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> > Signed-off-by: Rob Herring <robh@xxxxxxxxxx> Applied, thanks. > --- > checks.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/checks.c b/checks.c > index 1a39bfd2cd94..903083bfc423 100644 > --- a/checks.c > +++ b/checks.c > @@ -1573,14 +1573,20 @@ static void check_interrupt_provider(struct check *c, > struct node *node) > { > struct property *prop; > + bool irq_provider = node_is_interrupt_provider(node); > > - if (!node_is_interrupt_provider(node)) > + prop = get_property(node, "#interrupt-cells"); > + if (irq_provider && !prop) { > + FAIL(c, dti, node, > + "Missing '#interrupt-cells' in interrupt provider"); > return; > + } > > - prop = get_property(node, "#interrupt-cells"); > - if (!prop) > + if (!irq_provider && prop) { > FAIL(c, dti, node, > - "Missing #interrupt-cells in interrupt provider"); > + "'#interrupt-cells' found, but node is not an interrupt provider"); > + return; > + } > } > WARNING(interrupt_provider, check_interrupt_provider, NULL, &interrupts_extended_is_cell); > -- 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:
signature.asc
Description: PGP signature