From e656a634118285142063527b2cd40c749036de82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 11 Sep 2013 14:23:27 -0700 Subject: extable: skip sorting if the table is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At least on ARM no-MMU the extable is empty and so there is nothing to sort. So add a check for the table to be empty which effectively only changes that the misleading pr_notice is suppressed. Signed-off-by: Uwe Kleine-König Cc: Ingo Molnar Cc: David Daney Cc: "H. Peter Anvin" Cc: Borislav Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds diff --git a/kernel/extable.c b/kernel/extable.c index 67460b9..832cb28 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -41,7 +41,7 @@ u32 __initdata main_extable_sort_needed = 1; /* Sort the kernel's built-in exception table */ void __init sort_main_extable(void) { - if (main_extable_sort_needed) { + if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { pr_notice("Sorting __ex_table...\n"); sort_extable(__start___ex_table, __stop___ex_table); } -- cgit v0.10.2