git: 0086da9f499c - stable/13 - Add brackets around GICv3 redistributor macros

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 25 Sep 2023 11:00:55 UTC
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=0086da9f499c4b0b453e2883b9380094327523c2

commit 0086da9f499c4b0b453e2883b9380094327523c2
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-05-25 08:35:14 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-09-25 08:41:16 +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
    
    (cherry picked from commit 8b709c88e56dc7e035be6744572bd2978a704338)
---
 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 fe63934dca4d..d423e51453dc 100644
--- a/sys/arm64/arm64/gic_v3_var.h
+++ b/sys/arm64/arm64/gic_v3_var.h
@@ -131,8 +131,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)		\
@@ -140,8 +140,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_ */