All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/17] gdsys: P1022: Fix unused variable warnings
Date: Mon,  8 May 2017 22:14:26 -0400	[thread overview]
Message-ID: <1494296075-29477-8-git-send-email-trini@konsulko.com> (raw)
In-Reply-To: <1494296075-29477-1-git-send-email-trini@konsulko.com>

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";
-- 
1.9.1

  parent reply	other threads:[~2017-05-09  2:14 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09  2:14 [U-Boot] [PATCH 01/17] socrates: Fix a misleading indentation warning Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 02/17] rk3036: Fix unused variable warning Tom Rini
2017-05-09  3:19   ` Simon Glass
2017-05-12 17:21   ` [U-Boot] [U-Boot,02/17] " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 03/17] ot1200: " Tom Rini
2017-05-09  9:15   ` Christian Gmeiner
2017-05-12 17:22   ` [U-Boot] [U-Boot,03/17] " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 04/17] cgtqmx6eval: " Tom Rini
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 05/17] mx6slevk: " Tom Rini
2017-05-09  2:36   ` Peng Fan
2017-05-09  7:26   ` Stefano Babic
2017-05-12 17:22   ` [U-Boot] [U-Boot,05/17] " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 06/17] mx6ul_14x14_evk: " Tom Rini
2017-05-09  2:39   ` Peng Fan
2017-05-09  7:26   ` Stefano Babic
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 07/17] gw_ventana: Fix unused variable warnings Tom Rini
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` Tom Rini [this message]
2017-05-12 17:22   ` [U-Boot] [U-Boot, 08/17] gdsys: P1022: " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 09/17] pcm058: " Tom Rini
2017-05-09  7:26   ` Stefano Babic
2017-05-12 17:22   ` [U-Boot] [U-Boot,09/17] " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 10/17] apalis_imx6: Fix unused variable warning Tom Rini
2017-05-09 18:21   ` Max Krummenacher
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 11/17] colibri_imx7: " Tom Rini
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 12/17] video: ld9040: Fix unused variable warnings Tom Rini
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 13/17] net: eepro100: Fix unused variable warning Tom Rini
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 14/17] net: phy: mv88e61xx: Fix uninitialized " Tom Rini
2017-05-09 10:44   ` Chris Packham
2017-05-12 17:22   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 15/17] net: uli526x: Fix unknown storage size error Tom Rini
2017-05-12 17:23   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 16/17] common: Only build cli_readline.o for CMDLINE on non-SPL Tom Rini
2017-05-12 17:23   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-09  2:14 ` [U-Boot] [PATCH 17/17] m5253demo: Fix static variable in non-static inline function warning Tom Rini
2017-05-12 17:23   ` [U-Boot] [U-Boot, " Tom Rini
2017-05-12 17:21 ` [U-Boot] [U-Boot, 01/17] socrates: Fix a misleading indentation warning Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494296075-29477-8-git-send-email-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.