mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ARM: omap: phytec-phycore-omap4460: Fix compiler warning
Date: Tue, 27 Jun 2017 13:03:46 +0200	[thread overview]
Message-ID: <20170627110346.8208-1-s.hauer@pengutronix.de> (raw)

Use IS_ENABLED() rather than #ifdef to get rid of unused variable
warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/phytec-phycore-omap4460/lowlevel.c | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c b/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c
index 71ab793354..02297adb95 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c
+++ b/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c
@@ -96,19 +96,19 @@ static void noinline pcm049_init_lowlevel(void)
 
 	set_muxconf_regs();
 
-#ifdef CONFIG_1024MB_DDR2RAM
-	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
-	writel(EMIF_SDRAM_CONFIG, OMAP44XX_EMIF1_BASE +
-			EMIF_LPDDR2_MODE_REG_CONFIG);
-	density = (readl(OMAP44XX_EMIF1_BASE + EMIF_LPDDR2_MODE_REG_DATA) &
-			LPDDR2_DENSITY_MASK) >> LPDDR2_DENSITY_SHIFT;
-	if (density == LPDDR2_2G)
-		omap4_ddr_init(&ddr_regs_mt42L128M64_25_400_mhz, &core);
-	else if (density == LPDDR2_4G)
-		omap4_ddr_init(&ddr_regs_mt42L128M64D2LL_25_400_mhz, &core);
-#else
-	omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
-#endif
+	if (IS_ENABLED(CONFIG_1024MB_DDR2RAM)) {
+		omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
+		writel(EMIF_SDRAM_CONFIG, OMAP44XX_EMIF1_BASE +
+		       EMIF_LPDDR2_MODE_REG_CONFIG);
+		density = (readl(OMAP44XX_EMIF1_BASE + EMIF_LPDDR2_MODE_REG_DATA) &
+			   LPDDR2_DENSITY_MASK) >> LPDDR2_DENSITY_SHIFT;
+		if (density == LPDDR2_2G)
+			omap4_ddr_init(&ddr_regs_mt42L128M64_25_400_mhz, &core);
+		else if (density == LPDDR2_4G)
+			omap4_ddr_init(&ddr_regs_mt42L128M64D2LL_25_400_mhz, &core);
+	} else {
+		omap4_ddr_init(&ddr_regs_mt42L64M64_25_400_mhz, &core);
+	}
 
 	/* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
 	if (rev < OMAP4460_ES1_0)
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2017-06-27 11:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20170627110346.8208-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox