Skip to content

Commit

Permalink
controlcenterd_36BIT_SDCARD: Fix unused variable warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
  • Loading branch information
trini committed Jun 23, 2017
1 parent 964a34e commit 3a97763
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions board/gdsys/p1022/controlcenterd-id.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";

/**
Expand Down Expand Up @@ -931,6 +917,19 @@ static struct key_program *load_key_chunk(const char *ifname,
#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;
Expand Down

0 comments on commit 3a97763

Please sign in to comment.