lkml.org 
[lkml]   [2019]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2] net: bcmgenet: Generate a random MAC if none is valid
On Tue, 15 Oct 2019 15:32:28 -0700, Scott Branden wrote:
> > @@ -3482,7 +3476,12 @@ static int bcmgenet_probe(struct platform_device *pdev)
> >
> > SET_NETDEV_DEV(dev, &pdev->dev);
> > dev_set_drvdata(&pdev->dev, dev);
> > - ether_addr_copy(dev->dev_addr, macaddr);
> > + if (IS_ERR_OR_NULL(macaddr) || !is_valid_ether_addr(macaddr)) {
> > + dev_warn(&pdev->dev, "using random Ethernet MAC\n");
>
> I would still consider this warrants a dev_err as you should not be
> using the device with a random MAC address assigned to it.  But I'll
> leave it to the "experts" to decide on the print level here.

FWIW I'd stick to warn for this message since this is no longer a hard
failure.

\
 
 \ /
  Last update: 2019-10-16 00:40    [W:0.067 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site