Prev: [PATCH 7/9] HWPOISON, hugetlb: fix unpoison for hugepage
Next: [PATCH 2/9] hugetlb: add allocate function for hugepage migration
From: Felipe Balbi on 10 Aug 2010 05:40 Hi, On Tue, Aug 10, 2010 at 11:11:08AM +0200, ext Christian Dietrich wrote: >diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c >index ed64588..73586ad 100644 >--- a/arch/frv/mm/init.c >+++ b/arch/frv/mm/init.c >@@ -170,23 +170,6 @@ void __init mem_init(void) > */ > void free_initmem(void) > { >-#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) >- unsigned long start, end, addr; >- >- start = PAGE_ALIGN((unsigned long) &__init_begin); /* round up */ >- end = ((unsigned long) &__init_end) & PAGE_MASK; /* round down */ >- >- /* next to check that the page we free is not a partial page */ >- for (addr = start; addr < end; addr += PAGE_SIZE) { >- ClearPageReserved(virt_to_page(addr)); >- init_page_count(virt_to_page(addr)); >- free_page(addr); >- totalram_pages++; >- } >- >- printk("Freeing unused kernel memory: %ldKiB freed (0x%lx - 0x%lx)\n", >- (end - start) >> 10, start, end); >-#endif > } /* end free_initmem() */ and now you have an empty function... how about removing the function completely and it's uses ? -- balbi DefectiveByDesign.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Christian Dietrich on 10 Aug 2010 07:00 Felipe Balbi <felipe.balbi(a)nokia.com> writes: > Hi, > > On Tue, Aug 10, 2010 at 11:11:08AM +0200, ext Christian Dietrich wrote: >>diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c >>index ed64588..73586ad 100644 >>--- a/arch/frv/mm/init.c >>+++ b/arch/frv/mm/init.c >>@@ -170,23 +170,6 @@ void __init mem_init(void) >> */ >> void free_initmem(void) >> { >>-#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) >>- unsigned long start, end, addr; >>- >>- start = PAGE_ALIGN((unsigned long) &__init_begin); /* round up */ >>- end = ((unsigned long) &__init_end) & PAGE_MASK; /* round down */ >>- >>- /* next to check that the page we free is not a partial page */ >>- for (addr = start; addr < end; addr += PAGE_SIZE) { >>- ClearPageReserved(virt_to_page(addr)); >>- init_page_count(virt_to_page(addr)); >>- free_page(addr); >>- totalram_pages++; >>- } >>- >>- printk("Freeing unused kernel memory: %ldKiB freed (0x%lx - 0x%lx)\n", >>- (end - start) >> 10, start, end); >>-#endif >> } /* end free_initmem() */ > > and now you have an empty function... how about removing the function > completely and it's uses ? If you take a look at init/main.c:826 free_initmem() is called. perhaps this can be resolved with a macro, but if anybody in the future wants to add some functionality there, he won't be happy after grepping. greetz didi -- (λ x . x x) (λ x . x x) -- See how beatiful the lambda is No documentation is better than bad documentation -- Das Ausdrucken dieser Mail wird urheberrechtlich verfolgt. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Felipe Balbi on 10 Aug 2010 08:00
On Tue, Aug 10, 2010 at 12:54:16PM +0200, ext Christian Dietrich wrote: >If you take a look at init/main.c:826 free_initmem() is called. perhaps >this can be resolved with a macro, but if anybody in the future wants to >add some functionality there, he won't be happy after grepping. ok, sorry for that. Makes sense. -- balbi DefectiveByDesign.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |