]> 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)
commit97c77e925d9f854f068c4a71e1c937384239bafa
tree05a577e14b355a97f8b42fba0d5dcb48760a06b4
parentbc4494a694362362f296cfb245a0d6965b345397
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