From: "Bjørn Mork" <bjorn@mork.no>
To: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, sowmini.varadhan@oracle.com
Subject: Re: [PATCH v2] net: Add eth_platform_get_mac_address() helper.
Date: Thu, 07 Jan 2016 00:26:37 +0100 [thread overview]
Message-ID: <87vb76b87m.fsf@nemi.mork.no> (raw)
In-Reply-To: <1452121966.24575.52.camel@perches.com> (Joe Perches's message of "Wed, 06 Jan 2016 15:12:46 -0800")
Joe Perches <joe@perches.com> writes:
> On Wed, 2016-01-06 at 16:33 -0500, David Miller wrote:
>> A repeating pattern in drivers has become to use OF node information
>> and, if not found, platform specific host information to extract the
>> ethernet address for a given device.
> []
>> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> []
>> @@ -485,3 +487,32 @@ static int __init eth_offload_init(void)
>> }
>>
>> fs_initcall(eth_offload_init);
>> +
>> +unsigned char * __weak arch_get_platform_mac_address(void)
>> +{
>> + return NULL;
>
> WARN_ON_ONCE ?
That would prevent a driver from using this with additional fallback
methods. For what reason?
I don't have a specific usecase, but I can imagine drivers falling back
to e.g a random address without wanting to be noisy about it.
Bjørn
next prev parent reply other threads:[~2016-01-06 23:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 21:33 [PATCH v2] net: Add eth_platform_get_mac_address() helper David Miller
2016-01-06 21:45 ` Sowmini Varadhan
2016-01-06 23:12 ` Joe Perches
2016-01-06 23:26 ` Bjørn Mork [this message]
2016-01-06 23:32 ` Joe Perches
2016-01-06 23:41 ` Bjørn Mork
2016-01-07 0:01 ` David Miller
2016-01-07 0:02 ` Joe Perches
2016-01-13 0:49 ` Sowmini Varadhan
2016-01-13 0:59 ` Kirsher, Jeffrey T
2016-01-13 2:40 ` David Miller
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=87vb76b87m.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=sowmini.varadhan@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).