lkml.org 
[lkml]   [2021]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] net: sysctl: cleanup net_sysctl_init()
On Wed, 06 Jan 2021 20:40:28 +0000 Alexander Lobakin wrote:
> 'net_header' is not used outside of this function, so can be moved
> from BSS onto the stack.
> Declarations of one-element arrays are discouraged, and there's no
> need to store 'empty' in BSS. Simply allocate it from heap at init.

Are you sure? It's passed as an argument to register_sysctl()
so it may well need to be valid for the lifetime of net_header.

\
 
 \ /
  Last update: 2021-01-07 01:32    [W:0.049 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site