* [PATCH 0/3] um: headers: fix various W=1 warnings
@ 2021-04-14 6:43 Randy Dunlap
2021-04-14 6:43 ` [PATCH 1/3] um: pgtable.h: fix W=1 warning for empty body in 'do' statement Randy Dunlap
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-04-14 6:43 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um
Fix a few W=1 warnings in arch/um/.
Prompted by the "kernel test robot".
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
[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(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] um: pgtable.h: fix W=1 warning for empty body in 'do' statement
2021-04-14 6:43 [PATCH 0/3] um: headers: fix various W=1 warnings Randy Dunlap
@ 2021-04-14 6:43 ` Randy Dunlap
2021-04-14 6:43 ` [PATCH 2/3] um: elf.h: " Randy Dunlap
2021-04-14 6:43 ` [PATCH 3/3] um: stub_32.h: move 'inline' before 'void' to fix W=1 warning Randy Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-04-14 6:43 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um
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
---
arch/um/include/asm/pgtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20210413.orig/arch/um/include/asm/pgtable.h
+++ linux-next-20210413/arch/um/include/asm/pgtable.h
@@ -302,7 +302,7 @@ static inline pte_t pte_modify(pte_t pte
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] um: elf.h: fix W=1 warning for empty body in 'do' statement
2021-04-14 6:43 [PATCH 0/3] um: headers: fix various W=1 warnings Randy Dunlap
2021-04-14 6:43 ` [PATCH 1/3] um: pgtable.h: fix W=1 warning for empty body in 'do' statement Randy Dunlap
@ 2021-04-14 6:43 ` Randy Dunlap
2021-04-14 6:43 ` [PATCH 3/3] um: stub_32.h: move 'inline' before 'void' to fix W=1 warning Randy Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-04-14 6:43 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um
Use 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)
^
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
---
arch/x86/um/asm/elf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20210413.orig/arch/x86/um/asm/elf.h
+++ linux-next-20210413/arch/x86/um/asm/elf.h
@@ -212,6 +212,6 @@ extern int elf_core_copy_fpregs(struct t
extern 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] um: stub_32.h: move 'inline' before 'void' to fix W=1 warning
2021-04-14 6:43 [PATCH 0/3] um: headers: fix various W=1 warnings Randy Dunlap
2021-04-14 6:43 ` [PATCH 1/3] um: pgtable.h: fix W=1 warning for empty body in 'do' statement Randy Dunlap
2021-04-14 6:43 ` [PATCH 2/3] um: elf.h: " Randy Dunlap
@ 2021-04-14 6:43 ` Randy Dunlap
2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-04-14 6:43 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Jeff Dike, Richard Weinberger, Anton Ivanov,
linux-um, kernel test robot
Use 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)
^~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
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
---
arch/x86/um/shared/sysdep/stub_32.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20210413.orig/arch/x86/um/shared/sysdep/stub_32.h
+++ linux-next-20210413/arch/x86/um/shared/sysdep/stub_32.h
@@ -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 ;"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-14 6:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 6:43 [PATCH 0/3] um: headers: fix various W=1 warnings Randy Dunlap
2021-04-14 6:43 ` [PATCH 1/3] um: pgtable.h: fix W=1 warning for empty body in 'do' statement Randy Dunlap
2021-04-14 6:43 ` [PATCH 2/3] um: elf.h: " Randy Dunlap
2021-04-14 6:43 ` [PATCH 3/3] um: stub_32.h: move 'inline' before 'void' to fix W=1 warning Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).