]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: factor out extack composition
authorJakub Kicinski <kuba@kernel.org>
Fri, 26 Aug 2022 03:09:30 +0000 (20:09 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Aug 2022 10:20:43 +0000 (12:20 +0200)
commit2c957222043483b0d95ce845d8c7c9daf844ecad
tree05a577e14b355a97f8b42fba0d5dcb48760a06b4
parent313f4893ef1de55717264ba8ec16536d8be6ebe6
netlink: factor out extack composition

The ext_ack writing code looks very "organically grown".
Move the calculation of the size and writing out to helpers.
This is more idiomatic and gives us the ability to return early
avoiding the long (and randomly ordered) "if" conditions.

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/netlink/af_netlink.c