Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756119Ab2BYKN0 (ORCPT ); Sat, 25 Feb 2012 05:13:26 -0500 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 Authentication-Results: mr.google.com; spf=pass (google.com: domain of geert.uytterhoeven@gmail.com designates 10.180.89.71 as permitted sender) smtp.mail=geert.uytterhoeven@gmail.com; dkim=pass header.i=geert.uytterhoeven@gmail.com 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 X-Google-Sender-Auth: 83VwX2zntM4V_D5Pq08rAC93pKU Message-ID: 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 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1410 Lines: 34 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/