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

csky: add missing brackets in a macro for tlb.h

As an earlier patch made the macro argument more complicated, compilation
now fails with:

In file included from mm/madvise.c:30:
mm/madvise.c: In function 'madvise_free_single_vma':
arch/csky/include/asm/tlb.h:11:11: error:
invalid type argument of '->' (have 'struct mmu_gather')

Link: https://lore.kernel.org/r/20190901193601.GB5208@mellanox.com
Fixes: 923bfc561e75 ("pagewalk: separate function pointers from iterator data")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

+4 -4
+4 -4
arch/csky/include/asm/tlb.h
··· 8 8 9 9 #define tlb_start_vma(tlb, vma) \ 10 10 do { \ 11 - if (!tlb->fullmm) \ 12 - flush_cache_range(vma, vma->vm_start, vma->vm_end); \ 11 + if (!(tlb)->fullmm) \ 12 + flush_cache_range(vma, (vma)->vm_start, (vma)->vm_end); \ 13 13 } while (0) 14 14 15 15 #define tlb_end_vma(tlb, vma) \ 16 16 do { \ 17 - if (!tlb->fullmm) \ 18 - flush_tlb_range(vma, vma->vm_start, vma->vm_end); \ 17 + if (!(tlb)->fullmm) \ 18 + flush_tlb_range(vma, (vma)->vm_start, (vma)->vm_end); \ 19 19 } while (0) 20 20 21 21 #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)