um: headers: fix various W=1 warnings
Subsystems (3)
cover um: headers: fix various W=1 warnings
Fix a few W=1 warnings in arch/um/. Prompted by the "kernel test robot".
[PATCH 1/3] um: pgtable.h: fix W=1 warning for empty body in 'do' statement [PATCH 2/3] um: elf.h: fix W=1 warning for empty body in 'do' statement [PATCH 3/3] um: stub_32.h: move 'inline' before 'void' to fix W=1 warning
arch/um/include/asm/pgtable.h | 2 +- arch/x86/um/asm/elf.h | 2 +- arch/x86/um/shared/sysdep/stub_32.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
_______________________________________________
linux-um mailing list [email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
PATCH 1/3 um: pgtable.h: fix W=1 warning for empty body in 'do' statement
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); ^~~~~~~~~~~~~~~~
--- arch/um/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/include/asm/pgtable.h +1 -1
@@ -302,7 +302,7 @@ static inline pte_t pte_modify(pte_t ptestruct 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)
_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
PATCH 2/3 um: elf.h: fix W=1 warning for empty body in 'do' statement
In reply to Randy DunlapUse the common kernel style to eliminate a warning:
./arch/x86/um/asm/elf.h:215:32: warning: suggest braces around empty body in ‘do’ statement [-Wempty-body]
#define SET_PERSONALITY(ex) do ; while(0)
^--- arch/x86/um/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/um/asm/elf.h +1 -1
@@ -212,6 +212,6 @@ extern int elf_core_copy_fpregs(struct textern long elf_aux_hwcap;#define ELF_HWCAP (elf_aux_hwcap) -#define SET_PERSONALITY (ex) do ; while(0) +#define SET_PERSONALITY (ex) do {} while(0)#endif
_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
PATCH 3/3 um: stub_32.h: move 'inline' before 'void' to fix W=1 warning
In reply to Randy DunlapUse the expected ordering of function modifier keywords.
arch/x86/um/shared/sysdep/stub_32.h:80:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline remap_stack_and_trap(void)
^~~~~~
--- arch/x86/um/shared/sysdep/stub_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/um/shared/sysdep/stub_32.h +1 -1
@@ -77,7 +77,7 @@ static inline void trap_myself(void) __asm("int3" ); } -static void inline remap_stack_and_trap (void ) +static inline void remap_stack_and_trap (void ) { __asm__volatile ( "movl %%esp,%%ebx ;"
_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um