From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754642AbcCBJW6 (ORCPT ); Wed, 2 Mar 2016 04:22:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:33508 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754485AbcCBJWz (ORCPT ); Wed, 2 Mar 2016 04:22:55 -0500 Subject: Re: [PATCH] mm/compaction: don't use modular references for non modular code To: Paul Gortmaker , linux-kernel@vger.kernel.org References: <1455403654-28951-1-git-send-email-paul.gortmaker@windriver.com> Cc: linux-mm@kvack.org, Andrew Morton From: Vlastimil Babka Message-ID: <56D6B0EC.2010601@suse.cz> Date: Wed, 2 Mar 2016 10:22:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1455403654-28951-1-git-send-email-paul.gortmaker@windriver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/13/2016 11:47 PM, Paul Gortmaker wrote: > replace module_init with subsys_initcall ; which will be two > levels earlier, but mm smells like a subsystem to me. I admit I don't know the exact differences here, but it makes sense as it's not a module. I just copied this code from kswapd, which also uses module_init(). Should it be also converted? > Compile tested only. > > Cc: Vlastimil Babka > Cc: Andrew Morton > Signed-off-by: Paul Gortmaker > --- > > [Feel free to squash this into the original, if desired.] > > mm/compaction.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 4cb1c2ef5abb..4d99e1f5055c 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -20,7 +20,6 @@ > #include > #include > #include > -#include > #include "internal.h" > > #ifdef CONFIG_COMPACTION > @@ -1954,7 +1953,6 @@ static int __init kcompactd_init(void) > hotcpu_notifier(cpu_callback, 0); > return 0; > } > - > -module_init(kcompactd_init) > +subsys_initcall(kcompactd_init) > > #endif /* CONFIG_COMPACTION */ >