diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-08-09 15:10:08 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-08-14 21:54:04 +1000 |
commit | 0f7ce21ab5209426b00636636a5f2d9008738654 (patch) | |
tree | 1978e3c50f185a99e14325305d3cdcba8639d808 /arch/powerpc/xmon | |
parent | 0b5e06e9cb156e7e97bfb4e1ebf6acd62497eaf5 (diff) |
powerpc: mark more local variables as volatile
A while ago I created a2305e3de8193 ("powerpc: mark local variables
around longjmp as volatile") in order to allow building powerpc with
-Wextra enabled on gcc-11.
I tried this again with gcc-13 and found two more of the same issues,
presumably based on slightly different optimization paths being taken
here:
arch/powerpc/xmon/xmon.c:3306:27: error: variable 'mm' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
arch/powerpc/kexec/crash.c:353:22: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
I checked a bunch of randconfigs and found only these two, so just
address them the same way as the others.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230809131024.2039647-1-arnd@kernel.org
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index fae747cc57d2..0f3f93c82d7e 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -3303,7 +3303,7 @@ static void show_pte(unsigned long addr) { unsigned long tskv = 0; struct task_struct *volatile tsk = NULL; - struct mm_struct *mm; + struct mm_struct *volatile mm; pgd_t *pgdp; p4d_t *p4dp; pud_t *pudp; |