linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mx28: Remove duplicate OCOTP error message
@ 2012-01-23 15:29 Fabio Estevam
  2012-01-23 15:36 ` Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2012-01-23 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/mach-mxs/mach-m28evk.c  |    5 +----
 arch/arm/mach-mxs/mach-mx28evk.c |    6 +-----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c
index 2f27582..eec1257 100644
--- a/arch/arm/mach-mxs/mach-m28evk.c
+++ b/arch/arm/mach-mxs/mach-m28evk.c
@@ -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,
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index fdb0a56..f1cbf34 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -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;
 }
 
 /*
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: mx28: Remove duplicate OCOTP error message
  2012-01-23 15:29 [PATCH] ARM: mx28: Remove duplicate OCOTP error message Fabio Estevam
@ 2012-01-23 15:36 ` Marek Vasut
  2012-01-23 15:50 ` Stefano Babic
  2012-01-26 12:33 ` Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2012-01-23 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

> 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.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/mach-mxs/mach-m28evk.c  |    5 +----
>  arch/arm/mach-mxs/mach-mx28evk.c |    6 +-----
>  2 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/mach-m28evk.c
> b/arch/arm/mach-mxs/mach-m28evk.c index 2f27582..eec1257 100644
> --- a/arch/arm/mach-mxs/mach-m28evk.c
> +++ b/arch/arm/mach-mxs/mach-m28evk.c
> @@ -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,
> diff --git a/arch/arm/mach-mxs/mach-mx28evk.c
> b/arch/arm/mach-mxs/mach-mx28evk.c index fdb0a56..f1cbf34 100644
> --- a/arch/arm/mach-mxs/mach-mx28evk.c
> +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> @@ -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;
>  }
> 
>  /*

Looks sane :-)

Acked-by: Marek Vasut <marek.vasut@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: mx28: Remove duplicate OCOTP error message
  2012-01-23 15:29 [PATCH] ARM: mx28: Remove duplicate OCOTP error message Fabio Estevam
  2012-01-23 15:36 ` Marek Vasut
@ 2012-01-23 15:50 ` Stefano Babic
  2012-01-26 12:33 ` Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2012-01-23 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 23/01/2012 16:29, Fabio Estevam wrote:
> 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.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/mach-mxs/mach-m28evk.c  |    5 +----
>  arch/arm/mach-mxs/mach-mx28evk.c |    6 +-----
>  2 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c
> index 2f27582..eec1257 100644
> --- a/arch/arm/mach-mxs/mach-m28evk.c
> +++ b/arch/arm/mach-mxs/mach-m28evk.c

Acked-by: Stefano Babic <sbabic@denx.de>

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: mx28: Remove duplicate OCOTP error message
  2012-01-23 15:29 [PATCH] ARM: mx28: Remove duplicate OCOTP error message Fabio Estevam
  2012-01-23 15:36 ` Marek Vasut
  2012-01-23 15:50 ` Stefano Babic
@ 2012-01-26 12:33 ` Shawn Guo
  2 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2012-01-26 12:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 23, 2012 at 01:29:53PM -0200, Fabio Estevam wrote:
> 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.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied, thanks.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-26 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 15:29 [PATCH] ARM: mx28: Remove duplicate OCOTP error message Fabio Estevam
2012-01-23 15:36 ` Marek Vasut
2012-01-23 15:50 ` Stefano Babic
2012-01-26 12:33 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).