]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv6/addrconf: simplify sysctl registration
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Mon, 18 Apr 2016 11:41:10 +0000 (14:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2016 00:13:19 +0000 (20:13 -0400)
commitd24658e019736ab9181993c390a0254173cf5e83
treef3c5db6ef9c984c8b6a7cf9e883b2ec8370cd5d7
parente648c632521e9360c63a0d4c89b5a975fdde4939
net/ipv6/addrconf: simplify sysctl registration

Struct ctl_table_header holds pointer to sysctl table which could be used
for freeing it after unregistration. IPv4 sysctls already use that.
Remove redundant NULL assignment: ndev allocated using kzalloc.

This also saves some bytes: sysctl table could be shorter than
DEVCONF_MAX+1 if some options are disable in config.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ipv6.h
net/ipv6/addrconf.c