genetlink: correct uAPI defines
Subsystems (2)
Jakub Kicinski
maintainerPATCH 1/1 genetlink: correct uAPI defines
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.
--- include/uapi/linux/genetlink.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/uapi/linux/genetlink.h +3 -2
@@ -87,6 +87,8 @@ enum { __CTRL_ATTR_MCAST_GRP_MAX, }; +#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) +enum {CTRL_ATTR_POLICY_UNSPEC ,CTRL_ATTR_POLICY_DO ,
@@ -96,7 +98,6 @@ enum {CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX -1 }; -#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) - +#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1)#endif /* _UAPI__LINUX_GENERIC_NETLINK_H */
Signature · 1 line
2.37.1
Quoted 8 lines · Jakub Kicinski
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_MAXshould 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_DUMPin the name.
Quoted 4 lines
We probably can't do anything about the
CTRL_ATTR_POLICY_DUMP_MAXany more, there's likely code which uses it. For consistency (*cough* codegen *cough*) let's add the correctly name define nonetheless.
Oops, yes, that all makes sense.
johannes
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 9 lines · On Tue, 9 Aug 2022 16:27:40 -0700 you wrote:
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_MAXshould 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_DUMPin the name.[...]
Here is the summary with links:
- [net] genetlink: correct uAPI defines
https://git.kernel.org/netdev/net/c/f329a0ebeaba
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html