From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757092AbcGGJGp (ORCPT ); Thu, 7 Jul 2016 05:06:45 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35080 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757054AbcGGJGl (ORCPT ); Thu, 7 Jul 2016 05:06:41 -0400 From: Ganesh Mahendran To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, mingo@redhat.com, rostedt@goodmis.org, Ganesh Mahendran Subject: [PATCH v4 6/8] mm/zsmalloc: add __init,__exit attribute Date: Thu, 7 Jul 2016 17:05:36 +0800 Message-Id: <1467882338-4300-6-git-send-email-opensource.ganesh@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467882338-4300-1-git-send-email-opensource.ganesh@gmail.com> References: <1467882338-4300-1-git-send-email-opensource.ganesh@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add __init,__exit attribute for function that only called in module init/exit to save memory. Signed-off-by: Ganesh Mahendran ---- v4: remove __init/__exit from zsmalloc_mount/zsmalloc_umount v3: revert change in v2 - Sergey v2: add __init/__exit for zs_register_cpu_notifier/zs_unregister_cpu_notifier --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index ded312b..780eabd 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; -- 1.9.1