[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211006104911.17779805@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 6 Oct 2021 10:49:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Shannon Nelson <snelson@...sando.io>
Cc: Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
gregkh@...uxfoundation.org, rafael@...nel.org,
saravanak@...gle.com, mw@...ihalf.com, jeremy.linton@....com
Subject: Re: [RFC] fwnode: change the return type of mac address helpers
On Wed, 6 Oct 2021 09:55:59 -0700 Shannon Nelson wrote:
> >>> - if (!device_get_ethdev_addr(dev, ndev))
> >>> + if (device_get_ethdev_addr(dev, ndev))
> >>> eth_hw_addr_random(ndev);
> >> That is going to be interesting for out of tree drivers.
> > Indeed :( But I think it's worth it - I thought it's only device tree
> > that has the usual errno return code but inside eth.c there are also
> > helpers for platform and nvmem mac retrieval which also return errno.
>
> As the maintainer of an out-of-tree driver, this kind of change with
> little warning really can ruin my day.
>
> I understand that as Linux kernel developers we really can't spend much
> time coddling the outer fringe, but we can at least give them hints.
> Changing the sense of the non-zero return from good to bad in several
> functions without something else that the compiler can warn on
> needlessly sets up time bombs for the unsuspecting. Can we find a way
> to break their compile rather than surprise them with a broken runtime?
I also changed the arguments in v2, so OOT will no longer silently
break (not that it was the main motivation ;))
Powered by blists - more mailing lists