* [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1
@ 2019-06-21 13:26 Patrick Delaunay
2019-06-21 13:26 ` [U-Boot] [PATCH 02/20] board: " Patrick Delaunay
` (19 more replies)
0 siblings, 20 replies; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
arch/arm/mach-stm32mp/cpu.c:378:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
if (instance > ARRAY_SIZE(serial_addr))
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
arch/arm/mach-stm32mp/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index e1a0a13..1fce78e 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -366,7 +366,7 @@ static void setup_boot_mode(void)
u32 boot_ctx = readl(TAMP_BOOT_CONTEXT);
u32 boot_mode =
(boot_ctx & TAMP_BOOT_MODE_MASK) >> TAMP_BOOT_MODE_SHIFT;
- int instance = (boot_mode & TAMP_BOOT_INSTANCE_MASK) - 1;
+ unsigned int instance = (boot_mode & TAMP_BOOT_INSTANCE_MASK) - 1;
u32 forced_mode = (boot_ctx & TAMP_BOOT_FORCED_MASK);
struct udevice *dev;
int alias;
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 02/20] board: stm32mp1: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 03/20] serial: stm32: " Patrick Delaunay
` (18 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
warning: no previous prototype for 'board_quiesce_devices' [-Wmissing-prototypes]
void board_quiesce_devices(void)
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
board/st/stm32mp1/stm32mp1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 7769293..0893261 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <adc.h>
+#include <bootm.h>
#include <config.h>
#include <clk.h>
#include <dm.h>
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 03/20] serial: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
2019-06-21 13:26 ` [U-Boot] [PATCH 02/20] board: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 04/20] mmc: stm32_sdmmc2: avoid warnings when building with W=1 option Patrick Delaunay
` (17 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/serial/serial_stm32.c: In function 'stm32_serial_probe':
warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (plat->clock_rate < 0) {
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/serial/serial_stm32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index cca8b70..3ab536a 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -195,9 +195,9 @@ static int stm32_serial_probe(struct udevice *dev)
}
plat->clock_rate = clk_get_rate(&clk);
- if (plat->clock_rate < 0) {
+ if (!plat->clock_rate) {
clk_disable(&clk);
- return plat->clock_rate;
+ return -EINVAL;
};
_stm32_serial_init(plat->base, plat->uart_info);
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 04/20] mmc: stm32_sdmmc2: avoid warnings when building with W=1 option
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
2019-06-21 13:26 ` [U-Boot] [PATCH 02/20] board: " Patrick Delaunay
2019-06-21 13:26 ` [U-Boot] [PATCH 03/20] serial: stm32: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 05/20] stm32mp1: bsec: Fix warnings when compiling with W=1 Patrick Delaunay
` (16 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves warnings detected by setting W=1 when building.
Warnings type detected:
- [-Wmissing-prototypes]
- [-Wimplicit-fallthrough=]
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/mmc/stm32_sdmmc2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index ed31ca1..867ed56 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -669,6 +669,7 @@ static int stm32_sdmmc2_probe(struct udevice *dev)
switch (dev_read_u32_default(dev, "bus-width", 1)) {
case 8:
cfg->host_caps |= MMC_MODE_8BIT;
+ /* fall through */
case 4:
cfg->host_caps |= MMC_MODE_4BIT;
break;
@@ -692,7 +693,7 @@ clk_free:
return ret;
}
-int stm32_sdmmc_bind(struct udevice *dev)
+static int stm32_sdmmc_bind(struct udevice *dev)
{
struct stm32_sdmmc2_plat *plat = dev_get_platdata(dev);
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 05/20] stm32mp1: bsec: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (2 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 04/20] mmc: stm32_sdmmc2: avoid warnings when building with W=1 option Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 06/20] adc: stm32-adc: " Patrick Delaunay
` (15 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
arch/arm/mach-stm32mp/bsec.c: In function 'stm32mp_bsec_read':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (offset >= STM32_BSEC_OTP_OFFSET) {
^~
arch/arm/mach-stm32mp/bsec.c: In function 'stm32mp_bsec_write':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (offset >= STM32_BSEC_OTP_OFFSET) {
^~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
arch/arm/mach-stm32mp/bsec.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 0166649..8018366 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -358,12 +358,13 @@ static int stm32mp_bsec_read(struct udevice *dev, int offset,
bool shadow = true;
int nb_otp = size / sizeof(u32);
int otp;
+ unsigned int offs = offset;
- if (offset >= STM32_BSEC_OTP_OFFSET) {
- offset -= STM32_BSEC_OTP_OFFSET;
+ if (offs >= STM32_BSEC_OTP_OFFSET) {
+ offs -= STM32_BSEC_OTP_OFFSET;
shadow = false;
}
- otp = offset / sizeof(u32);
+ otp = offs / sizeof(u32);
if (otp < 0 || (otp + nb_otp - 1) > BSEC_OTP_MAX_VALUE) {
dev_err(dev, "wrong value for otp, max value : %i\n",
@@ -393,12 +394,13 @@ static int stm32mp_bsec_write(struct udevice *dev, int offset,
bool shadow = true;
int nb_otp = size / sizeof(u32);
int otp;
+ unsigned int offs = offset;
- if (offset >= STM32_BSEC_OTP_OFFSET) {
- offset -= STM32_BSEC_OTP_OFFSET;
+ if (offs >= STM32_BSEC_OTP_OFFSET) {
+ offs -= STM32_BSEC_OTP_OFFSET;
shadow = false;
}
- otp = offset / sizeof(u32);
+ otp = offs / sizeof(u32);
if (otp < 0 || (otp + nb_otp - 1) > BSEC_OTP_MAX_VALUE) {
dev_err(dev, "wrong value for otp, max value : %d\n",
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 06/20] adc: stm32-adc: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (3 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 05/20] stm32mp1: bsec: Fix warnings when compiling with W=1 Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-06-21 13:40 ` Fabrice Gasnier
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 07/20] adc: stm32: " Patrick Delaunay
` (14 subsequent siblings)
19 siblings, 2 replies; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/adc/stm32-adc.c: In function 'stm32_adc_chan_of_init':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (num_channels > adc->cfg->max_channels) {
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/adc/stm32-adc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index e108062..029338e 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -163,15 +163,16 @@ static int stm32_adc_chan_of_init(struct udevice *dev)
struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
struct stm32_adc *adc = dev_get_priv(dev);
u32 chans[STM32_ADC_CH_MAX];
- int i, num_channels, ret;
+ unsigned int i, num_channels;
+ int ret;
/* Retrieve single ended channels listed in device tree */
- num_channels = dev_read_size(dev, "st,adc-channels");
- if (num_channels < 0) {
- dev_err(dev, "can't get st,adc-channels: %d\n", num_channels);
- return num_channels;
+ ret = dev_read_size(dev, "st,adc-channels");
+ if (ret < 0) {
+ dev_err(dev, "can't get st,adc-channels: %d\n", ret);
+ return ret;
}
- num_channels /= sizeof(u32);
+ num_channels = ret / sizeof(u32);
if (num_channels > adc->cfg->max_channels) {
dev_err(dev, "too many st,adc-channels: %d\n", num_channels);
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 07/20] adc: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (4 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 06/20] adc: stm32-adc: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-06-21 13:41 ` Fabrice Gasnier
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 08/20] gpio: stm32_gpio: " Patrick Delaunay
` (13 subsequent siblings)
19 siblings, 2 replies; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/adc/stm32-adc-core.c: In function 'stm32h7_adc_clk_sel':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
^
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/adc/stm32-adc-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index a9aa143..04b6a8a 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -60,7 +60,8 @@ static int stm32h7_adc_clk_sel(struct udevice *dev,
{
u32 ckmode, presc;
unsigned long rate;
- int i, div;
+ unsigned int i;
+ int div;
/* stm32h7 bus clock is common for all ADC instances (mandatory) */
if (!clk_valid(&common->bclk)) {
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 08/20] gpio: stm32_gpio: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (5 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 07/20] adc: stm32: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 09/20] i2c: stm32f7_i2c: " Patrick Delaunay
` (12 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/gpio/stm32_gpio.c: In function 'stm32_offset_to_index':
: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (idx == offset)
^~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/gpio/stm32f7_gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/stm32f7_gpio.c b/drivers/gpio/stm32f7_gpio.c
index 5c9f2fe..e89707c 100644
--- a/drivers/gpio/stm32f7_gpio.c
+++ b/drivers/gpio/stm32f7_gpio.c
@@ -27,7 +27,7 @@
int stm32_offset_to_index(struct udevice *dev, unsigned int offset)
{
struct stm32_gpio_priv *priv = dev_get_priv(dev);
- int idx = 0;
+ unsigned int idx = 0;
int i;
for (i = 0; i < STM32_GPIOS_PER_BANK; i++) {
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 09/20] i2c: stm32f7_i2c: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (6 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 08/20] gpio: stm32_gpio: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 10/20] clk: clk_stm32mp1: " Patrick Delaunay
` (11 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_compute_solutions':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (scldel < scldel_min)
^
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (((sdadel >= sdadel_min) &&
^~
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(sdadel <= sdadel_max)) &&
^~
drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_choose_solution':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (clk_error < clk_error_prev) {
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/i2c/stm32f7_i2c.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 50c4fd0..2b18735 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -519,13 +519,13 @@ static int stm32_i2c_compute_solutions(struct stm32_i2c_setup *setup,
/* Compute possible values for PRESC, SCLDEL and SDADEL */
for (p = 0; p < STM32_PRESC_MAX; p++) {
for (l = 0; l < STM32_SCLDEL_MAX; l++) {
- u32 scldel = (l + 1) * (p + 1) * i2cclk;
+ int scldel = (l + 1) * (p + 1) * i2cclk;
if (scldel < scldel_min)
continue;
for (a = 0; a < STM32_SDADEL_MAX; a++) {
- u32 sdadel = (a * (p + 1) + 1) * i2cclk;
+ int sdadel = (a * (p + 1) + 1) * i2cclk;
if (((sdadel >= sdadel_min) &&
(sdadel <= sdadel_max)) &&
@@ -613,10 +613,12 @@ static int stm32_i2c_choose_solution(struct stm32_i2c_setup *setup,
if ((tscl >= clk_min) && (tscl <= clk_max) &&
(tscl_h >= i2c_specs[setup->speed].h_min) &&
(i2cclk < tscl_h)) {
- int clk_error = tscl - i2cbus;
+ u32 clk_error;
- if (clk_error < 0)
- clk_error = -clk_error;
+ if (tscl > i2cbus)
+ clk_error = tscl - i2cbus;
+ else
+ clk_error = i2cbus - tscl;
if (clk_error < clk_error_prev) {
clk_error_prev = clk_error;
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 10/20] clk: clk_stm32mp1: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (7 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 09/20] i2c: stm32f7_i2c: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 11/20] power: regulator: stm32: " Patrick Delaunay
` (10 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/clk/clk_stm32mp1.c: In function 'stm32mp1_clk_get_parent':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++)
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/clk/clk_stm32mp1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index f295e48..fd4c5e2 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -805,10 +805,11 @@ static int stm32mp1_clk_get_parent(struct stm32mp1_clk_priv *priv,
const struct stm32mp1_clk_sel *sel = priv->data->sel;
int i;
int s, p;
+ unsigned int idx;
- for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++)
- if (stm32mp1_clks[i][0] == id)
- return stm32mp1_clks[i][1];
+ for (idx = 0; idx < ARRAY_SIZE(stm32mp1_clks); idx++)
+ if (stm32mp1_clks[idx][0] == id)
+ return stm32mp1_clks[idx][1];
i = stm32mp1_clk_get_id(priv, id);
if (i < 0)
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 11/20] power: regulator: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (8 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 10/20] clk: clk_stm32mp1: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 12/20] misc: stm32_fuse: " Patrick Delaunay
` (9 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/power/regulator/stm32-vrefbuf.c: In function 'stm32_vrefbuf_set_value':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (uV == stm32_vrefbuf_voltages[i]) {
^~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/power/regulator/stm32-vrefbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/regulator/stm32-vrefbuf.c b/drivers/power/regulator/stm32-vrefbuf.c
index 0ad6833..645528e 100644
--- a/drivers/power/regulator/stm32-vrefbuf.c
+++ b/drivers/power/regulator/stm32-vrefbuf.c
@@ -30,7 +30,7 @@ struct stm32_vrefbuf {
struct udevice *vdda_supply;
};
-static const unsigned int stm32_vrefbuf_voltages[] = {
+static const int stm32_vrefbuf_voltages[] = {
/* Matches resp. VRS = 000b, 001b, 010b, 011b */
2500000, 2048000, 1800000, 1500000,
};
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 12/20] misc: stm32_fuse: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (9 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 11/20] power: regulator: stm32: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 13/20] ram: stm32mp1_ram: " Patrick Delaunay
` (8 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
warning: no previous prototype for 'fuse_read' [-Wmissing-prototypes]
int fuse_read(u32 bank, u32 word, u32 *val)
^~~~~~~~~
CC cmd/sf.o
warning: no previous prototype for 'fuse_prog' [-Wmissing-prototypes]
int fuse_prog(u32 bank, u32 word, u32 val)
^~~~~~~~~
warning: no previous prototype for 'fuse_sense' [-Wmissing-prototypes]
int fuse_sense(u32 bank, u32 word, u32 *val)
^~~~~~~~~~
warning: no previous prototype for 'fuse_override' [-Wmissing-prototypes]
int fuse_override(u32 bank, u32 word, u32 val)
^~~~~~~~~~~~~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/misc/stm32mp_fuse.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/stm32mp_fuse.c b/drivers/misc/stm32mp_fuse.c
index 8dc246b..801d946 100644
--- a/drivers/misc/stm32mp_fuse.c
+++ b/drivers/misc/stm32mp_fuse.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <command.h>
+#include <fuse.h>
#include <misc.h>
#include <errno.h>
#include <dm/device.h>
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 13/20] ram: stm32mp1_ram: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (10 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 12/20] misc: stm32_fuse: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 14/20] pinctrl: pinctrl_stm32: " Patrick Delaunay
` (7 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_clk_enable':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) {
^
drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_setup':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (idx = 0; idx < ARRAY_SIZE(param); idx++) {
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/ram/stm32mp1/stm32mp1_ram.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 84e39d0..a362cf9 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -26,7 +26,7 @@ int stm32mp1_ddr_clk_enable(struct ddr_info *priv, uint32_t mem_speed)
unsigned long ddr_clk;
struct clk clk;
int ret;
- int idx;
+ unsigned int idx;
for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) {
ret = clk_get_by_name(priv->dev, clkname[idx], &clk);
@@ -59,7 +59,8 @@ int stm32mp1_ddr_clk_enable(struct ddr_info *priv, uint32_t mem_speed)
static __maybe_unused int stm32mp1_ddr_setup(struct udevice *dev)
{
struct ddr_info *priv = dev_get_priv(dev);
- int ret, idx;
+ int ret;
+ unsigned int idx;
struct clk axidcg;
struct stm32mp1_ddr_config config;
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 14/20] pinctrl: pinctrl_stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (11 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 13/20] ram: stm32mp1_ram: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 15/20] power: stpmic1: " Patrick Delaunay
` (6 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (*idx < 0)
^
drivers/pinctrl/pinctrl_stm32.c: At top level:
warning: no previous prototype for 'stm32_pinctrl_probe' [-Wmissing-prototypes]
int stm32_pinctrl_probe(struct udevice *dev)
^~~~~~~~~~~~~~~~~~~
Signed-off-by: Patrice CHOTARD <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/pinctrl/pinctrl_stm32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 43dbdd9..a59b8ca 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -136,7 +136,7 @@ static struct udevice *stm32_pinctrl_get_gpio_dev(struct udevice *dev,
*/
*idx = stm32_offset_to_index(gpio_bank->gpio_dev,
selector - pin_count);
- if (*idx < 0)
+ if (IS_ERR_VALUE(*idx))
return NULL;
return gpio_bank->gpio_dev;
@@ -215,7 +215,7 @@ static int stm32_pinctrl_get_pin_muxing(struct udevice *dev,
#endif
-int stm32_pinctrl_probe(struct udevice *dev)
+static int stm32_pinctrl_probe(struct udevice *dev)
{
struct stm32_pinctrl_priv *priv = dev_get_priv(dev);
int ret;
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 15/20] power: stpmic1: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (12 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 14/20] pinctrl: pinctrl_stm32: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 16/20] mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option Patrick Delaunay
` (5 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/power/regulator/stpmic1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c
index 50ef2a2..1e3f96f 100644
--- a/drivers/power/regulator/stpmic1.c
+++ b/drivers/power/regulator/stpmic1.c
@@ -422,6 +422,7 @@ static int stpmic1_ldo_set_mode(struct udevice *dev, int mode)
case STPMIC1_LDO_MODE_SINK_SOURCE:
ret &= ~STPMIC1_LDO12356_VOUT_MASK;
ret |= STPMIC1_LDO3_DDR_SEL << STPMIC1_LDO12356_VOUT_SHIFT;
+ /* fallthrough */
case STPMIC1_LDO_MODE_NORMAL:
ret &= ~STPMIC1_LDO3_MODE;
break;
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 16/20] mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (13 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 15/20] power: stpmic1: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 17/20] spi: stm32_qspi: " Patrick Delaunay
` (4 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves warnings detected by setting W=1 when building.
Warnings type detected:
- [-Wsign-compare]
- [-Wtype-limits]
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/mtd/nand/raw/stm32_fmc2_nand.c | 93 ++++++++++++----------------------
1 file changed, 31 insertions(+), 62 deletions(-)
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 2bb749d..f3179cc 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -627,21 +627,16 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
struct stm32_fmc2_timings *tims = &nand->timings;
unsigned long hclk = clk_get_rate(&fmc2->clk);
unsigned long hclkp = FMC2_NSEC_PER_SEC / (hclk / 1000);
- int tar, tclr, thiz, twait, tset_mem, tset_att, thold_mem, thold_att;
-
- tar = hclkp;
- if (tar < sdrt->tAR_min)
- tar = sdrt->tAR_min;
- tims->tar = DIV_ROUND_UP(tar, hclkp) - 1;
- if (tims->tar > FMC2_PCR_TIMING_MASK)
- tims->tar = FMC2_PCR_TIMING_MASK;
-
- tclr = hclkp;
- if (tclr < sdrt->tCLR_min)
- tclr = sdrt->tCLR_min;
- tims->tclr = DIV_ROUND_UP(tclr, hclkp) - 1;
- if (tims->tclr > FMC2_PCR_TIMING_MASK)
- tims->tclr = FMC2_PCR_TIMING_MASK;
+ unsigned long timing, tar, tclr, thiz, twait;
+ unsigned long tset_mem, tset_att, thold_mem, thold_att;
+
+ tar = max_t(unsigned long, hclkp, sdrt->tAR_min);
+ timing = DIV_ROUND_UP(tar, hclkp) - 1;
+ tims->tar = min_t(unsigned long, timing, FMC2_PCR_TIMING_MASK);
+
+ tclr = max_t(unsigned long, hclkp, sdrt->tCLR_min);
+ timing = DIV_ROUND_UP(tclr, hclkp) - 1;
+ tims->tclr = min_t(unsigned long, timing, FMC2_PCR_TIMING_MASK);
tims->thiz = FMC2_THIZ;
thiz = (tims->thiz + 1) * hclkp;
@@ -651,18 +646,11 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
* tWAIT > tWP
* tWAIT > tREA + tIO
*/
- twait = hclkp;
- if (twait < sdrt->tRP_min)
- twait = sdrt->tRP_min;
- if (twait < sdrt->tWP_min)
- twait = sdrt->tWP_min;
- if (twait < sdrt->tREA_max + FMC2_TIO)
- twait = sdrt->tREA_max + FMC2_TIO;
- tims->twait = DIV_ROUND_UP(twait, hclkp);
- if (tims->twait == 0)
- tims->twait = 1;
- else if (tims->twait > FMC2_PMEM_PATT_TIMING_MASK)
- tims->twait = FMC2_PMEM_PATT_TIMING_MASK;
+ twait = max_t(unsigned long, hclkp, sdrt->tRP_min);
+ twait = max_t(unsigned long, twait, sdrt->tWP_min);
+ twait = max_t(unsigned long, twait, sdrt->tREA_max + FMC2_TIO);
+ timing = DIV_ROUND_UP(twait, hclkp);
+ tims->twait = clamp_val(timing, 1, FMC2_PMEM_PATT_TIMING_MASK);
/*
* tSETUP_MEM > tCS - tWAIT
@@ -677,20 +665,15 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
if (twait > thiz && (sdrt->tDS_min > twait - thiz) &&
(tset_mem < sdrt->tDS_min - (twait - thiz)))
tset_mem = sdrt->tDS_min - (twait - thiz);
- tims->tset_mem = DIV_ROUND_UP(tset_mem, hclkp);
- if (tims->tset_mem == 0)
- tims->tset_mem = 1;
- else if (tims->tset_mem > FMC2_PMEM_PATT_TIMING_MASK)
- tims->tset_mem = FMC2_PMEM_PATT_TIMING_MASK;
+ timing = DIV_ROUND_UP(tset_mem, hclkp);
+ tims->tset_mem = clamp_val(timing, 1, FMC2_PMEM_PATT_TIMING_MASK);
/*
* tHOLD_MEM > tCH
* tHOLD_MEM > tREH - tSETUP_MEM
* tHOLD_MEM > max(tRC, tWC) - (tSETUP_MEM + tWAIT)
*/
- thold_mem = hclkp;
- if (thold_mem < sdrt->tCH_min)
- thold_mem = sdrt->tCH_min;
+ thold_mem = max_t(unsigned long, hclkp, sdrt->tCH_min);
if (sdrt->tREH_min > tset_mem &&
(thold_mem < sdrt->tREH_min - tset_mem))
thold_mem = sdrt->tREH_min - tset_mem;
@@ -700,11 +683,8 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
if ((sdrt->tWC_min > tset_mem + twait) &&
(thold_mem < sdrt->tWC_min - (tset_mem + twait)))
thold_mem = sdrt->tWC_min - (tset_mem + twait);
- tims->thold_mem = DIV_ROUND_UP(thold_mem, hclkp);
- if (tims->thold_mem == 0)
- tims->thold_mem = 1;
- else if (tims->thold_mem > FMC2_PMEM_PATT_TIMING_MASK)
- tims->thold_mem = FMC2_PMEM_PATT_TIMING_MASK;
+ timing = DIV_ROUND_UP(thold_mem, hclkp);
+ tims->thold_mem = clamp_val(timing, 1, FMC2_PMEM_PATT_TIMING_MASK);
/*
* tSETUP_ATT > tCS - tWAIT
@@ -726,11 +706,8 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
if (twait > thiz && (sdrt->tDS_min > twait - thiz) &&
(tset_att < sdrt->tDS_min - (twait - thiz)))
tset_att = sdrt->tDS_min - (twait - thiz);
- tims->tset_att = DIV_ROUND_UP(tset_att, hclkp);
- if (tims->tset_att == 0)
- tims->tset_att = 1;
- else if (tims->tset_att > FMC2_PMEM_PATT_TIMING_MASK)
- tims->tset_att = FMC2_PMEM_PATT_TIMING_MASK;
+ timing = DIV_ROUND_UP(tset_att, hclkp);
+ tims->tset_att = clamp_val(timing, 1, FMC2_PMEM_PATT_TIMING_MASK);
/*
* tHOLD_ATT > tALH
@@ -745,17 +722,11 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
* tHOLD_ATT > tRC - (tSETUP_ATT + tWAIT)
* tHOLD_ATT > tWC - (tSETUP_ATT + tWAIT)
*/
- thold_att = hclkp;
- if (thold_att < sdrt->tALH_min)
- thold_att = sdrt->tALH_min;
- if (thold_att < sdrt->tCH_min)
- thold_att = sdrt->tCH_min;
- if (thold_att < sdrt->tCLH_min)
- thold_att = sdrt->tCLH_min;
- if (thold_att < sdrt->tCOH_min)
- thold_att = sdrt->tCOH_min;
- if (thold_att < sdrt->tDH_min)
- thold_att = sdrt->tDH_min;
+ thold_att = max_t(unsigned long, hclkp, sdrt->tALH_min);
+ thold_att = max_t(unsigned long, thold_att, sdrt->tCH_min);
+ thold_att = max_t(unsigned long, thold_att, sdrt->tCLH_min);
+ thold_att = max_t(unsigned long, thold_att, sdrt->tCOH_min);
+ thold_att = max_t(unsigned long, thold_att, sdrt->tDH_min);
if ((sdrt->tWB_max + FMC2_TIO + FMC2_TSYNC > tset_mem) &&
(thold_att < sdrt->tWB_max + FMC2_TIO + FMC2_TSYNC - tset_mem))
thold_att = sdrt->tWB_max + FMC2_TIO + FMC2_TSYNC - tset_mem;
@@ -774,11 +745,8 @@ static void stm32_fmc2_calc_timings(struct nand_chip *chip,
if ((sdrt->tWC_min > tset_att + twait) &&
(thold_att < sdrt->tWC_min - (tset_att + twait)))
thold_att = sdrt->tWC_min - (tset_att + twait);
- tims->thold_att = DIV_ROUND_UP(thold_att, hclkp);
- if (tims->thold_att == 0)
- tims->thold_att = 1;
- else if (tims->thold_att > FMC2_PMEM_PATT_TIMING_MASK)
- tims->thold_att = FMC2_PMEM_PATT_TIMING_MASK;
+ timing = DIV_ROUND_UP(thold_att, hclkp);
+ tims->thold_att = clamp_val(timing, 1, FMC2_PMEM_PATT_TIMING_MASK);
}
static int stm32_fmc2_setup_interface(struct mtd_info *mtd, int chipnr,
@@ -932,7 +900,8 @@ static int stm32_fmc2_probe(struct udevice *dev)
struct nand_ecclayout *ecclayout;
struct resource resource;
struct reset_ctl reset;
- int oob_index, chip_cs, mem_region, ret, i;
+ int oob_index, chip_cs, mem_region, ret;
+ unsigned int i;
spin_lock_init(&fmc2->controller.lock);
init_waitqueue_head(&fmc2->controller.wq);
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 17/20] spi: stm32_qspi: avoid warnings when building with W=1 option
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (14 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 16/20] mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 18/20] cmd: pinmux: Fix warnings when compiling with W=1 Patrick Delaunay
` (3 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves warnings detected by setting W=1 when building.
Warnings type detected:
- [-Wtype-limits]
- [-Wsign-compare]
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/spi/stm32_qspi.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index bb1067f..8d612f2 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -361,9 +361,9 @@ static int stm32_qspi_probe(struct udevice *bus)
}
priv->clock_rate = clk_get_rate(&clk);
- if (priv->clock_rate < 0) {
+ if (!priv->clock_rate) {
clk_disable(&clk);
- return priv->clock_rate;
+ return -EINVAL;
}
ret = reset_get_by_index(bus, 0, &reset_ctl);
@@ -395,14 +395,15 @@ static int stm32_qspi_claim_bus(struct udevice *dev)
{
struct stm32_qspi_priv *priv = dev_get_priv(dev->parent);
struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
+ int slave_cs = slave_plat->cs;
- if (slave_plat->cs >= STM32_QSPI_MAX_CHIP)
+ if (slave_cs >= STM32_QSPI_MAX_CHIP)
return -ENODEV;
- if (priv->cs_used != slave_plat->cs) {
- struct stm32_qspi_flash *flash = &priv->flash[slave_plat->cs];
+ if (priv->cs_used != slave_cs) {
+ struct stm32_qspi_flash *flash = &priv->flash[slave_cs];
- priv->cs_used = slave_plat->cs;
+ priv->cs_used = slave_cs;
if (flash->initialized) {
/* Set the configuration: speed + cs */
@@ -444,11 +445,12 @@ static int stm32_qspi_set_speed(struct udevice *bus, uint speed)
int ret;
if (speed > 0) {
- prescaler = DIV_ROUND_UP(qspi_clk, speed) - 1;
- if (prescaler > 255)
- prescaler = 255;
- else if (prescaler < 0)
- prescaler = 0;
+ prescaler = 0;
+ if (qspi_clk) {
+ prescaler = DIV_ROUND_UP(qspi_clk, speed) - 1;
+ if (prescaler > 255)
+ prescaler = 255;
+ }
}
csht = DIV_ROUND_UP((5 * qspi_clk) / (prescaler + 1), 100000000);
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 18/20] cmd: pinmux: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (15 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 17/20] spi: stm32_qspi: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 19/20] psci: " Patrick Delaunay
` (2 subsequent siblings)
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
cmd/pinmux.c: In function 'do_dev':
cmd/pinmux.c:26:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (ret) {
^
cmd/pinmux.c:30:2: note: here
case 1:
^~~~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
cmd/pinmux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/pinmux.c b/cmd/pinmux.c
index 6c8ec51..de909a1 100644
--- a/cmd/pinmux.c
+++ b/cmd/pinmux.c
@@ -27,6 +27,7 @@ static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
printf("Can't get the pin-controller: %s!\n", name);
return CMD_RET_FAILURE;
}
+ /* fall through */
case 1:
if (!currdev) {
printf("Pin-controller device is not set!\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 19/20] psci: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (16 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 18/20] cmd: pinmux: Fix warnings when compiling with W=1 Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 9:13 ` Patrick DELAUNAY
2019-07-12 14:03 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 20/20] spi: stm32: " Patrick Delaunay
2019-07-12 14:01 ` [U-Boot] [PATCH 01/20] stm32mp1: " Patrick DELAUNAY
19 siblings, 2 replies; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
arch/arm/mach-stm32mp/psci.c:
warning: no previous prototype for ‘psci_set_state’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_arch_cpu_entry’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_features’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_version’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_affinity_info’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_migrate_info_type’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_cpu_on’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_cpu_off’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_system_reset’ [-Wmissing-prototypes]
warning: no previous prototype for ‘psci_system_off’ [-Wmissing-prototypes]
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
arch/arm/include/asm/system.h | 14 ++++++++++++++
arch/arm/mach-imx/mx7/psci-mx7.c | 2 +-
arch/arm/mach-stm32mp/psci.c | 18 +++++++++---------
arch/arm/mach-uniphier/arm32/psci.c | 4 ++--
4 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index aed2e3c..ac4fc11 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -516,6 +516,20 @@ enum {
*/
void mmu_page_table_flush(unsigned long start, unsigned long stop);
+#ifdef CONFIG_ARMV7_PSCI
+u32 psci_version(void);
+s32 psci_features(u32 function_id, u32 psci_fid);
+s32 psci_cpu_off(void);
+s32 psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
+ u32 context_id);
+s32 psci_affinity_info(u32 function_id, u32 target_affinity,
+ u32 lowest_affinity_level);
+u32 psci_migrate_info_type(void);
+void __noreturn psci_system_off(void);
+void __noreturn psci_system_reset(void);
+s32 psci_features(u32 function_id, u32 psci_fid);
+#endif
+
#endif /* __ASSEMBLY__ */
#define arch_align_stack(x) (x)
diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c
index 34ba0a9..c98d2e9 100644
--- a/arch/arm/mach-imx/mx7/psci-mx7.c
+++ b/arch/arm/mach-imx/mx7/psci-mx7.c
@@ -298,7 +298,7 @@ __secure s32 psci_affinity_info(u32 __always_unused function_id,
return psci_state[cpu];
}
-__secure s32 psci_migrate_info_type(u32 function_id)
+__secure u32 psci_migrate_info_type(void)
{
/* Trusted OS is either not present or does not require migration */
return 2;
diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c
index 139bb09..1d91b2d 100644
--- a/arch/arm/mach-stm32mp/psci.c
+++ b/arch/arm/mach-stm32mp/psci.c
@@ -30,7 +30,7 @@ u8 psci_state[STM32MP1_PSCI_NR_CPUS] __secure_data = {
PSCI_AFFINITY_LEVEL_ON,
PSCI_AFFINITY_LEVEL_OFF};
-void __secure psci_set_state(int cpu, u8 state)
+static inline void psci_set_state(int cpu, u8 state)
{
psci_state[cpu] = state;
dsb();
@@ -67,7 +67,7 @@ void __secure psci_arch_cpu_entry(void)
writel(0xFFFFFFFF, TAMP_BACKUP_MAGIC_NUMBER);
}
-int __secure psci_features(u32 function_id, u32 psci_fid)
+s32 __secure psci_features(u32 function_id, u32 psci_fid)
{
switch (psci_fid) {
case ARM_PSCI_0_2_FN_PSCI_VERSION:
@@ -82,12 +82,12 @@ int __secure psci_features(u32 function_id, u32 psci_fid)
return ARM_PSCI_RET_NI;
}
-unsigned int __secure psci_version(u32 function_id)
+u32 __secure psci_version(void)
{
return ARM_PSCI_VER_1_0;
}
-int __secure psci_affinity_info(u32 function_id, u32 target_affinity,
+s32 __secure psci_affinity_info(u32 function_id, u32 target_affinity,
u32 lowest_affinity_level)
{
u32 cpu = target_affinity & MPIDR_AFF0;
@@ -104,7 +104,7 @@ int __secure psci_affinity_info(u32 function_id, u32 target_affinity,
return psci_state[cpu];
}
-int __secure psci_migrate_info_type(u32 function_id)
+u32 __secure psci_migrate_info_type(void)
{
/*
* in Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf
@@ -116,7 +116,7 @@ int __secure psci_migrate_info_type(u32 function_id)
return 2;
}
-int __secure psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
+s32 __secure psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
u32 context_id)
{
u32 cpu = target_cpu & MPIDR_AFF0;
@@ -161,7 +161,7 @@ int __secure psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
return ARM_PSCI_RET_SUCCESS;
}
-int __secure psci_cpu_off(u32 function_id)
+s32 __secure psci_cpu_off(void)
{
u32 cpu;
@@ -181,7 +181,7 @@ int __secure psci_cpu_off(u32 function_id)
wfi();
}
-void __secure psci_system_reset(u32 function_id)
+void __secure psci_system_reset(void)
{
/* System reset */
writel(RCC_MP_GRSTCSETR_MPSYSRST, RCC_MP_GRSTCSETR);
@@ -190,7 +190,7 @@ void __secure psci_system_reset(u32 function_id)
wfi();
}
-void __secure psci_system_off(u32 function_id)
+void __secure psci_system_off(void)
{
/* System Off is not managed, waiting user power off
* TODO: handle I2C write in PMIC Main Control register bit 0 = SWOFF
diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c
index 3f67edf..ef35923 100644
--- a/arch/arm/mach-uniphier/arm32/psci.c
+++ b/arch/arm/mach-uniphier/arm32/psci.c
@@ -130,7 +130,7 @@ void psci_arch_init(void)
u32 uniphier_psci_holding_pen_release __secure_data = 0xffffffff;
-int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point,
+s32 __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point,
u32 context_id)
{
u32 cpu = cpuid & 0xff;
@@ -155,7 +155,7 @@ int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point,
return PSCI_RET_SUCCESS;
}
-void __secure psci_system_reset(u32 function_id)
+void __secure psci_system_reset(void)
{
reset_cpu(0);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 20/20] spi: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (17 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 19/20] psci: " Patrick Delaunay
@ 2019-06-21 13:26 ` Patrick Delaunay
2019-07-12 14:03 ` Patrick DELAUNAY
2019-07-12 14:01 ` [U-Boot] [PATCH 01/20] stm32mp1: " Patrick DELAUNAY
19 siblings, 1 reply; 43+ messages in thread
From: Patrick Delaunay @ 2019-06-21 13:26 UTC (permalink / raw)
To: u-boot
This patch solves the following warnings:
drivers/spi/stm32_spi.c: In function 'stm32_spi_write_txfifo':
drivers/spi/stm32_spi.c:116:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (priv->tx_len >= sizeof(u32) &&
^~
drivers/spi/stm32_spi.c:122:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} else if (priv->tx_len >= sizeof(u16) &&
^~
drivers/spi/stm32_spi.c: In function 'stm32_spi_read_rxfifo':
drivers/spi/stm32_spi.c:150:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(priv->rx_len >= sizeof(u32) || (sr & SPI_SR_RXWNE))) {
^~
drivers/spi/stm32_spi.c:156:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(priv->rx_len >= sizeof(u16) ||
^~
drivers/core/simple-bus.c:15:12: warning: no previous prototype for 'simple_bus_translate' [-Wmissing-prototypes]
fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
^~~~~~~~~~~~~~~~~~~~
drivers/spi/stm32_spi.c: In function 'stm32_spi_set_speed':
drivers/spi/stm32_spi.c:335:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
div > STM32_MBR_DIV_MAX)
^
drivers/spi/stm32_spi.c:344:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if ((mbrdiv - 1) < 0)
^
drivers/spi/stm32_spi.c: In function 'stm32_spi_probe':
drivers/spi/stm32_spi.c:531:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
drivers/spi/stm32_spi.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index 34b2175..75b6006 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -99,8 +99,8 @@ struct stm32_spi_priv {
unsigned int cur_bpw;
unsigned int cur_hz;
unsigned int cur_xferlen; /* current transfer length in bytes */
- int tx_len; /* number of data to be written in bytes */
- int rx_len; /* number of data to be read in bytes */
+ unsigned int tx_len; /* number of data to be written in bytes */
+ unsigned int rx_len; /* number of data to be read in bytes */
const void *tx_buf; /* data to be written, or NULL */
void *rx_buf; /* data to be read, or NULL */
u32 cur_mode;
@@ -322,7 +322,8 @@ static int stm32_spi_set_fthlv(struct udevice *dev, u32 xfer_len)
static int stm32_spi_set_speed(struct udevice *bus, uint hz)
{
struct stm32_spi_priv *priv = dev_get_priv(bus);
- u32 div, mbrdiv;
+ u32 mbrdiv;
+ long div;
debug("%s: hz=%d\n", __func__, hz);
@@ -341,7 +342,7 @@ static int stm32_spi_set_speed(struct udevice *bus, uint hz)
else
mbrdiv = fls(div) - 1;
- if ((mbrdiv - 1) < 0)
+ if (!mbrdiv)
return -EINVAL;
clrsetbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_MBR,
@@ -481,7 +482,7 @@ static int stm32_spi_probe(struct udevice *dev)
struct stm32_spi_priv *priv = dev_get_priv(dev);
unsigned long clk_rate;
int ret;
- int i;
+ unsigned int i;
priv->base = dev_remap_addr(dev);
if (!priv->base)
--
2.7.4
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 06/20] adc: stm32-adc: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 06/20] adc: stm32-adc: " Patrick Delaunay
@ 2019-06-21 13:40 ` Fabrice Gasnier
2019-07-12 14:01 ` Patrick DELAUNAY
1 sibling, 0 replies; 43+ messages in thread
From: Fabrice Gasnier @ 2019-06-21 13:40 UTC (permalink / raw)
To: u-boot
On 6/21/19 3:26 PM, Patrick Delaunay wrote:
> This patch solves the following warnings:
>
> drivers/adc/stm32-adc.c: In function 'stm32_adc_chan_of_init':
> warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> if (num_channels > adc->cfg->max_channels) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Hi Patrick,
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Thanks,
Fabrice
> ---
>
> drivers/adc/stm32-adc.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
> index e108062..029338e 100644
> --- a/drivers/adc/stm32-adc.c
> +++ b/drivers/adc/stm32-adc.c
> @@ -163,15 +163,16 @@ static int stm32_adc_chan_of_init(struct udevice *dev)
> struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
> struct stm32_adc *adc = dev_get_priv(dev);
> u32 chans[STM32_ADC_CH_MAX];
> - int i, num_channels, ret;
> + unsigned int i, num_channels;
> + int ret;
>
> /* Retrieve single ended channels listed in device tree */
> - num_channels = dev_read_size(dev, "st,adc-channels");
> - if (num_channels < 0) {
> - dev_err(dev, "can't get st,adc-channels: %d\n", num_channels);
> - return num_channels;
> + ret = dev_read_size(dev, "st,adc-channels");
> + if (ret < 0) {
> + dev_err(dev, "can't get st,adc-channels: %d\n", ret);
> + return ret;
> }
> - num_channels /= sizeof(u32);
> + num_channels = ret / sizeof(u32);
>
> if (num_channels > adc->cfg->max_channels) {
> dev_err(dev, "too many st,adc-channels: %d\n", num_channels);
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 07/20] adc: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 07/20] adc: stm32: " Patrick Delaunay
@ 2019-06-21 13:41 ` Fabrice Gasnier
2019-07-12 14:01 ` Patrick DELAUNAY
1 sibling, 0 replies; 43+ messages in thread
From: Fabrice Gasnier @ 2019-06-21 13:41 UTC (permalink / raw)
To: u-boot
On 6/21/19 3:26 PM, Patrick Delaunay wrote:
> This patch solves the following warnings:
>
> drivers/adc/stm32-adc-core.c: In function 'stm32h7_adc_clk_sel':
> warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
> ^
> warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
> for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Hi Patrick,
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Thanks,
Fabrice
> ---
>
> drivers/adc/stm32-adc-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
> index a9aa143..04b6a8a 100644
> --- a/drivers/adc/stm32-adc-core.c
> +++ b/drivers/adc/stm32-adc-core.c
> @@ -60,7 +60,8 @@ static int stm32h7_adc_clk_sel(struct udevice *dev,
> {
> u32 ckmode, presc;
> unsigned long rate;
> - int i, div;
> + unsigned int i;
> + int div;
>
> /* stm32h7 bus clock is common for all ADC instances (mandatory) */
> if (!clk_valid(&common->bclk)) {
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 19/20] psci: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 19/20] psci: " Patrick Delaunay
@ 2019-07-12 9:13 ` Patrick DELAUNAY
2019-07-12 14:03 ` Patrick DELAUNAY
1 sibling, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 9:13 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
> arch/arm/mach-stm32mp/psci.c:
>
> warning: no previous prototype for ‘psci_set_state’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_arch_cpu_entry’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_features’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_version’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_affinity_info’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_migrate_info_type’ [-Wmissing-
> prototypes]
> warning: no previous prototype for ‘psci_cpu_on’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_cpu_off’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_system_reset’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_system_off’ [-Wmissing-prototypes]
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
After rebase this patch cause compilation issue with sunci platform: it need to be updated
+arch/arm/cpu/armv7/sunxi/psci.c:279:15: error: conflicting types for 'psci_cpu_off'
> ---
>
> arch/arm/include/asm/system.h | 14 ++++++++++++++
> arch/arm/mach-imx/mx7/psci-mx7.c | 2 +-
> arch/arm/mach-stm32mp/psci.c | 18 +++++++++---------
> arch/arm/mach-uniphier/arm32/psci.c | 4 ++--
> 4 files changed, 26 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index
> aed2e3c..ac4fc11 100644
> --- a/arch/arm/include/asm/system.h
> +++ b/arch/arm/include/asm/system.h
> @@ -516,6 +516,20 @@ enum {
> */
> void mmu_page_table_flush(unsigned long start, unsigned long stop);
>
> +#ifdef CONFIG_ARMV7_PSCI
> +u32 psci_version(void);
> +s32 psci_features(u32 function_id, u32 psci_fid);
> +s32 psci_cpu_off(void);
> +s32 psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
> + u32 context_id);
> +s32 psci_affinity_info(u32 function_id, u32 target_affinity,
> + u32 lowest_affinity_level);
> +u32 psci_migrate_info_type(void);
> +void __noreturn psci_system_off(void);
> +void __noreturn psci_system_reset(void);
> +s32 psci_features(u32 function_id, u32 psci_fid); #endif
> +
> #endif /* __ASSEMBLY__ */
>
> #define arch_align_stack(x) (x)
> diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-
> mx7.c
> index 34ba0a9..c98d2e9 100644
> --- a/arch/arm/mach-imx/mx7/psci-mx7.c
> +++ b/arch/arm/mach-imx/mx7/psci-mx7.c
> @@ -298,7 +298,7 @@ __secure s32 psci_affinity_info(u32 __always_unused
> function_id,
> return psci_state[cpu];
> }
>
> -__secure s32 psci_migrate_info_type(u32 function_id)
> +__secure u32 psci_migrate_info_type(void)
> {
> /* Trusted OS is either not present or does not require migration */
> return 2;
> diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c
> index 139bb09..1d91b2d 100644
> --- a/arch/arm/mach-stm32mp/psci.c
> +++ b/arch/arm/mach-stm32mp/psci.c
> @@ -30,7 +30,7 @@ u8 psci_state[STM32MP1_PSCI_NR_CPUS] __secure_data
> = {
> PSCI_AFFINITY_LEVEL_ON,
> PSCI_AFFINITY_LEVEL_OFF};
>
> -void __secure psci_set_state(int cpu, u8 state)
> +static inline void psci_set_state(int cpu, u8 state)
> {
> psci_state[cpu] = state;
> dsb();
> @@ -67,7 +67,7 @@ void __secure psci_arch_cpu_entry(void)
> writel(0xFFFFFFFF, TAMP_BACKUP_MAGIC_NUMBER); }
>
> -int __secure psci_features(u32 function_id, u32 psci_fid)
> +s32 __secure psci_features(u32 function_id, u32 psci_fid)
> {
> switch (psci_fid) {
> case ARM_PSCI_0_2_FN_PSCI_VERSION:
> @@ -82,12 +82,12 @@ int __secure psci_features(u32 function_id, u32 psci_fid)
> return ARM_PSCI_RET_NI;
> }
>
> -unsigned int __secure psci_version(u32 function_id)
> +u32 __secure psci_version(void)
> {
> return ARM_PSCI_VER_1_0;
> }
>
> -int __secure psci_affinity_info(u32 function_id, u32 target_affinity,
> +s32 __secure psci_affinity_info(u32 function_id, u32 target_affinity,
> u32 lowest_affinity_level)
> {
> u32 cpu = target_affinity & MPIDR_AFF0; @@ -104,7 +104,7 @@ int
> __secure psci_affinity_info(u32 function_id, u32 target_affinity,
> return psci_state[cpu];
> }
>
> -int __secure psci_migrate_info_type(u32 function_id)
> +u32 __secure psci_migrate_info_type(void)
> {
> /*
> * in Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf
> @@ -116,7 +116,7 @@ int __secure psci_migrate_info_type(u32 function_id)
> return 2;
> }
>
> -int __secure psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
> +s32 __secure psci_cpu_on(u32 function_id, u32 target_cpu, u32 pc,
> u32 context_id)
> {
> u32 cpu = target_cpu & MPIDR_AFF0;
> @@ -161,7 +161,7 @@ int __secure psci_cpu_on(u32 function_id, u32
> target_cpu, u32 pc,
> return ARM_PSCI_RET_SUCCESS;
> }
>
> -int __secure psci_cpu_off(u32 function_id)
> +s32 __secure psci_cpu_off(void)
> {
> u32 cpu;
>
> @@ -181,7 +181,7 @@ int __secure psci_cpu_off(u32 function_id)
> wfi();
> }
>
> -void __secure psci_system_reset(u32 function_id)
> +void __secure psci_system_reset(void)
> {
> /* System reset */
> writel(RCC_MP_GRSTCSETR_MPSYSRST, RCC_MP_GRSTCSETR);
> @@ -190,7 +190,7 @@ void __secure psci_system_reset(u32 function_id)
> wfi();
> }
>
> -void __secure psci_system_off(u32 function_id)
> +void __secure psci_system_off(void)
> {
> /* System Off is not managed, waiting user power off
> * TODO: handle I2C write in PMIC Main Control register bit 0 = SWOFF
> diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-
> uniphier/arm32/psci.c
> index 3f67edf..ef35923 100644
> --- a/arch/arm/mach-uniphier/arm32/psci.c
> +++ b/arch/arm/mach-uniphier/arm32/psci.c
> @@ -130,7 +130,7 @@ void psci_arch_init(void)
>
> u32 uniphier_psci_holding_pen_release __secure_data = 0xffffffff;
>
> -int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point,
> +s32 __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point,
> u32 context_id)
> {
> u32 cpu = cpuid & 0xff;
> @@ -155,7 +155,7 @@ int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32
> entry_point,
> return PSCI_RET_SUCCESS;
> }
>
> -void __secure psci_system_reset(u32 function_id)
> +void __secure psci_system_reset(void)
> {
> reset_cpu(0);
> }
> --
> 2.7.4
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
` (18 preceding siblings ...)
2019-06-21 13:26 ` [U-Boot] [PATCH 20/20] spi: stm32: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
19 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> arch/arm/mach-stm32mp/cpu.c:378:16: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> if (instance > ARRAY_SIZE(serial_addr))
> ^
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> arch/arm/mach-stm32mp/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 02/20] board: stm32mp1: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 02/20] board: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> warning: no previous prototype for 'board_quiesce_devices' [-Wmissing-
> prototypes] void board_quiesce_devices(void)
> ^~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> board/st/stm32mp1/stm32mp1.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 03/20] serial: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 03/20] serial: stm32: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/serial/serial_stm32.c: In function 'stm32_serial_probe':
> warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> if (plat->clock_rate < 0) {
> ^
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/serial/serial_stm32.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 04/20] mmc: stm32_sdmmc2: avoid warnings when building with W=1 option
2019-06-21 13:26 ` [U-Boot] [PATCH 04/20] mmc: stm32_sdmmc2: avoid warnings when building with W=1 option Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves warnings detected by setting W=1 when building.
>
> Warnings type detected:
> - [-Wmissing-prototypes]
> - [-Wimplicit-fallthrough=]
>
> Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/mmc/stm32_sdmmc2.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 08/20] gpio: stm32_gpio: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 08/20] gpio: stm32_gpio: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/gpio/stm32_gpio.c: In function 'stm32_offset_to_index':
> : comparison between signed and unsigned integer expressions [-Wsign-compare]
> if (idx == offset)
> ^~
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/gpio/stm32f7_gpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 05/20] stm32mp1: bsec: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 05/20] stm32mp1: bsec: Fix warnings when compiling with W=1 Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> arch/arm/mach-stm32mp/bsec.c: In function 'stm32mp_bsec_read':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (offset >= STM32_BSEC_OTP_OFFSET) {
> ^~
> arch/arm/mach-stm32mp/bsec.c: In function 'stm32mp_bsec_write':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (offset >= STM32_BSEC_OTP_OFFSET) {
> ^~
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> arch/arm/mach-stm32mp/bsec.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 10/20] clk: clk_stm32mp1: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 10/20] clk: clk_stm32mp1: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/clk/clk_stm32mp1.c: In function 'stm32mp1_clk_get_parent':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++)
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/clk/clk_stm32mp1.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 06/20] adc: stm32-adc: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 06/20] adc: stm32-adc: " Patrick Delaunay
2019-06-21 13:40 ` Fabrice Gasnier
@ 2019-07-12 14:01 ` Patrick DELAUNAY
1 sibling, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/adc/stm32-adc.c: In function 'stm32_adc_chan_of_init':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (num_channels > adc->cfg->max_channels) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/adc/stm32-adc.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 09/20] i2c: stm32f7_i2c: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 09/20] i2c: stm32f7_i2c: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_compute_solutions':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (scldel < scldel_min)
> ^
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (((sdadel >= sdadel_min) &&
> ^~
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> (sdadel <= sdadel_max)) &&
> ^~
> drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_choose_solution':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (clk_error < clk_error_prev) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/i2c/stm32f7_i2c.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 07/20] adc: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 07/20] adc: stm32: " Patrick Delaunay
2019-06-21 13:41 ` Fabrice Gasnier
@ 2019-07-12 14:01 ` Patrick DELAUNAY
1 sibling, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/adc/stm32-adc-core.c: In function 'stm32h7_adc_clk_sel':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
> ^
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/adc/stm32-adc-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 12/20] misc: stm32_fuse: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 12/20] misc: stm32_fuse: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> warning: no previous prototype for 'fuse_read' [-Wmissing-prototypes] int
> fuse_read(u32 bank, u32 word, u32 *val)
> ^~~~~~~~~
> CC cmd/sf.o
> warning: no previous prototype for 'fuse_prog' [-Wmissing-prototypes] int
> fuse_prog(u32 bank, u32 word, u32 val)
> ^~~~~~~~~
> warning: no previous prototype for 'fuse_sense' [-Wmissing-prototypes] int
> fuse_sense(u32 bank, u32 word, u32 *val)
> ^~~~~~~~~~
> warning: no previous prototype for 'fuse_override' [-Wmissing-prototypes] int
> fuse_override(u32 bank, u32 word, u32 val)
> ^~~~~~~~~~~~~
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/misc/stm32mp_fuse.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 11/20] power: regulator: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 11/20] power: regulator: stm32: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/power/regulator/stm32-vrefbuf.c: In function 'stm32_vrefbuf_set_value':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> if (uV == stm32_vrefbuf_voltages[i]) {
> ^~
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/power/regulator/stm32-vrefbuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 14/20] pinctrl: pinctrl_stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 14/20] pinctrl: pinctrl_stm32: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> if (*idx < 0)
> ^
> drivers/pinctrl/pinctrl_stm32.c: At top level:
> warning: no previous prototype for 'stm32_pinctrl_probe' [-Wmissing-prototypes]
> int stm32_pinctrl_probe(struct udevice *dev)
> ^~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Patrice CHOTARD <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/pinctrl/pinctrl_stm32.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 13/20] ram: stm32mp1_ram: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 13/20] ram: stm32mp1_ram: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_clk_enable':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) {
> ^
> drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_setup':
> warning: comparison between signed and unsigned integer expressions [-Wsign-
> compare]
> for (idx = 0; idx < ARRAY_SIZE(param); idx++) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/ram/stm32mp1/stm32mp1_ram.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 17/20] spi: stm32_qspi: avoid warnings when building with W=1 option
2019-06-21 13:26 ` [U-Boot] [PATCH 17/20] spi: stm32_qspi: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves warnings detected by setting W=1 when building.
>
> Warnings type detected:
> - [-Wtype-limits]
> - [-Wsign-compare]
>
> Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/spi/stm32_qspi.c | 24 +++++++++++++-----------
> 1 file changed, 13 insertions(+), 11 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 16/20] mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option
2019-06-21 13:26 ` [U-Boot] [PATCH 16/20] mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves warnings detected by setting W=1 when building.
>
> Warnings type detected:
> - [-Wsign-compare]
> - [-Wtype-limits]
>
> Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/mtd/nand/raw/stm32_fmc2_nand.c | 93 ++++++++++++----------------------
> 1 file changed, 31 insertions(+), 62 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 15/20] power: stpmic1: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 15/20] power: stpmic1: " Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
> warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/power/regulator/stpmic1.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 18/20] cmd: pinmux: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 18/20] cmd: pinmux: Fix warnings when compiling with W=1 Patrick Delaunay
@ 2019-07-12 14:01 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:01 UTC (permalink / raw)
To: u-boot
Hi
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> cmd/pinmux.c: In function 'do_dev':
> cmd/pinmux.c:26:6: warning: this statement may fall through [-Wimplicit-
> fallthrough=]
> if (ret) {
> ^
> cmd/pinmux.c:30:2: note: here
> case 1:
> ^~~~
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> cmd/pinmux.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 19/20] psci: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 19/20] psci: " Patrick Delaunay
2019-07-12 9:13 ` Patrick DELAUNAY
@ 2019-07-12 14:03 ` Patrick DELAUNAY
1 sibling, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:03 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
> arch/arm/mach-stm32mp/psci.c:
>
> warning: no previous prototype for ‘psci_set_state’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_arch_cpu_entry’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_features’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_version’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_affinity_info’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_migrate_info_type’ [-Wmissing-
> prototypes]
> warning: no previous prototype for ‘psci_cpu_on’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_cpu_off’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_system_reset’ [-Wmissing-prototypes]
> warning: no previous prototype for ‘psci_system_off’ [-Wmissing-prototypes]
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> arch/arm/include/asm/system.h | 14 ++++++++++++++
> arch/arm/mach-imx/mx7/psci-mx7.c | 2 +-
> arch/arm/mach-stm32mp/psci.c | 18 +++++++++---------
> arch/arm/mach-uniphier/arm32/psci.c | 4 ++--
> 4 files changed, 26 insertions(+), 12 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
* [U-Boot] [PATCH 20/20] spi: stm32: Fix warnings when compiling with W=1
2019-06-21 13:26 ` [U-Boot] [PATCH 20/20] spi: stm32: " Patrick Delaunay
@ 2019-07-12 14:03 ` Patrick DELAUNAY
0 siblings, 0 replies; 43+ messages in thread
From: Patrick DELAUNAY @ 2019-07-12 14:03 UTC (permalink / raw)
To: u-boot
Hi,
> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/spi/stm32_spi.c: In function 'stm32_spi_write_txfifo':
> drivers/spi/stm32_spi.c:116:20: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> if (priv->tx_len >= sizeof(u32) &&
> ^~
> drivers/spi/stm32_spi.c:122:27: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> } else if (priv->tx_len >= sizeof(u16) &&
> ^~
> drivers/spi/stm32_spi.c: In function 'stm32_spi_read_rxfifo':
> drivers/spi/stm32_spi.c:150:21: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> (priv->rx_len >= sizeof(u32) || (sr & SPI_SR_RXWNE))) {
> ^~
> drivers/spi/stm32_spi.c:156:21: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> (priv->rx_len >= sizeof(u16) ||
> ^~
> drivers/core/simple-bus.c:15:12: warning: no previous prototype for
> 'simple_bus_translate' [-Wmissing-prototypes] fdt_addr_t
> simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
> ^~~~~~~~~~~~~~~~~~~~
> drivers/spi/stm32_spi.c: In function 'stm32_spi_set_speed':
> drivers/spi/stm32_spi.c:335:10: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> div > STM32_MBR_DIV_MAX)
> ^
> drivers/spi/stm32_spi.c:344:19: warning: comparison of unsigned expression < 0
> is always false [-Wtype-limits]
> if ((mbrdiv - 1) < 0)
> ^
> drivers/spi/stm32_spi.c: In function 'stm32_spi_probe':
> drivers/spi/stm32_spi.c:531:16: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
> drivers/spi/stm32_spi.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~2019-07-12 14:03 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-21 13:26 [U-Boot] [PATCH 01/20] stm32mp1: Fix warnings when compiling with W=1 Patrick Delaunay
2019-06-21 13:26 ` [U-Boot] [PATCH 02/20] board: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 03/20] serial: stm32: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 04/20] mmc: stm32_sdmmc2: avoid warnings when building with W=1 option Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 05/20] stm32mp1: bsec: Fix warnings when compiling with W=1 Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 06/20] adc: stm32-adc: " Patrick Delaunay
2019-06-21 13:40 ` Fabrice Gasnier
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 07/20] adc: stm32: " Patrick Delaunay
2019-06-21 13:41 ` Fabrice Gasnier
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 08/20] gpio: stm32_gpio: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 09/20] i2c: stm32f7_i2c: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 10/20] clk: clk_stm32mp1: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 11/20] power: regulator: stm32: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 12/20] misc: stm32_fuse: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 13/20] ram: stm32mp1_ram: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 14/20] pinctrl: pinctrl_stm32: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 15/20] power: stpmic1: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 16/20] mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 17/20] spi: stm32_qspi: " Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 18/20] cmd: pinmux: Fix warnings when compiling with W=1 Patrick Delaunay
2019-07-12 14:01 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 19/20] psci: " Patrick Delaunay
2019-07-12 9:13 ` Patrick DELAUNAY
2019-07-12 14:03 ` Patrick DELAUNAY
2019-06-21 13:26 ` [U-Boot] [PATCH 20/20] spi: stm32: " Patrick Delaunay
2019-07-12 14:03 ` Patrick DELAUNAY
2019-07-12 14:01 ` [U-Boot] [PATCH 01/20] stm32mp1: " Patrick DELAUNAY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox