netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	patches@linaro.org, netdev@vger.kernel.org,
	"Troy Kisky" <troy.kisky@boundarydevices.com>,
	"Francois Romieu" <romieu@fr.zoreil.com>,
	linux-arm-kernel@lists.infradead.org,
	"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: Re: [PATCH v2 1/3] net/fec: change phy-reset-gpio request warning to debug message
Date: Wed, 21 Sep 2011 13:25:55 +0200	[thread overview]
Message-ID: <20110921112555.GE1966@pengutronix.de> (raw)
In-Reply-To: <1316603432-20032-2-git-send-email-shawn.guo@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]

Hi Shawn,

On Wed, Sep 21, 2011 at 07:10:30PM +0800, Shawn Guo wrote:
> FEC can work without a phy reset on some platforms, which means not
> very platform necessarily have a phy-reset gpio encoded in device tree.
> So it makes more sense to have the phy-reset-gpio request failure as
> a debug message rather than a warning.

Or remove it entirely?

> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/net/ethernet/freescale/fec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
> index 158b82e..a057abf 100644
> --- a/drivers/net/ethernet/freescale/fec.c
> +++ b/drivers/net/ethernet/freescale/fec.c
> @@ -1422,7 +1422,7 @@ static int __devinit fec_reset_phy(struct platform_device *pdev)
>  	phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0);
>  	err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset");
>  	if (err) {
> -		pr_warn("FEC: failed to get gpio phy-reset: %d\n", err);
> +		pr_debug("FEC: failed to get gpio phy-reset: %d\n", err);
>  		return err;

I also wanted to suggested to drop returning the error code, since it is
not an error anymore, strictly speaking. Then I noticed that the caller
does not check the error code. So, this could be added or turn the
function to void?

>  	}
>  	msleep(1);
> -- 
> 1.7.4.1
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-09-21 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 11:10 [PATCH v2 0/3] add fec support for imx6q Shawn Guo
2011-09-21 11:10 ` [PATCH v2 1/3] net/fec: change phy-reset-gpio request warning to debug message Shawn Guo
2011-09-21 11:25   ` Wolfram Sang [this message]
2011-09-21 12:03     ` Shawn Guo
2011-09-21 12:11       ` Wolfram Sang
2011-09-21 12:44         ` Shawn Guo
2011-09-21 12:59           ` Wolfram Sang
2011-09-21 13:18             ` Shawn Guo
2011-09-21 11:10 ` [PATCH v2 2/3] net/fec: fix fec1 check in fec_enet_mii_init() Shawn Guo
2011-09-21 11:10 ` [PATCH v2 3/3] net/fec: add imx6q enet support Shawn Guo
2011-09-21 11:07   ` Fabio Estevam
2011-09-21 11:28     ` Shawn Guo
2011-09-21 11:32   ` Wolfram Sang
2011-09-21 11:58     ` Shawn Guo
2011-09-21 12:26       ` Wolfram Sang

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=20110921112555.GE1966@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=LW@KARO-electronics.de \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=romieu@fr.zoreil.com \
    --cc=shawn.guo@linaro.org \
    --cc=troy.kisky@boundarydevices.com \
    /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;
as well as URLs for NNTP newsgroup(s).