James Morse 6f28a26134 ia64: fix build error due to switch case label appearing next to declaration
Since commit aa06a9bd8533 ("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: aa06a9bd8533 ("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
..
2021-09-03 09:58:09 -07:00
2021-02-25 10:17:31 -08:00
2021-04-30 11:20:35 -07:00
2021-04-30 11:20:34 -07:00
2021-04-30 11:20:35 -07:00
2020-09-11 09:34:32 -07:00
2021-12-13 12:04:45 -06:00
2021-04-30 11:20:35 -07:00
2022-04-28 23:17:25 -07:00
2022-01-22 08:33:37 +02:00
2022-06-03 06:52:58 -07:00
2021-02-20 19:09:26 -08:00
2022-04-28 23:17:25 -07:00
2022-02-25 09:36:06 +01:00