dt-validate crash on <foo>-gpio

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

 



Hi Rob,

When running "make dtbs_check" on a DTB in the Renesas BSP, I ran into
the following backtrace:

    Traceback (most recent call last):
      File "dt-validate", line 8, in <module>
        sys.exit(main())
      File "dt-schema/dtschema/dtb_validate.py", line 144, in main
        sg.check_dtb(filename)
      File "dt-schema/dtschema/dtb_validate.py", line 87, in check_dtb
        dt = self.validator.decode_dtb(f.read())
      File "dt-schema/dtschema/validator.py", line 491, in decode_dtb
        return [dtschema.dtb.fdt_unflatten(self, dtb)]
      File "dt-schema/dtschema/dtb.py", line 483, in fdt_unflatten
        fixup_gpios(dt)
      File "dt-schema/dtschema/dtb.py", line 373, in fixup_gpios
        fixup_gpios(v)
      File "dt-schema/dtschema/dtb.py", line 373, in fixup_gpios
        fixup_gpios(v)
      File "dt-schema/dtschema/dtb.py", line 373, in fixup_gpios
        fixup_gpios(v)
      File "dt-schema/dtschema/dtb.py", line 378, in fixup_gpios
        val = v[0]
    TypeError: 'bool' object is not subscriptable

Turns out the issue is triggered by the presence of a (non-documented)
boolean "no-use-gpio" property.

Apparently anything that matches "*-gpio" is treated as having a list of
GPIO specifiers, causing a crash if that does not turn out to be true...
While the introduction of a "no-use-gpio" boolean property might not
survive public review, it would be good if the tooling wouldn't crash
on it.

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux