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
allwinner-a10-pit.c
altera_timer.c
arm_mptimer.c
arm_timer.c
armv7m_systick.c
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
cmsdk-apb-dualtimer.c
cmsdk-apb-timer.c
digic-timer.c
etraxfs_timer.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
exynos4210_mct.c
exynos4210_pwm.c
grlib_gptimer.c
hpet.c
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
imx_epit.c hw/timer/imx_epit: fix limit check 2023-04-20 10:21:14 +01:00
imx_gpt.c
Kconfig
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mips_gictimer.c
mss-timer.c
npcm7xx_timer.c
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
omap_synctimer.c
pxa2xx_timer.c
renesas_cmt.c
renesas_tmr.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
sh_timer.c
sifive_pwm.c
slavio_timer.c
sse-counter.c
sse-timer.c
stellaris-gptm.c
stm32f2xx_timer.c
trace-events
trace.h
xilinx_timer.c