From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 11 Jul 2014 12:46:22 +0200 Subject: [U-Boot] [PATCH] Ethernet: let user know if there is no valid ethernet address In-Reply-To: <20140711104347.GB4519@amd.pavel.ucw.cz> References: <20140711094213.GA4385@amd.pavel.ucw.cz> <201407111146.56553.marex@denx.de> <20140711104347.GB4519@amd.pavel.ucw.cz> Message-ID: <201407111246.22811.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > > > > > 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