Subject: Re: [PATCH net-next] net: netdev_kobject_init: annotate with __init

From: Sergei Shtylyov <[email-masked]>
Date: Mon, 06 Jan 2014 19:13:08 +0400

Hello.

On 06-01-2014 4:20, Daniel Borkmann wrote:

> netdev_kobject_init() is only being called from __init context,
> that is, net_dev_init(), so annotate it with __init as well, thus
> the kernel can take this as a hint that the function is used only
> during the initialization phase and free up used memory resources
> after its invocation.

> Signed-off-by: Daniel Borkmann <[email-masked]>
[...]

> diff --git a/net/core/net-sysfs.h b/net/core/net-sysfs.h
> index bd7751e..2745a1b 100644
> --- a/net/core/net-sysfs.h
> +++ b/net/core/net-sysfs.h
> @@ -1,7 +1,7 @@
>   #ifndef __NET_SYSFS_H__
>   #define __NET_SYSFS_H__
>
> -int netdev_kobject_init(void);
> +int __init netdev_kobject_init(void);

    There's no need to also annotate function prototype.

WBR, Sergei