[U-Boot] [PATCH 01/17] socrates: Fix a misleading indentation warning

With gcc-6 and later we see a warning about the fact that we have a construct of "if (test);\n\tstatement". Upon reviewing the code, the intention here is as the compiler suggests, we only want to execute the indented statement if the test was true.
Cc: Sergei Poselenov sposelenov@emcraft.com Signed-off-by: Tom Rini trini@konsulko.com --- board/socrates/socrates.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 8b34a80e8f72..fb691c22d961 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -378,7 +378,7 @@ static void board_backlight_brightness(int br)
/* LEDs on */ reg = in_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c)); - if (!(reg & BACKLIGHT_ENABLE)); + if (!(reg & BACKLIGHT_ENABLE)) out_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c), reg | BACKLIGHT_ENABLE); } else {

The variable grf is only referenced if EARLY_DEBUG is defined so move the declaration to be under the existing guard.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-rockchip/rk3036-board-spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c index 0522d6546742..7b8d0ee653f8 100644 --- a/arch/arm/mach-rockchip/rk3036-board-spl.c +++ b/arch/arm/mach-rockchip/rk3036-board-spl.c @@ -17,13 +17,13 @@ DECLARE_GLOBAL_DATA_PTR;
#define GRF_BASE 0x20008000 -static struct rk3036_grf * const grf = (void *)GRF_BASE;
#define DEBUG_UART_BASE 0x20068000
void board_init_f(ulong dummy) { #ifdef EARLY_DEBUG + struct rk3036_grf * const grf = (void *)GRF_BASE; /* * NOTE: sd card and debug uart use same iomux in rk3036, * so if you enable uart,

On 8 May 2017 at 20:14, Tom Rini trini@konsulko.com wrote:
The variable grf is only referenced if EARLY_DEBUG is defined so move the declaration to be under the existing guard.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/mach-rockchip/rk3036-board-spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Sorry, I'm not sure how that crept in. Thanks for fixing it.
Reviewed-by: Simon Glass sjg@chromium.org

On Mon, May 08, 2017 at 10:14:20PM -0400, Tom Rini wrote:
The variable grf is only referenced if EARLY_DEBUG is defined so move the declaration to be under the existing guard.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

The variable pwm_pad is never referenced, drop.
Cc: Christian Gmeiner christian.gmeiner@gmail.com Signed-off-by: Tom Rini trini@konsulko.com --- board/bachmann/ot1200/ot1200.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index eeced7943ed4..c0a8b6423ee1 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -273,10 +273,6 @@ int board_mmc_init(bd_t *bis) return 0; }
-static iomux_v3_cfg_t const pwm_pad[] = { - MX6_PAD_SD1_CMD__PWM4_OUT | MUX_PAD_CTRL(OUTPUT_40OHM), -}; - static void leds_on(void) { /* turn on all possible leds connected via GPIO expander */

2017-05-09 4:14 GMT+02:00 Tom Rini trini@konsulko.com:
The variable pwm_pad is never referenced, drop.
Cc: Christian Gmeiner christian.gmeiner@gmail.com Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Christian Gmeiner christian.gmeiner@gmail.com
greets -- Christian Gmeiner, MSc
https://www.youtube.com/user/AloryOFFICIAL https://soundcloud.com/christian-gmeiner

On Mon, May 08, 2017 at 10:14:21PM -0400, Tom Rini wrote:
The variable pwm_pad is never referenced, drop.
Cc: Christian Gmeiner christian.gmeiner@gmail.com Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Christian Gmeiner christian.gmeiner@gmail.com
Applied to u-boot/master, thanks!

The variable usdhc2_pads is only referenced during SPL builds, add a guard.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Tom Rini trini@konsulko.com --- board/congatec/cgtqmx6eval/cgtqmx6eval.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index a4a602943ed2..24956a8a94e5 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -71,6 +71,7 @@ static iomux_v3_cfg_t const uart2_pads[] = { IOMUX_PADS(PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), };
+#ifndef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc2_pads[] = { IOMUX_PADS(PAD_SD2_CLK__SD2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), IOMUX_PADS(PAD_SD2_CMD__SD2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), @@ -94,6 +95,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = { IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)), IOMUX_PADS(PAD_SD3_RST__SD3_RESET | MUX_PAD_CTRL(USDHC_PAD_CTRL)), }; +#endif
static iomux_v3_cfg_t const usdhc4_pads[] = { IOMUX_PADS(PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)),

On Mon, May 08, 2017 at 10:14:22PM -0400, Tom Rini wrote:
The variable usdhc2_pads is only referenced during SPL builds, add a guard.
Cc: Otavio Salvador otavio@ossystems.com.br Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Peng Fan peng.fan@nxp.com Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com --- board/freescale/mx6slevk/mx6slevk.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index d49543315b92..228514b106a8 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -66,6 +66,7 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), };
+#ifdef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc1_pads[] = { /* 8 bit SD */ MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -106,6 +107,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = { /*CD pin*/ MX6_PAD_REF_CLK_32K__GPIO_3_22 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +#endif
static iomux_v3_cfg_t const fec_pads[] = { MX6_PAD_FEC_MDC__FEC_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),

On Mon, May 08, 2017 at 10:14:23PM -0400, Tom Rini wrote:
The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Peng Fan peng.fan@nxp.com Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Peng Fan peng.fan@nxp.com
board/freescale/mx6slevk/mx6slevk.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index d49543315b92..228514b106a8 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -66,6 +66,7 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), };
+#ifdef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc1_pads[] = { /* 8 bit SD */ MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -106,6 +107,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = { /*CD pin*/ MX6_PAD_REF_CLK_32K__GPIO_3_22 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +#endif
static iomux_v3_cfg_t const fec_pads[] = { MX6_PAD_FEC_MDC__FEC_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), -- 1.9.1
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

On 09/05/2017 04:14, Tom Rini wrote:
The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Peng Fan peng.fan@nxp.com Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com
board/freescale/mx6slevk/mx6slevk.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index d49543315b92..228514b106a8 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -66,6 +66,7 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), };
+#ifdef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc1_pads[] = { /* 8 bit SD */ MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -106,6 +107,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = { /*CD pin*/ MX6_PAD_REF_CLK_32K__GPIO_3_22 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +#endif
static iomux_v3_cfg_t const fec_pads[] = { MX6_PAD_FEC_MDC__FEC_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
Reviewed-by: Stefano Babic sbabic@denx.de
Best regards, Stefano

On Mon, May 08, 2017 at 10:14:23PM -0400, Tom Rini wrote:
The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Fabio Estevam fabio.estevam@nxp.com Cc: Peng Fan peng.fan@nxp.com Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Peng Fan peng.fan@nxp.com Reviewed-by: Stefano Babic sbabic@denx.de
Applied to u-boot/master, thanks!

The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Stefano Babic sbabic@denx.de Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com --- board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index b28ce1049589..a5746fe08688 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -225,6 +225,7 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL), };
+#ifndef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD1_CMD__USDHC1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -240,6 +241,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { /* RST_B */ MX6_PAD_GPIO1_IO09__GPIO1_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +#endif
/* * mx6ul_14x14_evk board default supports sd card. If want to use

On Mon, May 08, 2017 at 10:14:24PM -0400, Tom Rini wrote:
The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Stefano Babic sbabic@denx.de Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Peng Fan peng.fan@nxp.com
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index b28ce1049589..a5746fe08688 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -225,6 +225,7 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL), };
+#ifndef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD1_CMD__USDHC1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -240,6 +241,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { /* RST_B */ MX6_PAD_GPIO1_IO09__GPIO1_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +#endif
/*
- mx6ul_14x14_evk board default supports sd card. If want to use
-- 1.9.1
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

On 09/05/2017 04:14, Tom Rini wrote:
The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Stefano Babic sbabic@denx.de Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index b28ce1049589..a5746fe08688 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -225,6 +225,7 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL), };
+#ifndef CONFIG_SPL_BUILD static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD1_CMD__USDHC1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -240,6 +241,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { /* RST_B */ MX6_PAD_GPIO1_IO09__GPIO1_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +#endif
/*
- mx6ul_14x14_evk board default supports sd card. If want to use
Reviewed-by: Stefano Babic sbabic@denx.de
Best regards, Stefano

On Mon, May 08, 2017 at 10:14:24PM -0400, Tom Rini wrote:
The variable usdhc1_pads is only referenced during SPL builds, add a guard.
Cc: Stefano Babic sbabic@denx.de Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Peng Fan peng.fan@nxp.com Reviewed-by: Stefano Babic sbabic@denx.de
Applied to u-boot/master, thanks!

The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set, move the existing guard and drop a now redundant comment. The variable gwproto_gpio_pads is never referenced, remove it.
Cc: Tim Harvey tharvey@gateworks.com Signed-off-by: Tom Rini trini@konsulko.com --- board/gateworks/gw_ventana/common.c | 27 --------------------------- board/gateworks/gw_ventana/gw_ventana.c | 3 +-- 2 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c index d27bd57648ca..186eb1804813 100644 --- a/board/gateworks/gw_ventana/common.c +++ b/board/gateworks/gw_ventana/common.c @@ -180,33 +180,6 @@ void setup_ventana_i2c(void) /* * Baseboard specific GPIO */ - -/* prototype */ -static iomux_v3_cfg_t const gwproto_gpio_pads[] = { - /* RS232_EN# */ - IOMUX_PADS(PAD_SD4_DAT3__GPIO2_IO11 | DIO_PAD_CFG), - /* PANLEDG# */ - IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG), - /* PANLEDR# */ - IOMUX_PADS(PAD_KEY_ROW0__GPIO4_IO07 | DIO_PAD_CFG), - /* LOCLED# */ - IOMUX_PADS(PAD_KEY_ROW4__GPIO4_IO15 | DIO_PAD_CFG), - /* RS485_EN */ - IOMUX_PADS(PAD_SD3_DAT4__GPIO7_IO01 | DIO_PAD_CFG), - /* IOEXP_PWREN# */ - IOMUX_PADS(PAD_EIM_A19__GPIO2_IO19 | DIO_PAD_CFG), - /* IOEXP_IRQ# */ - IOMUX_PADS(PAD_EIM_A20__GPIO2_IO18 | MUX_PAD_CTRL(IRQ_PAD_CTRL)), - /* VID_EN */ - IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31 | DIO_PAD_CFG), - /* DIOI2C_DIS# */ - IOMUX_PADS(PAD_GPIO_19__GPIO4_IO05 | DIO_PAD_CFG), - /* PCICK_SSON */ - IOMUX_PADS(PAD_SD1_CLK__GPIO1_IO20 | DIO_PAD_CFG), - /* PCI_RST# */ - IOMUX_PADS(PAD_ENET_TXD1__GPIO1_IO29 | DIO_PAD_CFG), -}; - static iomux_v3_cfg_t const gw51xx_gpio_pads[] = { /* PANLEDG# */ IOMUX_PADS(PAD_KEY_COL0__GPIO4_IO06 | DIO_PAD_CFG), diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index dc8cd883e904..c4c2d2353207 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -76,7 +76,7 @@ static iomux_v3_cfg_t const enet_pads[] = { IOMUX_PADS(PAD_ENET_TXD0__GPIO1_IO30 | DIO_PAD_CFG), };
-/* NAND */ +#ifdef CONFIG_CMD_NAND static iomux_v3_cfg_t const nfc_pads[] = { IOMUX_PADS(PAD_NANDF_CLE__NAND_CLE | MUX_PAD_CTRL(NO_PAD_CTRL)), IOMUX_PADS(PAD_NANDF_ALE__NAND_ALE | MUX_PAD_CTRL(NO_PAD_CTRL)), @@ -95,7 +95,6 @@ static iomux_v3_cfg_t const nfc_pads[] = { IOMUX_PADS(PAD_NANDF_D7__NAND_DATA07 | MUX_PAD_CTRL(NO_PAD_CTRL)), };
-#ifdef CONFIG_CMD_NAND static void setup_gpmi_nand(void) { struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

On Mon, May 08, 2017 at 10:14:25PM -0400, Tom Rini wrote:
The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set, move the existing guard and drop a now redundant comment. The variable gwproto_gpio_pads is never referenced, remove it.
Cc: Tim Harvey tharvey@gateworks.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variables prg_stage2_prepare, prg_stage2_success and prg_stage_fail are only referenced when CCDM_SECOND_STAGE is set, move these to be by the existing guard.
Cc: Dirk Eibach eibach@gdsys.de Signed-off-by: Tom Rini trini@konsulko.com --- board/gdsys/p1022/controlcenterd-id.c | 49 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 1648f1334054..db8a91756373 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -156,33 +156,8 @@ static const uint8_t prg_stage1_prepare[] = { 0x81, 0x2e, 0x30, 0x00, /* opcode: LOAD PCR3, f3 */ };
-static const uint8_t prg_stage2_prepare[] = { - 0x00, 0x80, 0x00, 0x00, /* opcode: SYNC PCR0 */ - 0x00, 0x84, 0x00, 0x00, /* opcode: SYNC PCR1 */ - 0x00, 0x88, 0x00, 0x00, /* opcode: SYNC PCR2 */ - 0x00, 0x8c, 0x00, 0x00, /* opcode: SYNC PCR3 */ - 0x00, 0x90, 0x00, 0x00, /* opcode: SYNC PCR4 */ -}; - -static const uint8_t prg_stage2_success[] = { - 0x81, 0x02, 0x40, 0x14, /* opcode: LOAD PCR4, #<20B data> */ - 0x48, 0xfd, 0x95, 0x17, 0xe7, 0x54, 0x6b, 0x68, /* data */ - 0x92, 0x31, 0x18, 0x05, 0xf8, 0x58, 0x58, 0x3c, /* data */ - 0xe4, 0xd2, 0x81, 0xe0, /* data */ -}; - -static const uint8_t prg_stage_fail[] = { - 0x81, 0x01, 0x00, 0x14, /* opcode: LOAD v0, #<20B data> */ - 0xc0, 0x32, 0xad, 0xc1, 0xff, 0x62, 0x9c, 0x9b, /* data */ - 0x66, 0xf2, 0x27, 0x49, 0xad, 0x66, 0x7e, 0x6b, /* data */ - 0xea, 0xdf, 0x14, 0x4b, /* data */ - 0x81, 0x42, 0x30, 0x00, /* opcode: LOAD PCR3, v0 */ - 0x81, 0x42, 0x40, 0x00, /* opcode: LOAD PCR4, v0 */ -}; - static const uint8_t vendor[] = "Guntermann & Drunck";
- /** * @brief read a bunch of data from MMC into memory. * @@ -1013,6 +988,30 @@ static int first_stage_init(void) #endif
#ifdef CCDM_SECOND_STAGE +static const uint8_t prg_stage2_prepare[] = { + 0x00, 0x80, 0x00, 0x00, /* opcode: SYNC PCR0 */ + 0x00, 0x84, 0x00, 0x00, /* opcode: SYNC PCR1 */ + 0x00, 0x88, 0x00, 0x00, /* opcode: SYNC PCR2 */ + 0x00, 0x8c, 0x00, 0x00, /* opcode: SYNC PCR3 */ + 0x00, 0x90, 0x00, 0x00, /* opcode: SYNC PCR4 */ +}; + +static const uint8_t prg_stage2_success[] = { + 0x81, 0x02, 0x40, 0x14, /* opcode: LOAD PCR4, #<20B data> */ + 0x48, 0xfd, 0x95, 0x17, 0xe7, 0x54, 0x6b, 0x68, /* data */ + 0x92, 0x31, 0x18, 0x05, 0xf8, 0x58, 0x58, 0x3c, /* data */ + 0xe4, 0xd2, 0x81, 0xe0, /* data */ +}; + +static const uint8_t prg_stage_fail[] = { + 0x81, 0x01, 0x00, 0x14, /* opcode: LOAD v0, #<20B data> */ + 0xc0, 0x32, 0xad, 0xc1, 0xff, 0x62, 0x9c, 0x9b, /* data */ + 0x66, 0xf2, 0x27, 0x49, 0xad, 0x66, 0x7e, 0x6b, /* data */ + 0xea, 0xdf, 0x14, 0x4b, /* data */ + 0x81, 0x42, 0x30, 0x00, /* opcode: LOAD PCR3, v0 */ + 0x81, 0x42, 0x40, 0x00, /* opcode: LOAD PCR4, v0 */ +}; + static int second_stage_init(void) { static const char mac_suffix[] = ".mac";

On Mon, May 08, 2017 at 10:14:26PM -0400, Tom Rini wrote:
The variables prg_stage2_prepare, prg_stage2_success and prg_stage_fail are only referenced when CCDM_SECOND_STAGE is set, move these to be by the existing guard.
Cc: Dirk Eibach eibach@gdsys.de Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set, add a gaurd. The variable gpio_pads is never referenced, drop it. The variable usdhc4_pads are only referenced when we do not have CONFIG_CMD_NAND set and we are not doing an SPL build, modify the existing guard.
Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com --- board/phytec/pcm058/pcm058.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c index c3607daf4605..3dc8cbd6a50b 100644 --- a/board/phytec/pcm058/pcm058.c +++ b/board/phytec/pcm058/pcm058.c @@ -108,6 +108,7 @@ static iomux_v3_cfg_t const ecspi1_pads[] = { MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL), };
+#ifdef CONFIG_CMD_NAND /* NAND */ static iomux_v3_cfg_t const nfc_pads[] = { MX6_PAD_NANDF_CLE__NAND_CLE | MUX_PAD_CTRL(NAND_PAD_CTRL), @@ -130,11 +131,7 @@ static iomux_v3_cfg_t const nfc_pads[] = { MX6_PAD_NANDF_D7__NAND_DATA07 | MUX_PAD_CTRL(NAND_PAD_CTRL), MX6_PAD_SD4_DAT0__NAND_DQS | MUX_PAD_CTRL(NAND_PAD_CTRL), }; - - -/* GPIOS */ -static iomux_v3_cfg_t const gpios_pads[] = { -}; +#endif
static struct i2c_pads_info i2c_pad_info2 = { .scl = { @@ -167,7 +164,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ };
-#ifndef CONFIG_CMD_NAND +#if !defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD) static iomux_v3_cfg_t const usdhc4_pads[] = { MX6_PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),

On 09/05/2017 04:14, Tom Rini wrote:
The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set, add a gaurd. The variable gpio_pads is never referenced, drop it. The variable usdhc4_pads are only referenced when we do not have CONFIG_CMD_NAND set and we are not doing an SPL build, modify the existing guard.
Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com
board/phytec/pcm058/pcm058.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c index c3607daf4605..3dc8cbd6a50b 100644 --- a/board/phytec/pcm058/pcm058.c +++ b/board/phytec/pcm058/pcm058.c @@ -108,6 +108,7 @@ static iomux_v3_cfg_t const ecspi1_pads[] = { MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL), };
+#ifdef CONFIG_CMD_NAND /* NAND */ static iomux_v3_cfg_t const nfc_pads[] = { MX6_PAD_NANDF_CLE__NAND_CLE | MUX_PAD_CTRL(NAND_PAD_CTRL), @@ -130,11 +131,7 @@ static iomux_v3_cfg_t const nfc_pads[] = { MX6_PAD_NANDF_D7__NAND_DATA07 | MUX_PAD_CTRL(NAND_PAD_CTRL), MX6_PAD_SD4_DAT0__NAND_DQS | MUX_PAD_CTRL(NAND_PAD_CTRL), };
-/* GPIOS */ -static iomux_v3_cfg_t const gpios_pads[] = { -}; +#endif
static struct i2c_pads_info i2c_pad_info2 = { .scl = { @@ -167,7 +164,7 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ };
-#ifndef CONFIG_CMD_NAND +#if !defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD) static iomux_v3_cfg_t const usdhc4_pads[] = { MX6_PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
Reviewed-by: Stefano Babic sbabic@denx.de
Best regards, Stefano

On Mon, May 08, 2017 at 10:14:27PM -0400, Tom Rini wrote:
The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set, add a gaurd. The variable gpio_pads is never referenced, drop it. The variable usdhc4_pads are only referenced when we do not have CONFIG_CMD_NAND set and we are not doing an SPL build, modify the existing guard.
Cc: Stefano Babic sbabic@denx.de Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Stefano Babic sbabic@denx.de
Applied to u-boot/master, thanks!

The variable vga_pads is never referenced, drop.
Cc: Max Krummenacher max.krummenacher@toradex.com Signed-off-by: Tom Rini trini@konsulko.com --- board/toradex/apalis_imx6/apalis_imx6.c | 47 --------------------------------- 1 file changed, 47 deletions(-)
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 09bebeb71b01..45f1d5de3906 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -564,53 +564,6 @@ static iomux_v3_cfg_t const rgb_pads[] = { MX6_PAD_EIM_D31__IPU1_DISP1_DATA20 | MUX_PAD_CTRL(OUTPUT_RGB), };
-static iomux_v3_cfg_t const vga_pads[] = { -#ifdef FOR_DL_SOLO - /* DualLite/Solo doesn't have IPU2 */ - MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK, - MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, - MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, - MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, - MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00, - MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01, - MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02, - MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03, - MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04, - MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05, - MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06, - MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07, - MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08, - MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09, - MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10, - MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11, - MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12, - MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13, - MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14, - MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15, -#else - MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK, - MX6_PAD_DI0_PIN15__IPU2_DI0_PIN15, - MX6_PAD_DI0_PIN2__IPU2_DI0_PIN02, - MX6_PAD_DI0_PIN3__IPU2_DI0_PIN03, - MX6_PAD_DISP0_DAT0__IPU2_DISP0_DATA00, - MX6_PAD_DISP0_DAT1__IPU2_DISP0_DATA01, - MX6_PAD_DISP0_DAT2__IPU2_DISP0_DATA02, - MX6_PAD_DISP0_DAT3__IPU2_DISP0_DATA03, - MX6_PAD_DISP0_DAT4__IPU2_DISP0_DATA04, - MX6_PAD_DISP0_DAT5__IPU2_DISP0_DATA05, - MX6_PAD_DISP0_DAT6__IPU2_DISP0_DATA06, - MX6_PAD_DISP0_DAT7__IPU2_DISP0_DATA07, - MX6_PAD_DISP0_DAT8__IPU2_DISP0_DATA08, - MX6_PAD_DISP0_DAT9__IPU2_DISP0_DATA09, - MX6_PAD_DISP0_DAT10__IPU2_DISP0_DATA10, - MX6_PAD_DISP0_DAT11__IPU2_DISP0_DATA11, - MX6_PAD_DISP0_DAT12__IPU2_DISP0_DATA12, - MX6_PAD_DISP0_DAT13__IPU2_DISP0_DATA13, - MX6_PAD_DISP0_DAT14__IPU2_DISP0_DATA14, - MX6_PAD_DISP0_DAT15__IPU2_DISP0_DATA15, -#endif -}; - static void do_enable_hdmi(struct display_info_t const *dev) { imx_enable_hdmi_phy();

Hi Tom
On Mon, 2017-05-08 at 22:14 -0400, Tom Rini wrote:
The variable vga_pads is never referenced, drop.
Cc: Max Krummenacher max.krummenacher@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Thanks for fixing this. Acked-by: Max Krummenacher max.krummenacher@toradex.com
Max
board/toradex/apalis_imx6/apalis_imx6.c | 47 --------------------------------- 1 file changed, 47 deletions(-)
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 09bebeb71b01..45f1d5de3906 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -564,53 +564,6 @@ static iomux_v3_cfg_t const rgb_pads[] = { MX6_PAD_EIM_D31__IPU1_DISP1_DATA20 | MUX_PAD_CTRL(OUTPUT_RGB), };
-static iomux_v3_cfg_t const vga_pads[] = { -#ifdef FOR_DL_SOLO
- /* DualLite/Solo doesn't have IPU2 */
- MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
- MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15,
- MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02,
- MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03,
- MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
- MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
- MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
- MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
- MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
- MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
- MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
- MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
- MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
- MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
- MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
- MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
- MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
- MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
- MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
- MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
-#else
- MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
- MX6_PAD_DI0_PIN15__IPU2_DI0_PIN15,
- MX6_PAD_DI0_PIN2__IPU2_DI0_PIN02,
- MX6_PAD_DI0_PIN3__IPU2_DI0_PIN03,
- MX6_PAD_DISP0_DAT0__IPU2_DISP0_DATA00,
- MX6_PAD_DISP0_DAT1__IPU2_DISP0_DATA01,
- MX6_PAD_DISP0_DAT2__IPU2_DISP0_DATA02,
- MX6_PAD_DISP0_DAT3__IPU2_DISP0_DATA03,
- MX6_PAD_DISP0_DAT4__IPU2_DISP0_DATA04,
- MX6_PAD_DISP0_DAT5__IPU2_DISP0_DATA05,
- MX6_PAD_DISP0_DAT6__IPU2_DISP0_DATA06,
- MX6_PAD_DISP0_DAT7__IPU2_DISP0_DATA07,
- MX6_PAD_DISP0_DAT8__IPU2_DISP0_DATA08,
- MX6_PAD_DISP0_DAT9__IPU2_DISP0_DATA09,
- MX6_PAD_DISP0_DAT10__IPU2_DISP0_DATA10,
- MX6_PAD_DISP0_DAT11__IPU2_DISP0_DATA11,
- MX6_PAD_DISP0_DAT12__IPU2_DISP0_DATA12,
- MX6_PAD_DISP0_DAT13__IPU2_DISP0_DATA13,
- MX6_PAD_DISP0_DAT14__IPU2_DISP0_DATA14,
- MX6_PAD_DISP0_DAT15__IPU2_DISP0_DATA15,
-#endif -};
static void do_enable_hdmi(struct display_info_t const *dev) { imx_enable_hdmi_phy();

On Mon, May 08, 2017 at 10:14:28PM -0400, Tom Rini wrote:
The variable vga_pads is never referenced, drop.
Cc: Max Krummenacher max.krummenacher@toradex.com Signed-off-by: Tom Rini trini@konsulko.com Acked-by: Max Krummenacher max.krummenacher@toradex.com
Applied to u-boot/master, thanks!

The variable usdhc3_emmc_pads is never referenced, drop.
Cc: Stefan Agner stefan.agner@toradex.com Signed-off-by: Tom Rini trini@konsulko.com --- board/toradex/colibri_imx7/colibri_imx7.c | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index b2b12e451999..e54afa195260 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -111,22 +111,6 @@ static void setup_gpmi_nand(void) } #endif
-static iomux_v3_cfg_t const usdhc3_emmc_pads[] = { - MX7D_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_STROBE__SD3_STROBE | MUX_PAD_CTRL(USDHC_PAD_CTRL), - - MX7D_PAD_SD3_RESET_B__GPIO6_IO11 | MUX_PAD_CTRL(USDHC_PAD_CTRL), -}; - #ifdef CONFIG_VIDEO_MXS static iomux_v3_cfg_t const lcd_pads[] = { MX7D_PAD_LCD_CLK__LCD_CLK | MUX_PAD_CTRL(LCD_PAD_CTRL),

On Mon, May 08, 2017 at 10:14:29PM -0400, Tom Rini wrote:
The variable usdhc3_emmc_pads is never referenced, drop.
Cc: Stefan Agner stefan.agner@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variables SEQ_SWRESET, SEQ_ELVSS_ON, SEQ_TEMP_SWIRE, SEQ_APON and SEQ_SLPIN are unreferenced, drop.
Cc: Anatolij Gustschin agust@denx.de Signed-off-by: Tom Rini trini@konsulko.com --- drivers/video/ld9040.c | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/drivers/video/ld9040.c b/drivers/video/ld9040.c index 23fe783c8844..8a90c25797e8 100644 --- a/drivers/video/ld9040.c +++ b/drivers/video/ld9040.c @@ -10,10 +10,6 @@ #include <common.h> #include <spi.h>
-static const unsigned char SEQ_SWRESET[] = { - 0x01, -}; - static const unsigned char SEQ_USER_SETTING[] = { 0xF0, 0x5A, 0x5A }; @@ -22,10 +18,6 @@ static const unsigned char SEQ_ELVSS_ON[] = { 0xB1, 0x0D, 0x00, 0x16, };
-static const unsigned char SEQ_TEMP_SWIRE[] = { - 0xB2, 0x06, 0x06, 0x06, 0x06, -}; - static const unsigned char SEQ_GTCON[] = { 0xF7, 0x09, 0x00, 0x00, }; @@ -46,10 +38,6 @@ static const unsigned char SEQ_GAMMA_CTRL[] = { 0xFB, 0x02, 0x5A, };
-static const unsigned char SEQ_APON[] = { - 0xF3, 0x00, 0x00, 0x00, 0x0A, 0x02, -}; - static const unsigned char SEQ_DISPCTL[] = { 0xF2, 0x02, 0x08, 0x08, 0x10, 0x10, }; @@ -66,10 +54,6 @@ static const unsigned char SEQ_SLPOUT[] = { 0x11, };
-static const unsigned char SEQ_SLPIN[] = { - 0x10, -}; - static const unsigned char SEQ_DISPON[] = { 0x29, };

On Mon, May 08, 2017 at 10:14:30PM -0400, Tom Rini wrote:
The variables SEQ_SWRESET, SEQ_ELVSS_ON, SEQ_TEMP_SWIRE, SEQ_APON and SEQ_SLPIN are unreferenced, drop.
Cc: Anatolij Gustschin agust@denx.de Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variable i82557_config_cmd is never referenced, drop.
Cc: Joe Hershberger joe.hershberger@ni.com Signed-off-by: Tom Rini trini@konsulko.com --- drivers/net/eepro100.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 0f350cba53e6..33d9fd6a57fd 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -207,12 +207,6 @@ static int tx_threshold; * There are so many options that it would be difficult to document * each bit. We mostly use the default or recommended settings. */ -static const char i82557_config_cmd[] = { - 22, 0x08, 0, 0, 0, 0, 0x32, 0x03, 1, /* 1=Use MII 0=Use AUI */ - 0, 0x2E, 0, 0x60, 0, - 0xf2, 0x48, 0, 0x40, 0xf2, 0x80, /* 0x40=Force full-duplex */ - 0x3f, 0x05, -}; static const char i82558_config_cmd[] = { 22, 0x08, 0, 1, 0, 0, 0x22, 0x03, 1, /* 1=Use MII 0=Use AUI */ 0, 0x2E, 0, 0x60, 0x08, 0x88,

On Mon, May 08, 2017 at 10:14:31PM -0400, Tom Rini wrote:
The variable i82557_config_cmd is never referenced, drop.
Cc: Joe Hershberger joe.hershberger@ni.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variable 'res' may be unused uninitialized if our call to mv88e61xx_port_read (register read) fails and we goto the error handling section. In this case we set 'res' to -EIO to indicate why we failed.
Cc: Joe Hershberger joe.hershberger@ni.com Cc: Chris Packham judge.packham@gmail.com Cc: Kevin Smith kevin.smith@elecsyscorp.com Cc: Prafulla Wadaskar prafulla@marvell.com Signed-off-by: Tom Rini trini@konsulko.com --- drivers/net/phy/mv88e61xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c index a2fd1686fc3b..3d2f6b98ad0e 100644 --- a/drivers/net/phy/mv88e61xx.c +++ b/drivers/net/phy/mv88e61xx.c @@ -655,8 +655,10 @@ static int mv88e61xx_read_port_config(struct phy_device *phydev, u8 port) do { val = mv88e61xx_port_read(phydev, port, PORT_REG_STATUS); - if (val < 0) + if (val < 0) { + res = -EIO; goto unforce; + } if (val & PORT_REG_STATUS_LINK) break; } while (--timeout);

On 9/05/2017 2:13 PM, "Tom Rini" trini@konsulko.com wrote:
The variable 'res' may be unused uninitialized if our call to mv88e61xx_port_read (register read) fails and we goto the error handling section. In this case we set 'res' to -EIO to indicate why we failed.
Cc: Joe Hershberger joe.hershberger@ni.com Cc: Chris Packham judge.packham@gmail.com Cc: Kevin Smith kevin.smith@elecsyscorp.com Cc: Prafulla Wadaskar prafulla@marvell.com Signed-off-by: Tom Rini trini@konsulko.com --- drivers/net/phy/mv88e61xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Looks good.
Reviewed-by: Chris Packham judge.packham@gmail.com
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c index a2fd1686fc3b..3d2f6b98ad0e 100644 --- a/drivers/net/phy/mv88e61xx.c +++ b/drivers/net/phy/mv88e61xx.c @@ -655,8 +655,10 @@ static int mv88e61xx_read_port_config(struct phy_device *phydev, u8 port) do { val = mv88e61xx_port_read(phydev, port, PORT_REG_STATUS); - if (val < 0) + if (val < 0) { + res = -EIO; goto unforce; + } if (val & PORT_REG_STATUS_LINK) break; } while (--timeout); -- 1.9.1

On Mon, May 08, 2017 at 10:14:32PM -0400, Tom Rini wrote:
The variable 'res' may be unused uninitialized if our call to mv88e61xx_port_read (register read) fails and we goto the error handling section. In this case we set 'res' to -EIO to indicate why we failed.
Cc: Joe Hershberger joe.hershberger@ni.com Cc: Chris Packham judge.packham@gmail.com Cc: Kevin Smith kevin.smith@elecsyscorp.com Cc: Prafulla Wadaskar prafulla@marvell.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The variable netdev_ethtool_ops is not referenced, drop it. However with gcc-6 or later we fail to even compile as we do not have the required struct definition in U-Boot.
Cc: Joe Hershberger joe.hershberger@ni.com Signed-off-by: Tom Rini trini@konsulko.com --- drivers/net/uli526x.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c index 47cdb858c773..d05ae9ea0cfd 100644 --- a/drivers/net/uli526x.c +++ b/drivers/net/uli526x.c @@ -166,7 +166,6 @@ static int mode = 8;
/* function declaration -- */ static int uli526x_start_xmit(struct eth_device *dev, void *packet, int length); -static const struct ethtool_ops netdev_ethtool_ops; static u16 read_srom_word(long, int); static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); static void allocate_rx_buffer(struct uli526x_board_info *);

On Mon, May 08, 2017 at 10:14:33PM -0400, Tom Rini wrote:
The variable netdev_ethtool_ops is not referenced, drop it. However with gcc-6 or later we fail to even compile as we do not have the required struct definition in U-Boot.
Cc: Joe Hershberger joe.hershberger@ni.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

With gcc-6 and later we may get a warning such as: .../common/cli_readline.c:20:21: warning: ‘tab_seq’ defined but not used [-Wunused-const-variable=] static const char tab_seq[] = " "; /* used to expand TABs */ ^~~~~~~ .../common/cli_readline.c:19:19: warning: ‘erase_seq’ defined but not used [-Wunused-const-variable=] static const char erase_seq[] = "\b \b"; /* erase sequence */ ^~~~~~~~~
Because in SPL we're normally not doing interactive commands anyhow, so lets just not compile this at all in SPL. This also means that we need to correct the logic (and comment) about what the drivers/ddr/fsl/ and CONFIG_FSL_DDR_INTERACTIVE requires and this will be included in SPL there.
Signed-off-by: Tom Rini trini@konsulko.com --- common/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/common/Makefile b/common/Makefile index 86225f1564bf..67035c3091a9 100644 --- a/common/Makefile +++ b/common/Makefile @@ -85,6 +85,7 @@ obj-$(CONFIG_SCSI) += scsi.o obj-$(CONFIG_UPDATE_TFTP) += update.o obj-$(CONFIG_DFU_TFTP) += update.o obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o +obj-$(CONFIG_CMDLINE) += cli_readline.o cli_simple.o
endif # !CONFIG_SPL_BUILD
@@ -168,11 +169,9 @@ endif ifdef CONFIG_CMD_EEPROM_LAYOUT obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o endif -# We always have this since drivers/ddr/fs/interactive.c needs it -obj-$(CONFIG_CMDLINE) += cli_simple.o
obj-y += cli.o -obj-$(CONFIG_CMDLINE) += cli_readline.o +obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o obj-$(CONFIG_CMD_DFU) += dfu.o obj-y += command.o obj-y += s_record.o

On Mon, May 08, 2017 at 10:14:34PM -0400, Tom Rini wrote:
With gcc-6 and later we may get a warning such as: .../common/cli_readline.c:20:21: warning: ‘tab_seq’ defined but not used [-Wunused-const-variable=] static const char tab_seq[] = " "; /* used to expand TABs */ ^~~~~~~ .../common/cli_readline.c:19:19: warning: ‘erase_seq’ defined but not used [-Wunused-const-variable=] static const char erase_seq[] = "\b \b"; /* erase sequence */ ^~~~~~~~~
Because in SPL we're normally not doing interactive commands anyhow, so lets just not compile this at all in SPL. This also means that we need to correct the logic (and comment) about what the drivers/ddr/fsl/ and CONFIG_FSL_DDR_INTERACTIVE requires and this will be included in SPL there.
Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

The function 'spin_wheel' is declared as inline, but not static and thus we see warnings that 'w' and 'p' are declared static in a non-static inline function. Correct this by marking spin_wheel as static inline.
Cc: TsiChung Liew Tsi-Chung.Liew@freescale.com Signed-off-by: Tom Rini trini@konsulko.com --- board/freescale/m5253demo/flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index 071701d23436..099decabb892 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -31,7 +31,7 @@ typedef volatile unsigned short FLASH_PORT_WIDTHV; ulong flash_get_size(FPWV * addr, flash_info_t * info); int flash_get_offsets(ulong base, flash_info_t * info); int write_word(flash_info_t * info, FPWV * dest, u16 data); -void inline spin_wheel(void); +static inline void spin_wheel(void);
flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
@@ -439,7 +439,7 @@ int write_word(flash_info_t * info, FPWV * dest, u16 data) return (res); }
-void inline spin_wheel(void) +static inline void spin_wheel(void) { static int p = 0; static char w[] = "\/-";

On Mon, May 08, 2017 at 10:14:35PM -0400, Tom Rini wrote:
The function 'spin_wheel' is declared as inline, but not static and thus we see warnings that 'w' and 'p' are declared static in a non-static inline function. Correct this by marking spin_wheel as static inline.
Cc: TsiChung Liew Tsi-Chung.Liew@freescale.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

On Mon, May 08, 2017 at 10:14:19PM -0400, Tom Rini wrote:
With gcc-6 and later we see a warning about the fact that we have a construct of "if (test);\n\tstatement". Upon reviewing the code, the intention here is as the compiler suggests, we only want to execute the indented statement if the test was true.
Cc: Sergei Poselenov sposelenov@emcraft.com Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (7)
-
Chris Packham
-
Christian Gmeiner
-
Max Krummenacher
-
Peng Fan
-
Simon Glass
-
Stefano Babic
-
Tom Rini