git: 8b709c88e56d - main - Add brackets around GICv3 redistributor macros
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 May 2023 10:02:18 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8b709c88e56dc7e035be6744572bd2978a704338 commit 8b709c88e56dc7e035be6744572bd2978a704338 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-05-25 08:35:14 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2023-05-25 08:50:34 +0000 Add brackets around GICv3 redistributor macros The GICv3 redistributor register access macros take arguments that are used as variables. Add brackets around them as is the style, and for safety. Sponsored by: Arm Ltd --- sys/arm64/arm64/gic_v3_var.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h index 61c3ff0b61ae..9fa8b82e16bc 100644 --- a/sys/arm64/arm64/gic_v3_var.h +++ b/sys/arm64/arm64/gic_v3_var.h @@ -137,8 +137,8 @@ void gic_r_write_8(device_t, bus_size_t, uint64_t var); u_int cpu = PCPU_GET(cpuid); \ \ bus_read_##len( \ - &sc->gic_redists.pcpu[cpu]->res, \ - reg); \ + &(sc)->gic_redists.pcpu[cpu]->res, \ + (reg)); \ }) #define gic_r_write(sc, len, reg, val) \ @@ -146,8 +146,8 @@ void gic_r_write_8(device_t, bus_size_t, uint64_t var); u_int cpu = PCPU_GET(cpuid); \ \ bus_write_##len( \ - &sc->gic_redists.pcpu[cpu]->res, \ - reg, val); \ + &(sc)->gic_redists.pcpu[cpu]->res, \ + (reg), (val)); \ }) #endif /* _GIC_V3_VAR_H_ */