aboutsummaryrefslogtreecommitdiff
path: root/hw/timer
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-01-09 15:02:55 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-01-12 17:15:09 +0000
commita75ed3c43064528f3409f0be286b62b9c3a47218 (patch)
treefdc3c4cc20b210a378ac7bea9bb9c3cefff1b965 /hw/timer
parent28180159ecf38d097475a5429474a4be9d2a24b8 (diff)
downloadqemu-a75ed3c43064528f3409f0be286b62b9c3a47218.zip
qemu-a75ed3c43064528f3409f0be286b62b9c3a47218.tar.gz
qemu-a75ed3c43064528f3409f0be286b62b9c3a47218.tar.bz2
hw/arm/omap: Drop useless casts from void * to pointer
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230109140306.23161-4-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/timer')
-rw-r--r--hw/timer/omap_gptimer.c22
-rw-r--r--hw/timer/omap_synctimer.c4
2 files changed, 12 insertions, 14 deletions
diff --git a/hw/timer/omap_gptimer.c b/hw/timer/omap_gptimer.c
index c407190..34e6af7 100644
--- a/hw/timer/omap_gptimer.c
+++ b/hw/timer/omap_gptimer.c
@@ -159,7 +159,7 @@ static inline void omap_gp_timer_trigger(struct omap_gp_timer_s *timer)
static void omap_gp_timer_tick(void *opaque)
{
- struct omap_gp_timer_s *timer = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *timer = opaque;
if (!timer->ar) {
timer->st = 0;
@@ -179,7 +179,7 @@ static void omap_gp_timer_tick(void *opaque)
static void omap_gp_timer_match(void *opaque)
{
- struct omap_gp_timer_s *timer = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *timer = opaque;
if (timer->trigger == gpt_trigger_both)
omap_gp_timer_trigger(timer);
@@ -189,7 +189,7 @@ static void omap_gp_timer_match(void *opaque)
static void omap_gp_timer_input(void *opaque, int line, int on)
{
- struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *s = opaque;
int trigger;
switch (s->capture) {
@@ -219,7 +219,7 @@ static void omap_gp_timer_input(void *opaque, int line, int on)
static void omap_gp_timer_clk_update(void *opaque, int line, int on)
{
- struct omap_gp_timer_s *timer = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *timer = opaque;
omap_gp_timer_sync(timer);
timer->rate = on ? omap_clk_getrate(timer->clk) : 0;
@@ -262,7 +262,7 @@ void omap_gp_timer_reset(struct omap_gp_timer_s *s)
static uint32_t omap_gp_timer_readw(void *opaque, hwaddr addr)
{
- struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *s = opaque;
switch (addr) {
case 0x00: /* TIDR */
@@ -328,7 +328,7 @@ static uint32_t omap_gp_timer_readw(void *opaque, hwaddr addr)
static uint32_t omap_gp_timer_readh(void *opaque, hwaddr addr)
{
- struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *s = opaque;
uint32_t ret;
if (addr & 2)
@@ -340,10 +340,9 @@ static uint32_t omap_gp_timer_readh(void *opaque, hwaddr addr)
}
}
-static void omap_gp_timer_write(void *opaque, hwaddr addr,
- uint32_t value)
+static void omap_gp_timer_write(void *opaque, hwaddr addr, uint32_t value)
{
- struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *s = opaque;
switch (addr) {
case 0x00: /* TIDR */
@@ -440,10 +439,9 @@ static void omap_gp_timer_write(void *opaque, hwaddr addr,
}
}
-static void omap_gp_timer_writeh(void *opaque, hwaddr addr,
- uint32_t value)
+static void omap_gp_timer_writeh(void *opaque, hwaddr addr, uint32_t value)
{
- struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) opaque;
+ struct omap_gp_timer_s *s = opaque;
if (addr & 2)
omap_gp_timer_write(opaque, addr, (value << 16) | s->writeh);
diff --git a/hw/timer/omap_synctimer.c b/hw/timer/omap_synctimer.c
index 72b9979..d93a934 100644
--- a/hw/timer/omap_synctimer.c
+++ b/hw/timer/omap_synctimer.c
@@ -39,7 +39,7 @@ void omap_synctimer_reset(struct omap_synctimer_s *s)
static uint32_t omap_synctimer_readw(void *opaque, hwaddr addr)
{
- struct omap_synctimer_s *s = (struct omap_synctimer_s *) opaque;
+ struct omap_synctimer_s *s = opaque;
switch (addr) {
case 0x00: /* 32KSYNCNT_REV */
@@ -55,7 +55,7 @@ static uint32_t omap_synctimer_readw(void *opaque, hwaddr addr)
static uint32_t omap_synctimer_readh(void *opaque, hwaddr addr)
{
- struct omap_synctimer_s *s = (struct omap_synctimer_s *) opaque;
+ struct omap_synctimer_s *s = opaque;
uint32_t ret;
if (addr & 2)