From: Roland Hieber <r.hieber@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Roland Hieber <rohieb@rohieb.name>
Subject: [PATCH 1/4] pinctrl: imx-iomux-v3: fix compiler warning
Date: Sun, 2 Sep 2018 23:21:20 +0200 [thread overview]
Message-ID: <20180902212123.16405-2-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20180902212123.16405-1-r.hieber@pengutronix.de>
From: Roland Hieber <rohieb@rohieb.name>
Fix a warning while compiling with GCC 5.4.0 (OSELAS.Toolchain 2016.02):
drivers/pinctrl/imx-iomux-v3.c: In function 'imx_iomux_v3_set_state':
drivers/pinctrl/imx-iomux-v3.c:153:13: warning: 'share_conf_val' may be used uninitialized in this function [-Wmaybe-uninitialized]
conf_val &= ~IMX_PAD_SION;
^
The relevant code section at line 153 is:
148: u32 conf_val = share_conf ?
149: share_conf_val : be32_to_cpu(*list++);
150:
151: if (conf_val & IMX_PAD_SION) {
152: mux_val |= IOMUXC_CONFIG_SION;
153: conf_val &= ~IMX_PAD_SION;
154: }
share_conf_val is only initialized in an if branch above that section.
Signed-off-by: Roland Hieber <rohieb@rohieb.name>
---
drivers/pinctrl/imx-iomux-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/imx-iomux-v3.c b/drivers/pinctrl/imx-iomux-v3.c
index d176199c52..0ab97040e0 100644
--- a/drivers/pinctrl/imx-iomux-v3.c
+++ b/drivers/pinctrl/imx-iomux-v3.c
@@ -87,7 +87,7 @@ static int imx_iomux_v3_set_state(struct pinctrl_device *pdev, struct device_nod
const bool share_conf = iomux->flags & SHARE_CONF;
int npins, size, i, fsl_pin_size;
const char *name;
- u32 share_conf_val;
+ u32 share_conf_val = 0;
dev_dbg(iomux->pinctrl.dev, "set state: %s\n", np->full_name);
--
2.18.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-09-02 21:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-02 21:21 [PATCH 0/4] Kindle i.MX50 improvements Roland Hieber
2018-09-02 21:21 ` Roland Hieber [this message]
2018-09-03 4:46 ` [PATCH 1/4] pinctrl: imx-iomux-v3: fix compiler warning Sam Ravnborg
2018-09-03 13:50 ` Roland Hieber
2018-09-03 20:14 ` Sam Ravnborg
2018-09-04 6:46 ` Sascha Hauer
2018-09-02 21:21 ` [PATCH 2/4] ARM: i.MX: Kindle 4/5 is based on Device Tree, select it in Kconfig Roland Hieber
2018-09-02 21:21 ` [PATCH 3/4] ARM: i.MX: add defconfig for the Kindle i.MX50 boards Roland Hieber
2018-09-02 21:21 ` [PATCH 4/4] Documentation: i.MX: update Kindle 4/5 board documentation Roland Hieber
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=20180902212123.16405-2-r.hieber@pengutronix.de \
--to=r.hieber@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=rohieb@rohieb.name \
/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