Commit 50a896cf2d6f ("genetlink: properly support per-op policy dumping") seems to have copy'n'pasted things a little incorrectly. The #define CTRL_ATTR_MCAST_GRP_MAX should have stayed right after the previous enum. The new CTRL_ATTR_POLICY_* needs its own define for MAX and that max should not contain the superfluous _DUMP in the name. We probably can't do anything about the CTRL_ATTR_POLICY_DUMP_MAX any more, there's likely code which uses it. For consistency (*cough* codegen *cough*) let's add the correctly name define nonetheless.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -87,6 +87,8 @@ enum { · 86 unmodified lines | ||
| 87 | 87 | __CTRL_ATTR_MCAST_GRP_MAX, |
| 88 | 88 | }; |
| 89 | 89 | |
| 90 | +#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) | |
| 91 | + | |
| 90 | 92 | enum { |
| 91 | 93 | CTRL_ATTR_POLICY_UNSPEC, |
| 92 | 94 | CTRL_ATTR_POLICY_DO, |
| @@ -96,7 +98,6 @@ enum { · 3 unmodified lines | ||
| 96 | 98 | CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1 |
| 97 | 99 | }; |
| 98 | 100 | |
| 99 | −#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) | |
| 100 | − | |
| 101 | +#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1) | |
| 101 | 102 | |
| 102 | 103 | #endif /* _UAPI__LINUX_GENERIC_NETLINK_H */ |