On Wed, Oct 24, 2012 at 05:24:30PM +0800, Firo Yang wrote: > @@ -379,7 +379,7 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) > pud_t *pud; > pmd_t *pmd; > > - pgd = (pgd_t *)page_address(page) + pgd_index(address); > + pgd = page_address(page) + pgd_index(address); This cast is actually needed. It changes how the math works. Really it's not a good idea to start with things under arch/ or mm/. That code is already written to a much higher standard so things which look like mistake are maybe done for some subtle reason. We all make mistakes, but it's better to test things if you are able to and perhaps this could have been avoided. (I don't know). regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html