devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: mvneta: remove bogus use of device_node.data ptr
@ 2017-07-20 14:27 Rob Herring
  2017-07-20 14:27 ` [PATCH 2/2] of: remove unused struct " Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rob Herring @ 2017-07-20 14:27 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Frank Rowand

Nothing sets ever sets data, so it is always NULL. Remove it as this is
the only user of data ptr in the whole kernel, and it is going to be
removed from struct device_node.

Cc: Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
Probably there's a better fix here to actually enable the h/w buffer 
manager.

I intend to take this thru the DT tree as patch 2 is dependent on this.

Rob

 drivers/net/ethernet/marvell/mvneta.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 0aab74c2a209..5624f4b49f9d 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4296,8 +4296,8 @@ static int mvneta_probe(struct platform_device *pdev)
 
 	/* Obtain access to BM resources if enabled and already initialized */
 	bm_node = of_parse_phandle(dn, "buffer-manager", 0);
-	if (bm_node && bm_node->data) {
-		pp->bm_priv = bm_node->data;
+	if (bm_node) {
+		pp->bm_priv = NULL;
 		err = mvneta_bm_port_init(pdev, pp);
 		if (err < 0) {
 			dev_info(&pdev->dev, "use SW buffer management\n");
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-08-04 15:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-20 14:27 [PATCH 1/2] net: mvneta: remove bogus use of device_node.data ptr Rob Herring
2017-07-20 14:27 ` [PATCH 2/2] of: remove unused struct " Rob Herring
2017-07-20 15:06 ` [PATCH 1/2] net: mvneta: remove bogus use of Gregory CLEMENT
2017-07-20 16:01   ` Marcin Wojtas
2017-07-20 16:02   ` Rob Herring
     [not found]     ` <CAL_JsqKTwju4=J=X1kvk=77fE1VddPh2N-wCi3A0mCAu+Qg1mA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-04 15:26       ` Gregory CLEMENT
2017-08-04 15:49         ` Marcin Wojtas
     [not found] ` <20170720142711.12847-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-20 17:02   ` [PATCH 1/2] net: mvneta: remove bogus use of device_node.data ptr Sergei Shtylyov

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).