diff options
author | Yann Gautier <yann.gautier@st.com> | 2022-11-25 16:25:46 +0100 |
---|---|---|
committer | Yann Gautier <yann.gautier@st.com> | 2022-12-07 14:18:31 +0100 |
commit | 91af163cbbfab936e70568998e8b9dcb10203b8e (patch) | |
tree | 6e877a4b21a5f2fce38db101a98b3c5203fce807 /drivers/st | |
parent | 6a3ffb53910f136d14ddad5042da01a03e5087c4 (diff) | |
download | arm-trusted-firmware-91af163cbbfab936e70568998e8b9dcb10203b8e.tar.gz |
fix(st-regulator): enclose macro parameters in parentheses
This corrects MISRA C2012-20.7:
Expressions resulting from the expansion of macro parameters shall be
enclosed in parentheses.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I9989a5aaacf17f6f7a65381c8d41f21a35f6ddd9
Diffstat (limited to 'drivers/st')
-rw-r--r-- | drivers/st/regulator/regulator_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/st/regulator/regulator_core.c b/drivers/st/regulator/regulator_core.c index d65d501b2..f15e22ac0 100644 --- a/drivers/st/regulator/regulator_core.c +++ b/drivers/st/regulator/regulator_core.c @@ -22,11 +22,11 @@ CASSERT(PLAT_NB_RDEVS >= 1U, plat_nb_rdevs_must_be_higher); static struct rdev rdev_array[PLAT_NB_RDEVS]; #define for_each_rdev(rdev) \ - for (rdev = rdev_array; rdev <= &rdev_array[PLAT_NB_RDEVS - 1U]; rdev++) + for ((rdev) = rdev_array; (rdev) <= &rdev_array[PLAT_NB_RDEVS - 1U]; (rdev)++) #define for_each_registered_rdev(rdev) \ - for (rdev = rdev_array; \ - (rdev <= &rdev_array[PLAT_NB_RDEVS - 1U]) && (rdev->desc != NULL); rdev++) + for ((rdev) = rdev_array; \ + ((rdev) <= &rdev_array[PLAT_NB_RDEVS - 1U]) && ((rdev)->desc != NULL); (rdev)++) static void lock_driver(const struct rdev *rdev) { |