RE: [next:akpm 522/1000] mm/huge_memory.c:189:24: sparse: Using plain integer as NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kbuild test robot wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
> head:   c9941b7ec7840ad33f5822c7f238157558d40132
> commit: 4b4928dfcbe7f45ab9a900de1e0847cc555fc935 [522/1000] thp: fix huge zero page logic for page with pfn == 0
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> mm/huge_memory.c:189:24: sparse: Using plain integer as NULL pointer

Thanks for report. The fix is below.
Andrew, could you fold it into original patch?

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index bc2a548..d46ea1e 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -186,7 +186,7 @@ retry:
 			HPAGE_PMD_ORDER);
 	if (!zero_page) {
 		count_vm_event(THP_ZERO_PAGE_ALLOC_FAILED);
-		return 0;
+		return NULL;
 	}
 	count_vm_event(THP_ZERO_PAGE_ALLOC);
 	preempt_disable();
-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]