Re: [PATCH v2 1/8] pinctrl: stm32: fix debug print of uninitialized variable

2019-10-28 Thread Sascha Hauer
On Mon, Oct 28, 2019 at 12:18:25AM +0100, Ahmad Fatoum wrote:
> mode and alt are printed with the dev_dbg before they are initialized.
> Remedy this by moving the dev_dbg after them.
> 
> Signed-off-by: Ahmad Fatoum 
> ---
>  drivers/pinctrl/pinctrl-stm32.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied all except 7/8, thanks

Sascha


-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH v2 1/8] pinctrl: stm32: fix debug print of uninitialized variable

2019-10-27 Thread Ahmad Fatoum
mode and alt are printed with the dev_dbg before they are initialized.
Remedy this by moving the dev_dbg after them.

Signed-off-by: Ahmad Fatoum 
---
 drivers/pinctrl/pinctrl-stm32.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-stm32.c b/drivers/pinctrl/pinctrl-stm32.c
index 7f04cea50b75..ab121998a37f 100644
--- a/drivers/pinctrl/pinctrl-stm32.c
+++ b/drivers/pinctrl/pinctrl-stm32.c
@@ -157,13 +157,13 @@ static int stm32_pinctrl_set_state(struct pinctrl_device 
*pdev, struct device_no
if (offset < 0)
return -ENODEV;
 
+   mode = stm32_gpio_get_mode(func);
+   alt = stm32_gpio_get_alt(func);
+
dev_dbg(pdev->dev, "configuring port %s pin %u 
with:\n\t"
"fn %u, mode %u, alt %u\n",
bank->name, offset, func, mode, alt);
 
-   mode = stm32_gpio_get_mode(func);
-   alt = stm32_gpio_get_alt(func);
-
clk_enable(bank->clk);
 
__stm32_pmx_set_mode(bank->base, offset, mode, alt);
-- 
2.23.0


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox