qemu-e2k/hw/timer
Cédric Le Goater 62fcc4e872 aspeed/timer: Clean up local variable shadowing
commit 8137355e85 ("aspeed/timer: Fix behaviour running Linux")
introduced a MAX() expression to calculate the next timer deadline :

    return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0));

The second MAX() is not necessary since the compared values are an
unsigned and 0. Simply remove it and fix warning :

  ../hw/timer/aspeed_timer.c: In function ‘calculate_next’:
  ../include/qemu/osdep.h:396:31: warning: declaration of ‘_a’ shadows a previous local [-Wshadow=compatible-local]
    396 |         typeof(1 ? (a) : (b)) _a = (a), _b = (b);       \
        |                               ^~
  ../hw/timer/aspeed_timer.c:170:12: note: in expansion of macro ‘MAX’
    170 |     next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
        |            ^~~
  ../hw/timer/aspeed_timer.c:170:16: note: in expansion of macro ‘MAX’
    170 |     next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
        |                ^~~
  /home/legoater/work/qemu/qemu-aspeed.git/include/qemu/osdep.h:396:31: note: shadowed declaration is here
    396 |         typeof(1 ? (a) : (b)) _a = (a), _b = (b);       \
        |                               ^~
  ../hw/timer/aspeed_timer.c:170:12: note: in expansion of macro ‘MAX’
    170 |     next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
        |            ^~~

Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-ID: <20230922155924.1172019-5-clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2023-09-29 10:07:19 +02:00
..
a9gtimer.c hw/timer: fix a9gtimer vmstate 2022-02-21 13:30:21 +00:00
allwinner-a10-pit.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
altera_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
arm_mptimer.c
arm_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
armv7m_systick.c hw/timer/armv7m_systick: Update clock source before enabling timer 2022-02-08 10:56:28 +00:00
aspeed_timer.c aspeed/timer: Clean up local variable shadowing 2023-09-29 10:07:19 +02:00
avr_timer16.c
bcm2835_systmr.c
cadence_ttc.c timer: cadence_ttc: Break out header file to allow embedding 2022-04-21 11:37:03 +01:00
cmsdk-apb-dualtimer.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
cmsdk-apb-timer.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
digic-timer.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
etraxfs_timer.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
exynos4210_mct.c exynos: Fix out-of-bounds access in exynos4210_gcomp_find debug printf 2023-04-20 10:21:13 +01:00
exynos4210_pwm.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
grlib_gptimer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
hpet.c hw/timer/hpet: Fix expiration time overflow 2023-03-02 03:10:47 -05:00
i8254_common.c hw/timer/i8254_common: Share "iobase" property via base class 2023-06-05 07:43:23 +01:00
i8254.c hw/timer/i8254_common: Share "iobase" property via base class 2023-06-05 07:43:23 +01:00
ibex_timer.c hw/intc: Move mtimer/mtimecmp to aclint 2022-09-07 09:19:10 +02:00
imx_epit.c hw/timer/imx_epit: fix limit check 2023-04-20 10:21:14 +01:00
imx_gpt.c i.MX6UL: Add a specific GPT timer instance for the i.MX6UL 2023-01-05 15:02:08 +00:00
Kconfig hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mips_gictimer.c hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
mss-timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
npcm7xx_timer.c hw/timer/npcm7xx_timer: Use new clock_ns_to_ticks() 2021-03-08 17:20:01 +00:00
nrf51_timer.c hw/timer/nrf51_timer: Don't lose time when timer is queried in tight loop 2023-06-19 11:26:33 +01:00
omap_gptimer.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
omap_synctimer.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
pxa2xx_timer.c
renesas_cmt.c treewide: Remove the unnecessary space before semicolon 2022-10-24 13:41:10 +02:00
renesas_tmr.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
sh_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
sifive_pwm.c hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
slavio_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
sse-counter.c hw: Do not include hw/irq.h if it is not necessary 2021-05-02 17:24:50 +02:00
sse-timer.c Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
stellaris-gptm.c hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale 2021-09-01 11:08:20 +01:00
stm32f2xx_timer.c
trace-events hw/sh4: Change debug printfs to traces 2021-10-30 18:39:37 +02:00
trace.h
xilinx_timer.c hw/timer/xilinx_timer: Use XpsTimerState instead of 'struct timerblock' 2023-01-12 17:15:09 +00:00