Re: [PATCH] [6/8] Account overlapped mappings in end_pfn_map

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Monday, February 11, 2008 - 6:55 am

* Andi Kleen <ak@suse.de> wrote:


My comments have nothing to do with "hungarized variables". You used 
clearly unclean and ambigious coding constructs like:

+static unsigned long __meminit
 phys_pmd_update(pud_t *pud, unsigned long address, unsigned long end)
 {
+       unsigned long r;
        pmd_t *pmd = pmd_offset(pud, 0);
        spin_lock(&init_mm.page_table_lock);
-       phys_pmd_init(pmd, address, end);
+       r = phys_pmd_init(pmd, address, end);
        spin_unlock(&init_mm.page_table_lock);
        __flush_tlb_all();
+       return r;
 }

the "r" name is totally unintuitive and the reader of the code is given 
absolutely no idea what happens here.

The cleanliness rules about descriptive variable names are obvious, 
necessary and well respected throughout the kernel, by all other kernel 
contributors i know. For years you were allowed to merge such patches. 
You should really (re-)learn and accept the rules that all other kernel 
contributors have been following for years.

	Ingo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [0/8] Various kernel mapping bug fixes, Andi Kleen, (Mon Feb 11, 2:34 am)
[PATCH] [4/8] CPA: Fix set_memory_x for ioremap, Andi Kleen, (Mon Feb 11, 2:34 am)
[PATCH] [5/8] Fix logic error in 64bit memory hotadd, Andi Kleen, (Mon Feb 11, 2:34 am)
[PATCH] [8/8] RFC: Fix some EFI problems, Andi Kleen, (Mon Feb 11, 2:34 am)
Re: [PATCH] [4/8] CPA: Fix set_memory_x for ioremap, Ingo Molnar, (Mon Feb 11, 5:27 am)
Re: [PATCH] [4/8] CPA: Fix set_memory_x for ioremap, Andi Kleen, (Mon Feb 11, 5:45 am)
Re: [PATCH] [6/8] Account overlapped mappings in end_pfn_map, Ingo Molnar, (Mon Feb 11, 6:55 am)
Re: [PATCH] [6/8] Account overlapped mappings in end_pfn_map, Arjan van de Ven, (Mon Feb 11, 8:12 am)
Re: [PATCH] [5/8] Fix logic error in 64bit memory hotadd, Yasunori Goto, (Tue Feb 12, 3:35 am)
Re: [PATCH] [7/8] Implement true end_pfn_mapped for 32bit, Thomas Gleixner, (Tue Feb 12, 12:39 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Thomas Gleixner, (Tue Feb 12, 1:04 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Andi Kleen, (Tue Feb 12, 1:23 pm)
Re: [PATCH] [7/8] Implement true end_pfn_mapped for 32bit, Thomas Gleixner, (Tue Feb 12, 1:25 pm)
Re: [PATCH] [8/8] RFC: Fix some EFI problems, Thomas Gleixner, (Tue Feb 12, 1:48 pm)