[U-Boot] [PATCH 1/3] controlcenterd_36BIT_SDCARD: Fix unused variable warning

On the controlcenterd_36BIT_SDCARD config we get a warning about prg_stage1_prepare being unused. Move the declaration closer to usage and hide under the existing #if tests.
Cc: Dirk Eibach eibach@gdsys.de Signed-off-by: Tom Rini trini@konsulko.com --- board/gdsys/p1022/controlcenterd-id.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index db8a91756373..95f11fb69f36 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -142,20 +142,6 @@ static int hre_err = HRE_E_OK; #define IS_VAR_HREG(spec) (((spec) & 0x38) == 0x10) #define HREG_IDX(spec) ((spec) & (IS_PCR_HREG(spec) ? 0x1f : 0x7))
- -static const uint8_t prg_stage1_prepare[] = { - 0x00, 0x20, 0x00, 0x00, /* opcode: SYNC f0 */ - 0x00, 0x24, 0x00, 0x00, /* opcode: SYNC f1 */ - 0x01, 0x80, 0x00, 0x00, /* opcode: CHECK0 PCR0 */ - 0x81, 0x22, 0x00, 0x00, /* opcode: LOAD PCR0, f0 */ - 0x01, 0x84, 0x00, 0x00, /* opcode: CHECK0 PCR1 */ - 0x81, 0x26, 0x10, 0x00, /* opcode: LOAD PCR1, f1 */ - 0x01, 0x88, 0x00, 0x00, /* opcode: CHECK0 PCR2 */ - 0x81, 0x2a, 0x20, 0x00, /* opcode: LOAD PCR2, f2 */ - 0x01, 0x8c, 0x00, 0x00, /* opcode: CHECK0 PCR3 */ - 0x81, 0x2e, 0x30, 0x00, /* opcode: LOAD PCR3, f3 */ -}; - static const uint8_t vendor[] = "Guntermann & Drunck";
/** @@ -931,6 +917,19 @@ end: #endif
#if defined(CCDM_FIRST_STAGE) || (defined CCDM_AUTO_FIRST_STAGE) +static const uint8_t prg_stage1_prepare[] = { + 0x00, 0x20, 0x00, 0x00, /* opcode: SYNC f0 */ + 0x00, 0x24, 0x00, 0x00, /* opcode: SYNC f1 */ + 0x01, 0x80, 0x00, 0x00, /* opcode: CHECK0 PCR0 */ + 0x81, 0x22, 0x00, 0x00, /* opcode: LOAD PCR0, f0 */ + 0x01, 0x84, 0x00, 0x00, /* opcode: CHECK0 PCR1 */ + 0x81, 0x26, 0x10, 0x00, /* opcode: LOAD PCR1, f1 */ + 0x01, 0x88, 0x00, 0x00, /* opcode: CHECK0 PCR2 */ + 0x81, 0x2a, 0x20, 0x00, /* opcode: LOAD PCR2, f2 */ + 0x01, 0x8c, 0x00, 0x00, /* opcode: CHECK0 PCR3 */ + 0x81, 0x2e, 0x30, 0x00, /* opcode: LOAD PCR3, f3 */ +}; + static int first_stage_actions(void) { int result = 0;

The variable syndrome_codes is only used when DEBUG is define, add #if guards around it in the same style as the rest of the file.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com --- post/cpu/ppc4xx/denali_ecc.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/post/cpu/ppc4xx/denali_ecc.c b/post/cpu/ppc4xx/denali_ecc.c index 1190739ae1a9..ad5e64fbb008 100644 --- a/post/cpu/ppc4xx/denali_ecc.c +++ b/post/cpu/ppc4xx/denali_ecc.c @@ -33,6 +33,7 @@
DECLARE_GLOBAL_DATA_PTR;
+#if defined(DEBUG) const static uint8_t syndrome_codes[] = { 0xF4, 0XF1, 0XEC, 0XEA, 0XE9, 0XE6, 0XE5, 0XE3, 0XDC, 0XDA, 0XD9, 0XD6, 0XD5, 0XD3, 0XCE, 0XCB, @@ -44,6 +45,7 @@ const static uint8_t syndrome_codes[] = { 0X1C, 0X1A, 0X19, 0X16, 0X15, 0X13, 0X0E, 0X0B, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; +#endif
#define ECC_START_ADDR 0x10 #define ECC_STOP_ADDR 0x2000

On 16.06.2017 19:06, Tom Rini wrote:
The variable syndrome_codes is only used when DEBUG is define, add #if
define -> defined
guards around it in the same style as the rest of the file.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan

On Fri, Jun 16, 2017 at 01:06:27PM -0400, Tom Rini wrote:
The variable syndrome_codes is only used when DEBUG is define, add #if guards around it in the same style as the rest of the file.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Stefan Roese sr@denx.de
Applied to u-boot/master, thanks!

The variables gpll_init_cfg and apll_init_cfg are unused in this file, remove them.
Cc: Simon Glass sjg@chromium.org Cc: Philipp Tomsich philipp.tomsich@theobroma-systems.com Signed-off-by: Tom Rini trini@konsulko.com --- drivers/clk/rockchip/clk_rv1108.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c index 0a3ba3bff9f7..818293dfe87a 100644 --- a/drivers/clk/rockchip/clk_rv1108.c +++ b/drivers/clk/rockchip/clk_rv1108.c @@ -40,9 +40,6 @@ enum { "divisors on line " __stringify(__LINE__));
/* use interge mode*/ -static const struct pll_div apll_init_cfg = PLL_DIVISORS(APLL_HZ, 1, 3, 1); -static const struct pll_div gpll_init_cfg = PLL_DIVISORS(GPLL_HZ, 2, 2, 1); - static inline int rv1108_pll_id(enum rk_clk_id clk_id) { int id = 0;

On 16 June 2017 at 11:06, Tom Rini trini@konsulko.com wrote:
The variables gpll_init_cfg and apll_init_cfg are unused in this file, remove them.
Cc: Simon Glass sjg@chromium.org Cc: Philipp Tomsich philipp.tomsich@theobroma-systems.com Signed-off-by: Tom Rini trini@konsulko.com
drivers/clk/rockchip/clk_rv1108.c | 3 --- 1 file changed, 3 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Fri, Jun 16, 2017 at 01:06:28PM -0400, Tom Rini wrote:
The variables gpll_init_cfg and apll_init_cfg are unused in this file, remove them.
Cc: Simon Glass sjg@chromium.org Cc: Philipp Tomsich philipp.tomsich@theobroma-systems.com Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

On Fri, Jun 16, 2017 at 01:06:26PM -0400, Tom Rini wrote:
On the controlcenterd_36BIT_SDCARD config we get a warning about prg_stage1_prepare being unused. Move the declaration closer to usage and hide under the existing #if tests.
Cc: Dirk Eibach eibach@gdsys.de Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (3)
-
Simon Glass
-
Stefan Roese
-
Tom Rini