tools: ynl-gen: lift type requirement for attribute subsets
authorJiri Pirko <jiri@nvidia.com>
Fri, 6 Oct 2023 11:44:35 +0000 (13:44 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Oct 2023 02:44:57 +0000 (19:44 -0700)
commite18f3dc2beaa5055e27334cd2d8b492bc3e9b3a4
treeee0be32839dda17d748daea6e28aa9a999c69d88
parentc0423539559547d49cb62e76574599593829dcf8
tools: ynl-gen: lift type requirement for attribute subsets

In case an attribute is used in a subset, the type has to be currently
specified. As the attribute is already defined in the original set, this
is a redundant information in yaml file, moreover, may lead to
inconsistencies.

Example:
attribute-sets:
    ...
    name: pin
    enum-name: dpll_a_pin
    attributes:
      ...
      -
        name: parent-id
        type: u32
      ...
  -
    name: pin-parent-device
    subset-of: pin
    attributes:
      -
        name: parent-id
        type: u32             <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Remove the requirement from schema files to specify the "type" for
attribute subsets.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20231006114436.1725425-2-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/genetlink-c.yaml
Documentation/netlink/genetlink-legacy.yaml
Documentation/netlink/genetlink.yaml
Documentation/netlink/netlink-raw.yaml