From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Daniel Borkmann <dborkman@redhat.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: netdev_kobject_init: annotate with __init
Date: Mon, 06 Jan 2014 19:13:08 +0400 [thread overview]
Message-ID: <52CAC804.9080603@cogentembedded.com> (raw)
In-Reply-To: <1388967611-14263-1-git-send-email-dborkman@redhat.com>
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 <dborkman@redhat.com>
[...]
> 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
next prev parent reply other threads:[~2014-01-06 15:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 0:20 [PATCH net-next] net: netdev_kobject_init: annotate with __init Daniel Borkmann
2014-01-06 1:28 ` David Miller
2014-01-06 15:13 ` Sergei Shtylyov [this message]
2014-01-06 16:18 ` Daniel Borkmann
2014-01-06 17:13 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52CAC804.9080603@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).