From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755933AbcBCPYm (ORCPT ); Wed, 3 Feb 2016 10:24:42 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:57126 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753721AbcBCPYl (ORCPT ); Wed, 3 Feb 2016 10:24:41 -0500 From: Arnd Bergmann To: Lubomir Rintel Cc: linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Anholt , Lee Jones , Stephen Warren , Peter Chen Subject: Re: [PATCH 1/2] net/smscx5xx: use the device tree for mac address Date: Wed, 03 Feb 2016 16:23:59 +0100 Message-ID: <2240729.oauKHqo53h@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1454511759-24827-2-git-send-email-lkundrak@v3.sk> References: <1454511759-24827-1-git-send-email-lkundrak@v3.sk> <1454511759-24827-2-git-send-email-lkundrak@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:YbVgAO6Kt6BuCaGFRK6vexAFlOM3en/ejZRxi0i3Jdc+lJCIzVD Vnc+SwFw7jrm7vFMiJ2TIUNsQ8rPymbm8Xzl41/0PcNj2rf/mP2Bhp9bCZnFLXJugd3Zt6f /Z719rjaFQK8VtFgdxs+yIXfU0yLKpX16JFs2n0EAn6DBJgyIPKGk5EucWhOFCvejenlreQ ASDI34ftXfOy7a8FQrbdQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:JLvrpMQIu7Y=:AJGgYm+UU5GVVDqRFK6DfX FkJaiRSZBqpF2+6FvhdbMfMDS+zWeoYvPhavXrQrgAm/4KwjhP19jHv24FkmmrtkDJOnJ/QEr TiOj8xqxIirypLtx3xp6uuoQCWe0thcJvhwaqZHAjadg0lRMQQ3wnBrc9mac/Hl1T1jGq/lTX TLdrhHXUeH0s/1QjQjQAw1lFhspB3+o1lWbNy9E53o5BvHaAS71zGo4TZ2UXAB1Ysy7Gm9bZX 4noV4thwphexZz/yJ0k2wQlyAIbQmPfBvxSfl9mXMP8Sr0fU1O0ExONpdYcoE+/JcQfN0MwII X3ACJDCXsqasY/nMCi1qB9GDCkFZfBLLLRp56qqPemKjAdl9kPlb6sEQzaUeftz7fRw+UBxpW bgI17M8NkWO6LNwjlDwXoUT19bT6W320S+lrzO9Olfvskwil/hEzvUjN5vYcR3N1s7Va07XXO qV0XdI8uyMYNucTnRPqCeB96YCcfT43ES5ElxFVLR1avbgWcV1IeAO7I4Iyovyn9NRBrVLt3F OMiLE4pBQ/0VHYgW68uJiO4gHSsaHR8a1r9cmAPYnCcSJDVGtJ5QlJ/LWp9Ue3WwpMZl0syzr nK2Ym+KzobqpGaDeKBGF483BR+1u93y4azVCFmcIOtsdmW89F2QawLrlY7dSzZV71SoPz4hoV KVUjlNp8KuNgkp3Mz+Xj2eAA55jvtiKzNFLCzk6GN8UCjW1Lqz3w9aGgZmdR3eowtUQUbb3/7 wa936ha+J2yN8Ruy Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 03 February 2016 16:02:38 Lubomir Rintel wrote: > From: Arnd Bergmann > > This takes the MAC address for smsc75xx/smsc95xx USB network devices > from a the device tree. This is required to get a usable persistent > address on the popular beagleboard, whose hardware designers > accidentally forgot that an ethernet device really requires an a > MAC address to be functional. > > The smsc75xx and smsc95xx drivers are just two copies of the > same code, so better fix both. > > Tested-by: Lubomir Rintel > Signed-off-by: Arnd Bergmann > I have no memory of writing this patch, where did you find it? The changelog sounds like I wrote it, so I assume it was me after all. > + address = of_get_property(dev->udev->dev.of_node, > + "local-mac-address", NULL); > + if (address) { > + memcpy(dev->net->dev_addr, address, ETH_ALEN); > + return; > + } This should use of_get_mac_address(), not an open-coded property lookup. The function was probably added after I wrote the the original patch. Arnd