controlcenterd_36BIT_SDCARD: Fix unused variable warning
Subsystems (2)
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.
--- board/gdsys/p1022/controlcenterd-id.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-)
board/gdsys/p1022/controlcenterd-id.c +13 -14
@@ -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 ) || (definedCCDM_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 ;
Signature · 1 line
1.9.1
PATCH 2/3 post: Fix unused variable warning on lwmon5
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.
--- post/cpu/ppc4xx/denali_ecc.c | 2 ++ 1 file changed, 2 insertions(+)
post/cpu/ppc4xx/denali_ecc.c +2 -0
@@ -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
Signature · 1 line
1.9.1
PATCH 3/3 clk_rv1108.c: Fix unused variable warning
In reply to Tom RiniThe variables gpll_init_cfg and apll_init_cfg are unused in this file, remove them.
--- drivers/clk/rockchip/clk_rv1108.c | 3 --- 1 file changed, 3 deletions(-)
drivers/clk/rockchip/clk_rv1108.c +0 -3
@@ -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 ;
Signature · 1 line
1.9.1
PATCH 3/3 clk_rv1108.c: Fix unused variable warning
Quoted 10 lines · Tom Rini
The variables
gpll_init_cfgandapll_init_cfgare unused in this file, remove them.Cc Simon Glass <[email protected]>Cc Philipp Tomsich <[email protected]>Signed-off-by Tom Rini <[email protected]>--- drivers/clk/rockchip/clk_rv1108.c | 3 --- 1 file changed, 3 deletions(-)
PATCH 2/3 post: Fix unused variable warning on lwmon5
In reply to Tom RiniQuoted 1 line · Tom Rini
The variable
syndrome_codesis only used when DEBUG is define, add #if
define -> defined
Quoted 4 lines
guards around it in the same style as the rest of the file.
Cc Stefan Roese <[email protected]>Signed-off-by Tom Rini <[email protected]>
Thanks,
Stefan
PATCH 1/3 controlcenterd_36BIT_SDCARD: Fix unused variable warning
In reply to Tom RiniQuoted 6 lines · Tom Rini
On the
controlcenterd_36BIT_SDCARDconfig we get a warning aboutprg_stage1_preparebeing unused. Move the declaration closer to usage and hide under the existing #if tests.Cc Dirk Eibach <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170624/237a0ad2/attachment.sig>
PATCH 2/3 post: Fix unused variable warning on lwmon5
In reply to Tom RiniQuoted 6 lines · Tom Rini
The variable
syndrome_codesis only used when DEBUG is define, add #if guards around it in the same style as the rest of the file.Cc Stefan Roese <[email protected]>Signed-off-by Tom Rini <[email protected]>Reviewed-by Stefan Roese <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170624/8c5f8946/attachment.sig>
PATCH 3/3 clk_rv1108.c: Fix unused variable warning
In reply to Tom RiniQuoted 7 lines · Tom Rini
The variables
gpll_init_cfgandapll_init_cfgare unused in this file, remove them.Cc Simon Glass <[email protected]>Cc Philipp Tomsich <[email protected]>Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170624/c2969c85/attachment.sig>