All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: fixed_phy: print gpio error only if gpio node is present
@ 2019-07-30  9:46 Hubert Feurstein
  2019-07-30 13:30 ` Andrew Lunn
  2019-07-30 16:55 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Hubert Feurstein @ 2019-07-30  9:46 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: Hubert Feurstein, Andrew Lunn, Florian Fainelli, Heiner Kallweit,
	David S. Miller

It is perfectly ok to not have an gpio attached to the fixed-link node. So
the driver should not throw an error message when the gpio is missing.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 drivers/net/phy/fixed_phy.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 3ffe46df249e..7c5265fd2b94 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -216,8 +216,10 @@ static struct gpio_desc *fixed_phy_get_gpiod(struct device_node *np)
 	if (IS_ERR(gpiod)) {
 		if (PTR_ERR(gpiod) == -EPROBE_DEFER)
 			return gpiod;
-		pr_err("error getting GPIO for fixed link %pOF, proceed without\n",
-		       fixed_link_node);
+
+		if (PTR_ERR(gpiod) != -ENOENT)
+			pr_err("error getting GPIO for fixed link %pOF, proceed without\n",
+			       fixed_link_node);
 		gpiod = NULL;
 	}
 
-- 
2.22.0


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

* Re: [PATCH] net: phy: fixed_phy: print gpio error only if gpio node is present
  2019-07-30  9:46 [PATCH] net: phy: fixed_phy: print gpio error only if gpio node is present Hubert Feurstein
@ 2019-07-30 13:30 ` Andrew Lunn
  2019-07-30 16:55 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-07-30 13:30 UTC (permalink / raw)
  To: Hubert Feurstein
  Cc: netdev, linux-kernel, Florian Fainelli, Heiner Kallweit, David S. Miller

On Tue, Jul 30, 2019 at 11:46:23AM +0200, Hubert Feurstein wrote:
> It is perfectly ok to not have an gpio attached to the fixed-link node. So
> the driver should not throw an error message when the gpio is missing.
> 
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>

Fixes: 5468e82f7034 ("net: phy: fixed-phy: Drop GPIO from fixed_phy_add()")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH] net: phy: fixed_phy: print gpio error only if gpio node is present
  2019-07-30  9:46 [PATCH] net: phy: fixed_phy: print gpio error only if gpio node is present Hubert Feurstein
  2019-07-30 13:30 ` Andrew Lunn
@ 2019-07-30 16:55 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-07-30 16:55 UTC (permalink / raw)
  To: h.feurstein; +Cc: netdev, linux-kernel, andrew, f.fainelli, hkallweit1

From: Hubert Feurstein <h.feurstein@gmail.com>
Date: Tue, 30 Jul 2019 11:46:23 +0200

> It is perfectly ok to not have an gpio attached to the fixed-link node. So
> the driver should not throw an error message when the gpio is missing.
> 
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2019-07-30 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30  9:46 [PATCH] net: phy: fixed_phy: print gpio error only if gpio node is present Hubert Feurstein
2019-07-30 13:30 ` Andrew Lunn
2019-07-30 16:55 ` David Miller

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.