From 4198fa1db7297d8385bb6624d4bd475870e5bf12 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Fri, 25 Nov 2022 14:34:52 +0100 Subject: [PATCH] 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 --- drivers/st/clk/clk-stm32mp13.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5