* [PATCH] pinctrl: imx8ulp: Initialize pin_reg
@ 2021-07-23 20:32 Fabio Estevam
2021-07-23 20:53 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2021-07-23 20:32 UTC (permalink / raw)
To: linus.walleij
Cc: shawnguo, s.hauer, linux-gpio, linux-imx, Fabio Estevam,
kernel test robot
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.
Fixes: 16b343e8e0ef ("pinctrl: imx8ulp: Add pinctrl driver support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/pinctrl/freescale/pinctrl-imx8ulp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx8ulp.c b/drivers/pinctrl/freescale/pinctrl-imx8ulp.c
index c5db5dfcfcce..f8572597a54e 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx8ulp.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx8ulp.c
@@ -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;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: imx8ulp: Initialize pin_reg
2021-07-23 20:32 [PATCH] pinctrl: imx8ulp: Initialize pin_reg Fabio Estevam
@ 2021-07-23 20:53 ` Linus Walleij
2021-07-26 1:59 ` Jacky Bai
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2021-07-23 20:53 UTC (permalink / raw)
To: Fabio Estevam
Cc: Shawn Guo, Sascha Hauer, open list:GPIO SUBSYSTEM,
NXP Linux Team, kernel test robot
On Fri, Jul 23, 2021 at 10:33 PM Fabio Estevam <festevam@gmail.com> wrote:
> 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.
>
> Fixes: 16b343e8e0ef ("pinctrl: imx8ulp: Add pinctrl driver support")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Wow how fast!
Patch applied.
Thanks for fixing Fabio, excellent work as always.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] pinctrl: imx8ulp: Initialize pin_reg
2021-07-23 20:53 ` Linus Walleij
@ 2021-07-26 1:59 ` Jacky Bai
0 siblings, 0 replies; 3+ messages in thread
From: Jacky Bai @ 2021-07-26 1:59 UTC (permalink / raw)
To: Linus Walleij, Fabio Estevam
Cc: Shawn Guo, Sascha Hauer, open list:GPIO SUBSYSTEM, dl-linux-imx,
kernel test robot
> Subject: Re: [PATCH] pinctrl: imx8ulp: Initialize pin_reg
>
> On Fri, Jul 23, 2021 at 10:33 PM Fabio Estevam <festevam@gmail.com>
> wrote:
>
> > 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.
> >
> > Fixes: 16b343e8e0ef ("pinctrl: imx8ulp: Add pinctrl driver support")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>
>
> 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
> Yours,
> Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-26 1:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 20:32 [PATCH] pinctrl: imx8ulp: Initialize pin_reg Fabio Estevam
2021-07-23 20:53 ` Linus Walleij
2021-07-26 1:59 ` Jacky Bai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.