Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437472
| From | Ganesh Mahendran <opensource.ganesh@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 6/8] mm/zsmalloc: add __init,__exit attribute |
| Date | 2016-07-06 08:30 +0200 |
| Message-ID | <rROvo-5Cf-43@gated-at.bofh.it> (permalink) |
| References | <rROvn-5Cf-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add __init,__exit attribute for function that only called in
module init/exit to save memory.
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
----
v3:
revert change in v2 - Sergey
v2:
add __init/__exit for zs_register_cpu_notifier/zs_unregister_cpu_notifier
---
mm/zsmalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index ded312b..46526b9 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1344,7 +1344,7 @@ static void zs_unregister_cpu_notifier(void)
cpu_notifier_register_done();
}
-static void init_zs_size_classes(void)
+static void __init init_zs_size_classes(void)
{
int nr;
@@ -1887,7 +1887,7 @@ static struct file_system_type zsmalloc_fs = {
.kill_sb = kill_anon_super,
};
-static int zsmalloc_mount(void)
+static int __init zsmalloc_mount(void)
{
int ret = 0;
@@ -1898,7 +1898,7 @@ static int zsmalloc_mount(void)
return ret;
}
-static void zsmalloc_unmount(void)
+static void __exit zsmalloc_unmount(void)
{
kern_unmount(zsmalloc_mnt);
}
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v3 6/8] mm/zsmalloc: add __init,__exit attribute Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-07-06 08:30 +0200 Re: [PATCH v3 6/8] mm/zsmalloc: add __init,__exit attribute kbuild test robot <lkp@intel.com> - 2016-07-06 10:10 +0200 Re: [PATCH v3 6/8] mm/zsmalloc: add __init,__exit attribute Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-07-06 10:30 +0200
csiph-web