Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: Fix sparse warning - consistent_alloc function

Warning in dma.c was caused by incorrect type in consistent_alloc function.

Warning log:
CHECK arch/microblaze/kernel/dma.c
arch/microblaze/kernel/dma.c:53:26: warning: incorrect type in argument 1 (different base types)
arch/microblaze/kernel/dma.c:53:26: expected int [signed] gfp
arch/microblaze/kernel/dma.c:53:26: got restricted unsigned int [usertype] flag

Signed-off-by: Michal Simek <monstr@monstr.eu>

+2 -2
+1 -1
arch/microblaze/include/asm/pgtable.h
··· 572 572 573 573 extern unsigned long ioremap_bot, ioremap_base; 574 574 575 - void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle); 575 + void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle); 576 576 void consistent_free(size_t size, void *vaddr); 577 577 void consistent_sync(void *vaddr, size_t size, int direction); 578 578 void consistent_sync_page(struct page *page, unsigned long offset,
+1 -1
arch/microblaze/mm/consistent.c
··· 59 59 * uncached region. This will no doubt cause big problems if memory allocated 60 60 * here is not also freed properly. -- JW 61 61 */ 62 - void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) 62 + void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle) 63 63 { 64 64 unsigned long order, vaddr; 65 65 void *ret;