21 Jun, 2019

11 commits

  • released under GPL v2.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • Sometimes, we just want the parser to retrieve all symbols from
    ABI, in order to check for parsing errors. So, add a new
    "validate" command.

    While here, update the man/help pages.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • The ABI README file doesn't provide any meaning for a Where:
    tag. Yet, a few ABI symbols use it. So, make the parser
    handle it, emitting a warning.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • The file the Documentation/ABI/testing/sysfs-class-power has
    voltage_min, voltage_max and voltage_now symbols duplicated.

    They are defined first for "General Properties" and then for
    "USB Properties".

    This cause those warnings:

    get_abi.pl rest --dir $srctree/Documentation/ABI/testing:26933: WARNING: Duplicate explicit target name: "abi_sys_class_power_supply_supply_name_voltage_max".
    get_abi.pl rest --dir $srctree/Documentation/ABI/testing:26968: WARNING: Duplicate explicit target name: "abi_sys_class_power_supply_supply_name_voltage_min".
    get_abi.pl rest --dir $srctree/Documentation/ABI/testing:27008: WARNING: Duplicate explicit target name: "abi_sys_class_power_supply_supply_name_voltage_now".

    And, as the references are not valid, it will also generate
    warnings about links to undefined references.

    Fix it by storing labels into a hash table and, when a duplicated
    one is found, appending random characters at the end.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • A few files are failing to parse:

    Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats
    Documentation/ABI/testing/sysfs-class-pktcdvd
    Documentation/ABI/testing/sysfs-bus-nfit

    On all three files, the problem is that there is a ":" character
    at the initial file description.

    Improve the parse in order to handle those special cases.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • Several entries at the ABI have multiple What: with the same
    description.

    Instead of showing those symbols as sections, let's show them
    as tables. That makes easier to read on the final output,
    and avoid too much recursion at Sphinx parsing.

    We need to put file references at the end, as we don't want
    non-file tables to be mangled with other entries.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • Change its syntax to allow switching between ReST output mode
    and a new search mode, with allows to seek for ABI symbols
    using regex.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • Instead of using a ReST compilant label while parsing,
    move the label to ReST output. That makes the parsing logic
    more generic, allowing it to provide other types of output.

    As a side effect, now all files used to generate the output
    will be output. We can later add command line arguments to
    filter.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • The usage of literal blocks make the document very complex,
    causing the browser to take a long time to load.

    On most ABI descriptions, they're a plain text, and don't
    require a literal block.

    So, add a logic there with identifies when a literal block
    is needed.

    As, on literal blocks, we need to respect the original
    document space, the most complex part of this patch is
    to preserve the original spacing where needed.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • It sounds usefult o parse files with has some text at the
    beginning. Add support for it.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     
  • Add a script to parse the Documentation/ABI files and produce
    an output with all entries inside an ABI (sub)directory.

    Right now, it outputs its contents on ReST format. It shouldn't
    be hard to make it produce other kind of outputs, since the ABI
    file parser is implemented in separate than the output generator.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab