Skip to content

Commit

Permalink
fix build warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Hake Huang <[email protected]>
  • Loading branch information
hakehuang committed Sep 26, 2023
1 parent dadef35 commit a6202c5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hw/adc/rt_lpadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,13 @@ static uint64_t rt_lpadc_read(void *opaque, hwaddr offset,
value = s->CV[(offset - 0x200)/4];
break;
case 0x300 ... 0x304:
int reg_id = (offset - 0x300)/4;
if (!fifo32_is_empty(&s->RESFIFO[reg_id]))
{
value = fifo32_pop(&s->RESFIFO[reg_id]);
s->FCTRL[reg_id] |= fifo32_num_used(&s->RESFIFO[reg_id]);
int reg_id = (offset - 0x300)/4;
if (!fifo32_is_empty(&s->RESFIFO[reg_id]))
{
value = fifo32_pop(&s->RESFIFO[reg_id]);
s->FCTRL[reg_id] |= fifo32_num_used(&s->RESFIFO[reg_id]);
}
}
break;
}
Expand Down
4 changes: 4 additions & 0 deletions hw/misc/rt_clkctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ static uint64_t rt_clkctl0_read(void *opaque, hwaddr offset, unsigned size)
value = s->DCPIXELCLKDIV & (~0xE0000000);
break;
default:
break;
}

return value;
Expand Down Expand Up @@ -441,6 +442,7 @@ static void rt_clkctl0_write(void *opaque, hwaddr offset, uint64_t value,
s->DCPIXELCLKDIV = v32;
break;
default:
break;
}

return;
Expand Down Expand Up @@ -932,6 +934,7 @@ static uint64_t rt_clkctl1_read(void *opaque, hwaddr offset, unsigned size)
value = s->ACMP0FCLKDIV & (~0xE0000000);
break;
default:
break;
}

return value;
Expand Down Expand Up @@ -1239,6 +1242,7 @@ static void rt_clkctl1_write(void *opaque, hwaddr offset, uint64_t value,
s->ACMP0FCLKDIV = v32;
break;
default:
break;
}

return;
Expand Down
2 changes: 2 additions & 0 deletions hw/misc/rt_pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static uint64_t rt_pmc_read(void *opaque, hwaddr offset, unsigned size)
value = s->TSENSOR;
break;
default:
break;
}

return value;
Expand Down Expand Up @@ -111,6 +112,7 @@ static void rt_pmc_write(void *opaque, hwaddr offset, uint64_t value,
s->TSENSOR = v32;
break;
default:
break;
}

return;
Expand Down
2 changes: 2 additions & 0 deletions hw/misc/rt_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static uint64_t rt_sysctl0_read(void *opaque, hwaddr offset, unsigned size)

switch(offset) {
default:
break;
}

return s->reg[offset / 4];
Expand Down Expand Up @@ -108,6 +109,7 @@ static uint64_t rt_sysctl1_read(void *opaque, hwaddr offset, unsigned size)

switch(offset) {
default:
break;
}

return s->reg[offset / 4];
Expand Down

0 comments on commit a6202c5

Please sign in to comment.