acrn-kernel/arch/ia64/kernel
James Morse c4fd07cd5e ia64: fix build error due to switch case label appearing next to declaration
commit 6f28a26134 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-09 11:28:23 +01:00
..
syscalls ia64: fix clock_getres(CLOCK_MONOTONIC) to report ITC frequency 2022-09-11 21:55:07 -07:00
.gitignore
Makefile ia64: simplify esi object addition in Makefile 2022-10-03 03:53:12 +09:00
Makefile.gate
acpi-ext.c
acpi.c
asm-offsets.c
audit.c
brl_emu.c
crash.c
crash_dump.c vmcore: convert copy_oldmem_page() to take an iov_iter 2022-04-29 14:37:59 -07:00
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-18 11:58:12 +01:00
entry.S
entry.h
err_inject.c
esi.c
esi_stub.S
fsys.S
fsyscall_gtod_data.h
ftrace.c
gate-data.S
gate.S
gate.lds.S
head.S
iosapic.c genirq: Add and use an irq_data_update_affinity helper 2022-07-07 09:38:04 +01:00
irq.c genirq: Add and use an irq_data_update_affinity helper 2022-07-07 09:38:04 +01:00
irq.h
irq_ia64.c
irq_lsapic.c
ivt.S
kprobes.c ia64: replace comments with C99 initializers 2022-04-28 23:17:25 -07:00
machine_kexec.c
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 genirq: Add and use an irq_data_update_affinity helper 2022-07-07 09:38:04 +01:00
numa.c
pal.S
palinfo.c ia64: fix typos in comments 2022-04-28 23:17:25 -07:00
patch.c
pci-dma.c
perfmon_itanium.h
process.c This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
ptrace.c While looking at the ptrace problems with PREEMPT_RT and the problems 2022-06-03 16:13:25 -07: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 profile: setup_profiling_timer() is moslty not implemented 2022-07-29 18:12:36 -07:00
smpboot.c ia64: cleanup remove_siblinginfo() 2022-06-03 06:52:58 -07:00
stacktrace.c
sys_ia64.c ia64: fix build error due to switch case label appearing next to declaration 2023-02-09 11:28:23 +01:00
time.c
topology.c
traps.c ia64: fix typos in comments 2022-04-28 23:17:25 -07:00
unaligned.c
uncached.c mm: use for_each_online_node and node_online instead of open coding 2022-04-29 14:36:58 -07:00
unwind.c
unwind_decoder.c
unwind_i.h
vmlinux.lds.S