diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2021-10-29 23:02:09 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-10-30 18:39:37 +0200 |
commit | 92d1d3ada11dfb338bb96b6405d6938901182488 (patch) | |
tree | 49adccfcf8830b3ab3acf24423664e00d5f97fd4 /hw/intc | |
parent | 81d18cd48a87205bed159586fd3ca524a36bd49a (diff) | |
download | qemu-92d1d3ada11dfb338bb96b6405d6938901182488.zip qemu-92d1d3ada11dfb338bb96b6405d6938901182488.tar.gz qemu-92d1d3ada11dfb338bb96b6405d6938901182488.tar.bz2 |
hw/intc/sh_intc: Drop another useless macro
The INT_REG_PARAMS macro was only used a few times within one function
on adjacent lines and is actually more complex than writing out the
parameters so simplify it by expanding the macro at call sites and
dropping the #define.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <d3bdfdc5ab5ae1c51a6c6c38bde3829a99f85ce5.1635541329.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/sh_intc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c index 175d12b..b908be0 100644 --- a/hw/intc/sh_intc.c +++ b/hw/intc/sh_intc.c @@ -432,16 +432,12 @@ int sh_intc_init(MemoryRegion *sysmem, memory_region_init_io(&desc->iomem, NULL, &sh_intc_ops, desc, "intc", 0x100000000ULL); -#define INT_REG_PARAMS(reg_struct, type, action, j) \ - reg_struct->action##_reg, #type, #action, j if (desc->mask_regs) { for (i = 0; i < desc->nr_mask_regs; i++) { struct intc_mask_reg *mr = desc->mask_regs + i; - j += sh_intc_register(sysmem, desc, - INT_REG_PARAMS(mr, mask, set, j)); - j += sh_intc_register(sysmem, desc, - INT_REG_PARAMS(mr, mask, clr, j)); + j += sh_intc_register(sysmem, desc, mr->set_reg, "mask", "set", j); + j += sh_intc_register(sysmem, desc, mr->clr_reg, "mask", "clr", j); } } @@ -449,13 +445,10 @@ int sh_intc_init(MemoryRegion *sysmem, for (i = 0; i < desc->nr_prio_regs; i++) { struct intc_prio_reg *pr = desc->prio_regs + i; - j += sh_intc_register(sysmem, desc, - INT_REG_PARAMS(pr, prio, set, j)); - j += sh_intc_register(sysmem, desc, - INT_REG_PARAMS(pr, prio, clr, j)); + j += sh_intc_register(sysmem, desc, pr->set_reg, "prio", "set", j); + j += sh_intc_register(sysmem, desc, pr->clr_reg, "prio", "clr", j); } } -#undef INT_REG_PARAMS return 0; } |