* [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata
@ 2018-05-30 22:15 Andrew Lunn
2018-05-31 13:51 ` Vivien Didelot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andrew Lunn @ 2018-05-30 22:15 UTC (permalink / raw)
To: David Miller
Cc: Vivien Didelot, Florian Fainelli, dan.carpenter, netdev,
Andrew Lunn
Make it explicit that either device tree is used or platform data. If
neither is available, abort the probe.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 877b7cb0b6f2 ("net: dsa: mv88e6xxx: Add minimal platform_data support")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 12df00f593b7..437cd6eb4faa 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4389,6 +4389,9 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
int port;
int err;
+ if (!np && !pdata)
+ return -EINVAL;
+
if (np)
compat_info = of_device_get_match_data(dev);
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata
2018-05-30 22:15 [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata Andrew Lunn
@ 2018-05-31 13:51 ` Vivien Didelot
2018-05-31 14:12 ` Florian Fainelli
2018-05-31 19:54 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Vivien Didelot @ 2018-05-31 13:51 UTC (permalink / raw)
To: Andrew Lunn, David Miller
Cc: Florian Fainelli, dan.carpenter, netdev, Andrew Lunn
Andrew Lunn <andrew@lunn.ch> writes:
> Make it explicit that either device tree is used or platform data. If
> neither is available, abort the probe.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 877b7cb0b6f2 ("net: dsa: mv88e6xxx: Add minimal platform_data support")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata
2018-05-30 22:15 [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata Andrew Lunn
2018-05-31 13:51 ` Vivien Didelot
@ 2018-05-31 14:12 ` Florian Fainelli
2018-05-31 19:54 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2018-05-31 14:12 UTC (permalink / raw)
To: Andrew Lunn, David Miller; +Cc: Vivien Didelot, dan.carpenter, netdev
On 05/30/2018 03:15 PM, Andrew Lunn wrote:
> Make it explicit that either device tree is used or platform data. If
> neither is available, abort the probe.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 877b7cb0b6f2 ("net: dsa: mv88e6xxx: Add minimal platform_data support")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata
2018-05-30 22:15 [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata Andrew Lunn
2018-05-31 13:51 ` Vivien Didelot
2018-05-31 14:12 ` Florian Fainelli
@ 2018-05-31 19:54 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-05-31 19:54 UTC (permalink / raw)
To: andrew; +Cc: vivien.didelot, f.fainelli, dan.carpenter, netdev
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 31 May 2018 00:15:42 +0200
> Make it explicit that either device tree is used or platform data. If
> neither is available, abort the probe.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 877b7cb0b6f2 ("net: dsa: mv88e6xxx: Add minimal platform_data support")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-31 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-30 22:15 [PATCH net-next] net: dsa: mv88e6xxx: Be explicit about DT or pdata Andrew Lunn
2018-05-31 13:51 ` Vivien Didelot
2018-05-31 14:12 ` Florian Fainelli
2018-05-31 19:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox