From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Ethernet: let user know if there is no valid ethernet address
Date: Fri, 11 Jul 2014 12:46:22 +0200 [thread overview]
Message-ID: <201407111246.22811.marex@denx.de> (raw)
In-Reply-To: <20140711104347.GB4519@amd.pavel.ucw.cz>
On Friday, July 11, 2014 at 12:43:47 PM, Pavel Machek wrote:
> On Fri 2014-07-11 11:46:56, Marek Vasut wrote:
> > On Friday, July 11, 2014 at 11:42:13 AM, Pavel Machek wrote:
> > > When there's no ethernet address available, u-boot currently prints
> > > "could not set ethernet address", but fails to mention that there's no
> > > address it could set. Make it a bit less confusing.
> > >
> > > Signed-off-by: Pavel Machek <pavel@denx.de>
> > >
> > > diff --git a/net/eth.c b/net/eth.c
> > > index 99386e3..b72ae84 100644
> > > --- a/net/eth.c
> > > +++ b/net/eth.c
> > > @@ -179,10 +179,12 @@ int eth_write_hwaddr(struct eth_device *dev,
> > > const char *base_name, dev->name);
> > >
> > > }
> > >
> > > - if (dev->write_hwaddr &&
> > > - !eth_mac_skip(eth_number)) {
> > > - if (!is_valid_ether_addr(dev->enetaddr))
> > > + if (dev->write_hwaddr && !eth_mac_skip(eth_number)) {
> > > + if (!is_valid_ether_addr(dev->enetaddr)) {
> > > + printf("\nError: %s ethernet address not valid: %pM\n",
> > > + dev->name, dev->enetaddr);
> > >
> > > return -1;
> >
> > You might as well return -EINVAL here while at it.
>
> And change two things at once? Too scary :-).
Subsequent patch is welcome.
> > btw. I think I should really NAK you a patch or two, just so you can
> > continue complaining to me about how noone likes you here ;-)
>
> I'm not saying noone likes me. Everybody loves me, especially my horse
> when I bring carrots. Thanks for the reviews. But I still did not get
> any "applied" or "looks good, will apply" responses...
Do you CC those http://www.denx.de/wiki/U-Boot/Custodians people on patches
belonging to their domain?
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-07-11 10:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 9:42 [U-Boot] [PATCH] Ethernet: let user know if there is no valid ethernet address Pavel Machek
2014-07-11 9:46 ` Marek Vasut
2014-07-11 10:43 ` Pavel Machek
2014-07-11 10:46 ` Marek Vasut [this message]
2014-07-11 10:52 ` Pavel Machek
2014-07-11 11:50 ` Marek Vasut
2014-07-14 12:19 ` Pavel Machek
2014-07-11 15:27 ` Wolfgang Denk
2014-07-11 16:32 ` Pavel Machek
2014-07-11 19:13 ` Wolfgang Denk
2014-07-11 20:30 ` Pavel Machek
2014-07-11 21:24 ` Tom Rini
2014-07-12 7:46 ` Wolfgang Denk
2014-07-13 8:27 ` [U-Boot] [PATCHv2] " Pavel Machek
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=201407111246.22811.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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 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.