All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] 83xx: mpc8315erdb: fix silly thinko in fdt_tsec1_fixup
Date: Thu, 10 Jul 2008 17:20:51 +0400	[thread overview]
Message-ID: <20080710132051.GA10557@polina.dev.rtsoft.ru> (raw)
In-Reply-To: <20080708170004.GB28027@polina.dev.rtsoft.ru>

The thinko was quite silly indeed, I messed with !ptr. Normally this
would trigger some fault, but in U-Boot NULL pointer is equal to phys
0, so the code was working still, just didn't actually test mpc8315erdb
environment variable value. Heh.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---

Kim, sorry for this inconvenience.

 board/freescale/mpc8315erdb/mpc8315erdb.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 7555ffb..3eecee2 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -128,15 +128,16 @@ void fdt_tsec1_fixup(void *fdt, bd_t *bd)
 	const char *path;
 	int ret;
 
-	if (!mpc8315erdb) {
-		if (!strcmp(mpc8315erdb, "tsec1")) {
-			return;
-		} else if (strcmp(mpc8315erdb, "ulpi")) {
-			printf("WARNING: wrong `mpc8315erdb' environment "
-			       "variable specified: `%s'. Should be `ulpi' "
-			       "or `tsec1'.\n", mpc8315erdb);
-			return;
-		}
+	if (!mpc8315erdb)
+		return;
+
+	if (!strcmp(mpc8315erdb, "tsec1")) {
+		return;
+	} else if (strcmp(mpc8315erdb, "ulpi")) {
+		printf("WARNING: wrong `mpc8315erdb' environment "
+		       "variable specified: `%s'. Should be `ulpi' "
+		       "or `tsec1'.\n", mpc8315erdb);
+		return;
 	}
 
 	ret = fdt_path_offset(fdt, "/aliases");
-- 
1.5.5.4

  reply	other threads:[~2008-07-10 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 17:00 [U-Boot-Users] [PATCH 2/2] 83xx: mpc8315erdb: add support for switching between ULPI/UTMI USB PHYs Anton Vorontsov
2008-07-10 13:20 ` Anton Vorontsov [this message]
2008-07-11 18:26   ` [U-Boot-Users] [PATCH] 83xx: mpc8315erdb: fix silly thinko in fdt_tsec1_fixup Kim Phillips

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=20080710132051.GA10557@polina.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.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.