From: Yann Gautier Date: Fri, 25 Nov 2022 13:34:52 +0000 (+0100) Subject: fix(st-clock): avoid arithmetics on pointers X-Git-Tag: baikal/aarch64/sdk5.10~1^2~312^2 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=4198fa1db7297d8385bb6624d4bd475870e5bf12;p=arm-tf.git fix(st-clock): avoid arithmetics on pointers This corrects MISRA C2012-18.4: The +, -, += and -= operators should not be applied to an expression of pointer type. Signed-off-by: Yann Gautier Change-Id: I9128f567a7c83d8e3381428b07e6bd785be2703b --- diff --git a/drivers/st/clk/clk-stm32mp13.c b/drivers/st/clk/clk-stm32mp13.c index faccfd4ea..db427ad6f 100644 --- a/drivers/st/clk/clk-stm32mp13.c +++ b/drivers/st/clk/clk-stm32mp13.c @@ -2242,7 +2242,7 @@ static int stm32_clk_parse_fdt_all_pll(void *fdt, int node, struct stm32_clk_pla size_t i = 0U; for (i = _PLL1; i < pdata->npll; i++) { - struct stm32_pll_dt_cfg *pll = pdata->pll + i; + struct stm32_pll_dt_cfg *pll = &pdata->pll[i]; char name[RCC_PLL_NAME_SIZE]; int subnode = 0; int err = 0;