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]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux