From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932401AbcGDAIo (ORCPT ); Sun, 3 Jul 2016 20:08:44 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:41001 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932333AbcGDAIn (ORCPT ); Sun, 3 Jul 2016 20:08:43 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.98.150 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 4 Jul 2016 09:09:24 +0900 From: Minchan Kim To: Ganesh Mahendran CC: , , , , , , Subject: Re: [PATCH 7/8] mm/zsmalloc: add __init,__exit attribute Message-ID: <20160704000924.GF19044@bbox> References: <1467355266-9735-1-git-send-email-opensource.ganesh@gmail.com> <1467355266-9735-7-git-send-email-opensource.ganesh@gmail.com> MIME-Version: 1.0 In-Reply-To: <1467355266-9735-7-git-send-email-opensource.ganesh@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB06/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/07/04 09:08:40, Serialize by Router on LGEKRMHUB06/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/07/04 09:08:40, Serialize complete at 2016/07/04 09:08:40 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01, 2016 at 02:41:05PM +0800, Ganesh Mahendran wrote: > Add __init,__exit attribute for function that is only called in > module init/exit to save memory. > > Signed-off-by: Ganesh Mahendran > --- > mm/zsmalloc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index 6fc631a..1c7460b 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -1349,7 +1349,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; > > @@ -1896,7 +1896,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; > > @@ -1907,7 +1907,7 @@ static int zsmalloc_mount(void) > return ret; > } > > -static void zsmalloc_unmount(void) > +static void __exit zsmalloc_unmount(void) > { > kern_unmount(zsmalloc_mnt); > } Couldn't we do it for zs_[un]register_cpu_notifier?