Patchwork [2/2] net: sh-eth: Use pr_err instead of printk

login
register
mail settings
Submitter Nobuhiro Iwamatsu
Date Oct. 16, 2012, 1:17 a.m.
Message ID <1350350279-8693-2-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
Download mbox | patch
Permalink /patch/191696/
State Deferred
Delegated to: David Miller
Headers show

Comments

Nobuhiro Iwamatsu - Oct. 16, 2012, 1:17 a.m.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
 drivers/net/ethernet/renesas/sh_eth.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Simon Horman - Jan. 28, 2013, 1:26 a.m.
[Cc David Miller, linux-sh]

On Tue, Oct 16, 2012 at 10:17:59AM +0900, Nobuhiro Iwamatsu wrote:
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>

Acked-by: Simon Horman <horms+renesas@verge.net.au>

Dave, I know this is an oldie, but it appears to still be a goodie.
Could you consider it for 3.8?

> ---
>  drivers/net/ethernet/renesas/sh_eth.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> index 756d87e..ba97a45 100644
> --- a/drivers/net/ethernet/renesas/sh_eth.c
> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> @@ -598,7 +598,7 @@ static int sh_eth_check_reset(struct net_device *ndev)
>  		cnt--;
>  	}
>  	if (cnt < 0) {
> -		printk(KERN_ERR "Device reset fail\n");
> +		pr_err("Device reset fail\n");
>  		ret = -ETIMEDOUT;
>  	}
>  	return ret;
> @@ -2329,7 +2329,7 @@ static const u16 *sh_eth_get_register_offset(int register_type)
>  		reg_offset = sh_eth_offset_fast_sh3_sh2;
>  		break;
>  	default:
> -		printk(KERN_ERR "Unknown register type (%d)\n", register_type);
> +		pr_err("Unknown register type (%d)\n", register_type);
>  		break;
>  	}
>  
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Jan. 28, 2013, 1:28 a.m.
From: Simon Horman <horms@verge.net.au>
Date: Mon, 28 Jan 2013 10:26:40 +0900

> [Cc David Miller, linux-sh]
> 
> On Tue, Oct 16, 2012 at 10:17:59AM +0900, Nobuhiro Iwamatsu wrote:
>> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Dave, I know this is an oldie, but it appears to still be a goodie.
> Could you consider it for 3.8?

Why would I consider it for 3.8?  We're in critical-but-fix-only
state and this just modifies kernel log messages in what should
be rare error paths, so entirely not appropriate for 3.8
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman - Jan. 28, 2013, 1:41 a.m.
On Sun, Jan 27, 2013 at 08:28:55PM -0500, David Miller wrote:
> From: Simon Horman <horms@verge.net.au>
> Date: Mon, 28 Jan 2013 10:26:40 +0900
> 
> > [Cc David Miller, linux-sh]
> > 
> > On Tue, Oct 16, 2012 at 10:17:59AM +0900, Nobuhiro Iwamatsu wrote:
> >> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> > 
> > Acked-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > Dave, I know this is an oldie, but it appears to still be a goodie.
> > Could you consider it for 3.8?
> 
> Why would I consider it for 3.8?  We're in critical-but-fix-only
> state and this just modifies kernel log messages in what should
> be rare error paths, so entirely not appropriate for 3.8

Sorry, I'll repost it for 3.9 at a later date.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 756d87e..ba97a45 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -598,7 +598,7 @@  static int sh_eth_check_reset(struct net_device *ndev)
 		cnt--;
 	}
 	if (cnt < 0) {
-		printk(KERN_ERR "Device reset fail\n");
+		pr_err("Device reset fail\n");
 		ret = -ETIMEDOUT;
 	}
 	return ret;
@@ -2329,7 +2329,7 @@  static const u16 *sh_eth_get_register_offset(int register_type)
 		reg_offset = sh_eth_offset_fast_sh3_sh2;
 		break;
 	default:
-		printk(KERN_ERR "Unknown register type (%d)\n", register_type);
+		pr_err("Unknown register type (%d)\n", register_type);
 		break;
 	}