bianbu-linux-6.6/arch/ia64/kernel
James Morse 6f28a26134 ia64: fix build error due to switch case label appearing next to declaration
Since commit aa06a9bd85 ("ia64: fix clock_getres(CLOCK_MONOTONIC) to
report ITC frequency"), gcc 10.1.0 fails to build ia64 with the gnomic:
| ../arch/ia64/kernel/sys_ia64.c: In function 'ia64_clock_getres':
| ../arch/ia64/kernel/sys_ia64.c:189:3: error: a label can only be part of a statement and a declaration is not a statement
|   189 |   s64 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);

This line appears immediately after a case label in a switch.

Move the declarations out of the case, to the top of the function.

Link: https://lkml.kernel.org/r/20230117151632.393836-1-james.morse@arm.com
Fixes: aa06a9bd85 ("ia64: fix clock_getres(CLOCK_MONOTONIC) to report ITC frequency")
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Sergei Trofimovich <slyich@gmail.com>
Cc: Émeric Maschino <emeric.maschino@gmail.com>
Cc: matoro <matoro_mailinglist_kernel@matoro.tk>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-01-31 16:44:08 -08:00
..
syscalls
.gitignore
acpi-ext.c
acpi.c
asm-offsets.c
audit.c
brl_emu.c
crash.c
crash_dump.c
cyclone.c
dma-mapping.c
efi.c
efi_stub.S
elfcore.c elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} 2023-01-05 15:12:12 +00:00
entry.h
entry.S
err_inject.c
esi.c
esi_stub.S
fsys.S
fsyscall_gtod_data.h
ftrace.c
gate-data.S
gate.lds.S
gate.S
head.S
iosapic.c
irq.c
irq.h
irq_ia64.c
irq_lsapic.c
ivt.S
kprobes.c
machine_kexec.c
Makefile ia64: simplify esi object addition in Makefile 2022-10-03 03:53:12 +09:00
Makefile.gate
mca.c ia64: mca: use strscpy() is more robust and safer 2022-10-11 18:51:10 -07:00
mca_asm.S
mca_drv.c
mca_drv.h
mca_drv_asm.S
minstate.h
module.c
msi_ia64.c
numa.c
pal.S
palinfo.c
patch.c
pci-dma.c
perfmon_itanium.h
process.c
ptrace.c ia64: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:40 -08:00
relocate_kernel.S
sal.c
salinfo.c
setup.c ia64: move from strlcpy with unused retval to strscpy 2022-09-11 21:55:09 -07:00
sigframe.h
signal.c
smp.c
smpboot.c
stacktrace.c
sys_ia64.c ia64: fix build error due to switch case label appearing next to declaration 2023-01-31 16:44:08 -08:00
time.c
topology.c
traps.c
unaligned.c
uncached.c
unwind.c
unwind_decoder.c
unwind_i.h
vmlinux.lds.S