From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758789AbbFAA4y (ORCPT ); Sun, 31 May 2015 20:56:54 -0400 Received: from mail1.windriver.com ([147.11.146.13]:39182 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758771AbbFAA4r (ORCPT ); Sun, 31 May 2015 20:56:47 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Andrew Morton Subject: [PATCH 08/11] lib/list_sort: use late_initcall to hook in self tests Date: Sun, 31 May 2015 20:54:09 -0400 Message-ID: <1433120052-18281-9-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1433120052-18281-1-git-send-email-paul.gortmaker@windriver.com> References: <1433120052-18281-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This was using module_init, but there is no way this code can be modular. In the non-modular case, a module_init becomes a device_initcall, but this really isn't a device. So we should choose a more appropriate initcall bucket to put it in. Assuming boot time self tests need to be observed over a console to be useful, and that the console device could possibly not be fully functional until after device_initcall, we move this to the late_initcall bucket, which is immediately after device_initcall. Cc: Andrew Morton Signed-off-by: Paul Gortmaker --- lib/list_sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/list_sort.c b/lib/list_sort.c index b29015102698..3fe401067e20 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -289,5 +289,5 @@ exit: kfree(elts); return err; } -module_init(list_sort_test); +late_initcall(list_sort_test); #endif /* CONFIG_TEST_LIST_SORT */ -- 2.2.1