]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: remove a level of indentation in rtnl_newlink()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 28 Nov 2018 06:32:30 +0000 (22:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Nov 2018 21:33:34 +0000 (13:33 -0800)
commit3c95abb2b9267b16efeae01b46986b9e0482dcfe
treeffa94b60f69cdae7a73f83c0d4fd96662917c0a9
parentcddd137bb29a19b0e330a0bc27b6ea89453cf820
rtnetlink: remove a level of indentation in rtnl_newlink()

rtnl_newlink() used to create VLAs based on link kind.  Since
commit 63632bfe6ceb ("rtnetlink: Remove VLA usage") statically
sized array is created on the stack, so there is no more use
for a separate code block that used to be the VLA's live range.

While at it christmas tree the variables.  Note that there is
a goto-based retry so to be on the safe side the variables can
no longer be initialized in place.  It doesn't seem to matter,
logically, but why make the code harder to read..

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c