Skip to content

Commit

Permalink
um: pgtable.h: Fix W=1 warning for empty body in 'do' statement
Browse files Browse the repository at this point in the history
Use the common kernel style to eliminate a warning:

./arch/um/include/asm/pgtable.h:305:47: warning: suggest braces around empty body in ‘do’ statement [-Wempty-body]
 #define update_mmu_cache(vma,address,ptep) do ; while (0)
                                               ^
mm/filemap.c:3212:3: note: in expansion of macro ‘update_mmu_cache’
   update_mmu_cache(vma, addr, vmf->pte);
   ^~~~~~~~~~~~~~~~

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: linux-um@lists.infradead.org
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Randy Dunlap authored and Richard Weinberger committed Apr 15, 2021
1 parent c521db9 commit 6e16631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
struct mm_struct;
extern pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr);

#define update_mmu_cache(vma,address,ptep) do ; while (0)
#define update_mmu_cache(vma,address,ptep) do {} while (0)

/* Encode and de-code a swap entry */
#define __swp_type(x) (((x).val >> 5) & 0x1f)
Expand Down

0 comments on commit 6e16631

Please sign in to comment.