mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 1/8] pinctrl: stm32: fix debug print of uninitialized variable
Date: Mon, 28 Oct 2019 00:18:25 +0100	[thread overview]
Message-ID: <20191027231832.10247-1-a.fatoum@pengutronix.de> (raw)

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 <a.fatoum@pengutronix.de>
---
 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

             reply	other threads:[~2019-10-27 23:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27 23:18 Ahmad Fatoum [this message]
2019-10-27 23:18 ` [PATCH v2 2/8] pinctrl: demote dev_info on successful probes to dev_dbg Ahmad Fatoum
2019-10-27 23:18 ` [PATCH v2 3/8] pinctrl: stm32: parse pinctrl nodes without subnodes as well Ahmad Fatoum
2019-10-27 23:18 ` [PATCH v2 4/8] ARM: sm: document SMC/PSCI related options Ahmad Fatoum
2019-10-27 23:18 ` [PATCH v2 5/8] ARM: stm32mp: select ARM_SMCCC always Ahmad Fatoum
2019-10-27 23:18 ` [PATCH v2 6/8] nvmem: add read support for STM32MP1 bsec OTP Ahmad Fatoum
2019-10-27 23:18 ` [PATCH v2 7/8] ARM: stm32mp: dk2: add barebox SD-Card update handler Ahmad Fatoum
2019-10-28 11:31   ` Sascha Hauer
2019-10-28 17:32     ` Ahmad Fatoum
2019-10-27 23:18 ` [PATCH v2 8/8] ARM: stm32mp: implement SoC and boot source identification Ahmad Fatoum
2019-10-28 11:32 ` [PATCH v2 1/8] pinctrl: stm32: fix debug print of uninitialized variable Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191027231832.10247-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox