pinctrl: imx8ulp: Initialize pin_reg
Subsystems (4)
Fabio Estevam
maintainerPATCH 1/1 pinctrl: imx8ulp: Initialize pin_reg
The initialization of pin_reg is missing, causing the following build warning:
drivers/pinctrl/freescale/pinctrl-imx8ulp.c:228:35: warning: 'pin_reg' is used uninitialized in this function [-Wuninitialized]
Initialize pin_reg the same way as it is done on vf610 and imx7ulp to fix the problem.
--- drivers/pinctrl/freescale/pinctrl-imx8ulp.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/pinctrl/freescale/pinctrl-imx8ulp.c +4 -0
@@ -225,6 +225,10 @@ static int imx8ulp_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,const struct imx_pin_reg *pin_reg;u32 reg; + pin_reg = &ipctl->pin_regs[offset]; +if (pin_reg->mux_reg ==-1 ) +return -EINVAL ; + reg =readl (ipctl->base + pin_reg->mux_reg);if (input) reg = (reg & ~BM_OBE_ENABLED ) |BM_IBE_ENABLED ;
Signature · 1 line
2.25.1
Quoted 11 lines · Fabio Estevam
The initialization of
pin_regis missing, causing the following build warning:
drivers/pinctrl/freescale/pinctrl-imx8ulp.c:228:35: warning: 'pin_reg' is used uninitialized in this function [-Wuninitialized]Initialize
pin_regthe same way as it is done on vf610 and imx7ulp to fix the problem.Fixes 16b343e8e0ef ("pinctrl: imx8ulp: Add pinctrl driver support")Reported-by kernel test robot <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Wow how fast!
Patch applied.
Thanks for fixing Fabio, excellent work as always.
Yours,
Linus Walleij
Jacky Bai
maintainerQuoted 14 lines
Subject: Re: [PATCH] pinctrl: imx8ulp: Initialize
pin_regQuoted 9 lines · Fabio Estevam
The initialization of
pin_regis missing, causing the following build warning:
drivers/pinctrl/freescale/pinctrl-imx8ulp.c:228:35: warning: 'pin_reg' is used uninitialized in this function [-Wuninitialized]Initialize
pin_regthe same way as it is done on vf610 and imx7ulp to fix the problem.
Quoted 8 lines
Quoted 3 lines
Fixes 16b343e8e0ef ("pinctrl: imx8ulp: Add pinctrl driver support")Reported-by kernel test robot <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Wow how fast!
Patch applied.
Thanks for fixing Fabio, excellent work as always.
It's my fault. when I did a change in V2, one additional line was removed wrongly, sorry for inconvenience.
BR
Jacky Bai
Quoted 2 lines
Yours,
Linus Walleij