Return-path: Received: from mail-we0-f174.google.com ([74.125.82.174]:45103 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039Ab2BYKNX convert rfc822-to-8bit (ORCPT ); Sat, 25 Feb 2012 05:13:23 -0500 MIME-Version: 1.0 In-Reply-To: References: <1330099282-4588-1-git-send-email-danny.kukawka@bisect.de> Date: Sat, 25 Feb 2012 11:13:21 +0100 Message-ID: (sfid-20120225_111336_493830_C2402F17) Subject: Re: [PATCH 00/12] Part 2: check given MAC address, if invalid return -EADDRNOTAVAIL From: Geert Uytterhoeven To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Danny Kukawka , "David S. Miller" , Andy Gospodarek , Guo-Fu Tseng , Petko Manolov , "VMware, Inc." , "John W. Linville" , linux390@de.ibm.com, Mauro Carvalho Chehab , Danny Kukawka , Stephen Hemminger , Joe Perches , Jeff Kirsher , Jiri Pirko , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, libertas-dev@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, linux-hams@vger.kernel.org, linux-mips@linux-mips.org Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: 2012/2/24 Michał Mirosław : > 2012/2/24 Danny Kukawka : >> Second Part of series patches to unifiy the return value of >> .ndo_set_mac_address if the given address isn't valid. >> >> These changes check if a given (MAC) address is valid in >> .ndo_set_mac_address, if invalid return -EADDRNOTAVAIL >> as eth_mac_addr() already does if is_valid_ether_addr() fails. > > Why not just fix dev_set_mac_address() and make do_setlink() use that? BTW, it's also called from dev_set_mac_address(). > Checks are specific to address family, not device model I assume. Indeed, why can't this be done in one single place, instead of sprinkling these checks over all drivers, missing all out-of-tree (note: I don't care) and all soon-to-be-submitted drivers? Gr{oetje,eeting}s,                         Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.                                 -- Linus Torvalds