mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Remmet <j.remmet@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH] net: eth: Remove ethaddr_param
Date: Thu, 19 Nov 2015 13:58:51 +0100	[thread overview]
Message-ID: <1447937931-15724-1-git-send-email-j.remmet@phytec.de> (raw)

commit d00db554 introduce ethaddr_param. But it is not initialized, so
devinfo fails to show the mac. Remove it and use edev->ethaddr.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
---
 include/net.h | 1 -
 net/eth.c     | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/net.h b/include/net.h
index d7a4751..2a37a43 100644
--- a/include/net.h
+++ b/include/net.h
@@ -60,7 +60,6 @@ struct eth_device {
 	IPaddr_t serverip;
 	IPaddr_t netmask;
 	IPaddr_t gateway;
-	char ethaddr_param[6];
 	char ethaddr[6];
 };
 
diff --git a/net/eth.c b/net/eth.c
index 8bfb6b1..fb3f22f 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -285,7 +285,7 @@ static int eth_param_set_ethaddr(struct param_d *param, void *priv)
 {
 	struct eth_device *edev = priv;
 
-	return eth_set_ethaddr(edev, edev->ethaddr_param);
+	return eth_set_ethaddr(edev, edev->ethaddr);
 }
 
 #ifdef CONFIG_OFTREE
@@ -383,7 +383,7 @@ int eth_register(struct eth_device *edev)
 	dev_add_param_ip(dev, "gateway", NULL, NULL, &edev->gateway, edev);
 	dev_add_param_ip(dev, "netmask", NULL, NULL, &edev->netmask, edev);
 	dev_add_param_mac(dev, "ethaddr", eth_param_set_ethaddr, NULL,
-			edev->ethaddr_param, edev);
+			edev->ethaddr, edev);
 
 	if (edev->init)
 		edev->init(edev);
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-11-19 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 12:58 Jan Remmet [this message]
2015-11-20  7:28 ` Sascha Hauer

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=1447937931-15724-1-git-send-email-j.remmet@phytec.de \
    --to=j.remmet@phytec.de \
    --cc=barebox@lists.infradead.org \
    /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