Skip to contentSkip to conversation

ARM: mx28: Remove duplicate OCOTP error message

PATCH New Fabio Estevam 4 participants 4 messages Jan 23, 2012 – Jan 26, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mx28: Remove duplicate OCOTP error message

The mxs_get_ocotp() function already prints an error message in the case of a timeout, so no need to print them again in the board files.

---
 arch/arm/mach-mxs/mach-m28evk.c  |    5 +----
 arch/arm/mach-mxs/mach-mx28evk.c |    6 +-----
 2 files changed, 2 insertions(+), 9 deletions(-)
arch/arm/mach-mxs/mach-m28evk.c +1 -4
index 2f27582..eec1257 100644
@@ -247,11 +247,8 @@ static int __init m28evk_fec_get_mac(void)
 	u32 val;
 	const u32 *ocotp = mxs_get_ocotp();
 
-	if (!ocotp) {
-		pr_err("%s: timeout when reading fec mac from OCOTP\n",
-			__func__);
+	if (!ocotp)
 		return -ETIMEDOUT;
-	}
 
 	/*
 	 * OCOTP only stores the last 4 octets for each mac address,
arch/arm/mach-mxs/mach-mx28evk.c +1 -5
index fdb0a56..f1cbf34 100644
@@ -278,7 +278,7 @@ static int __init mx28evk_fec_get_mac(void)
 	const u32 *ocotp = mxs_get_ocotp();
 
 	if (!ocotp)
-		goto error;
+		return -ETIMEDOUT;
 
 	/*
 	 * OCOTP only stores the last 4 octets for each mac address,
@@ -295,10 +295,6 @@ static int __init mx28evk_fec_get_mac(void)
 	}
 
 	return 0;
-
-error:
-	pr_err("%s: timeout when reading fec mac from OCOTP\n", __func__);
-	return -ETIMEDOUT;
 }
 
 /*
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ARM: mx28: Remove duplicate OCOTP error message

Quoted 40 lines

The mxs_get_ocotp() function already prints an error message in the case of a timeout, so no need to print them again in the board files.

---
 arch/arm/mach-mxs/mach-m28evk.c  |    5 +----
 arch/arm/mach-mxs/mach-mx28evk.c |    6 +-----
 2 files changed, 2 insertions(+), 9 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-mxs/mach-m28evk.c index 2f27582..eec1257 100644

arch/arm/mach-mxs/mach-m28evk.c +1 -4
@@ -247,11 +247,8 @@ static int __init m28evk_fec_get_mac(void)
 	u32 val;
 	const u32 *ocotp = mxs_get_ocotp();
 
-	if (!ocotp) {
-		pr_err("%s: timeout when reading fec mac from OCOTP\n",
-			__func__);
+	if (!ocotp)
 		return -ETIMEDOUT;
-	}
 
 	/*
 	 * OCOTP only stores the last 4 octets for each mac address,
(quoted diff) +0 -0

b/arch/arm/mach-mxs/mach-mx28evk.c index fdb0a56..f1cbf34 100644

arch/arm/mach-mxs/mach-mx28evk.c +1 -1
@@ -278,7 +278,7 @@ static int __init mx28evk_fec_get_mac(void)
 	const u32 *ocotp = mxs_get_ocotp();
 
 	if (!ocotp)
-		goto error;
+		return -ETIMEDOUT;
 
 	/*
 	 * OCOTP only stores the last 4 octets for each mac address,

arch/arm/mach-mxs/mach-mx28evk.c static int __init mx28evk_fec_get_mac(void) · line 300

Quoted 10 lines
arch/arm/mach-mxs/mach-mx28evk.c +0 -4
@@ -295,10 +295,6 @@ static int __init mx28evk_fec_get_mac(void)
 	}
 
 	return 0;
-
-error:
-	pr_err("%s: timeout when reading fec mac from OCOTP\n", __func__);
-	return -ETIMEDOUT;
 }
 
 /*

Looks sane :-)

#2 lore raw

PATCH 1/1 ARM: mx28: Remove duplicate OCOTP error message

In reply to Fabio Estevam

arch/arm/mach-mxs/mach-m28evk.c

Quoted 13 lines · Fabio Estevam

The mxs_get_ocotp() function already prints an error message in the case of a timeout, so no need to print them again in the board files.

---
 arch/arm/mach-mxs/mach-m28evk.c  |    5 +----
 arch/arm/mach-mxs/mach-mx28evk.c |    6 +-----
 2 files changed, 2 insertions(+), 9 deletions(-)
arch/arm/mach-mxs/mach-m28evk.c +0 -0
index 2f27582..eec1257 100644
Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
Applied
#3 lore raw

PATCH 1/1 ARM: mx28: Remove duplicate OCOTP error message

In reply to Fabio Estevam
Quoted 4 lines · Fabio Estevam

The mxs_get_ocotp() function already prints an error message in the case of a timeout, so no need to print them again in the board files.

Applied, thanks.

Signature · 2 lines
Regards,
Shawn