lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Remove initialization of page_table in one_page_table_init()
On Tue, 14 Jul 2009, Zhaolei wrote:

> diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
> index 3cd7711..55da09b 100644
> --- a/arch/x86/mm/init_32.c
> +++ b/arch/x86/mm/init_32.c
> @@ -108,13 +108,13 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
> static pte_t * __init one_page_table_init(pmd_t *pmd)
> {
> if (!(pmd_val(*pmd) & _PAGE_PRESENT)) {
> - pte_t *page_table = NULL;
> + pte_t *page_table;
>
> if (after_bootmem) {
> #if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KMEMCHECK)
> page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
> -#endif
> if (!page_table)
> +#endif
> page_table =
> (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
> } else

Nack, gcc will already optimize the branch out for configs without
CONFIG_DEBUG_PAGEALLOC and CONFIG_KMEMCHECK. The only thing this change
does is make the code less readable.


\
 
 \ /
  Last update: 2009-07-14 12:21    [W:3.906 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site