Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeAQDrg (ORCPT + 1 other); Tue, 16 Jan 2018 22:47:36 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:48624 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750816AbeAQDrf (ORCPT ); Tue, 16 Jan 2018 22:47:35 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="35395321" From: Dou Liyang To: CC: Dou Liyang , Catalin Marinas , Andrew Morton , Subject: [PATCH] mm/kmemleak: Make kmemleak_boot_config __init Date: Wed, 17 Jan 2018 11:47:20 +0800 Message-ID: <20180117034720.26897-1-douly.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: B1C2549F19A0.AF065 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: The early_param() is only called during kernel initialization, So Linux marks the functions of it with __init macro to save memory. But it forgot to mark the kmemleak_boot_config(). So, Make it __init as well. Cc: Catalin Marinas Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Dou Liyang --- mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index f656ca27f6c2..6ccd0c954189 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1962,7 +1962,7 @@ static void kmemleak_disable(void) /* * Allow boot-time kmemleak disabling (enabled by default). */ -static int kmemleak_boot_config(char *str) +static int __init kmemleak_boot_config(char *str) { if (!str) return -EINVAL; -- 2.14.3