Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757247Ab3HAUzb (ORCPT ); Thu, 1 Aug 2013 16:55:31 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:49350 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752339Ab3HAUza (ORCPT ); Thu, 1 Aug 2013 16:55:30 -0400 Message-ID: <1375390528.2034.77.camel@joe-AO722> Subject: Re: [PATCH V2 3/3] ethernet: Convert mac address uses of 6 to ETH_ALEN From: Joe Perches To: Russell King - ARM Linux Cc: Olof Johansson , Sam Creasey , Grant Grundler , Wan ZongShun , Rajesh Borundia , Network Development , Sony Chacko , "linux-kernel@vger.kernel.org" , Manish Chopra , Don Fry , Ron Mercer , Andrew Gallatin , linux-driver@qlogic.com, Jitendra Kalsaria , "linux-arm-kernel@lists.infradead.org" , Shahed Shaikh Date: Thu, 01 Aug 2013 13:55:28 -0700 In-Reply-To: <20130801203343.GG23006@n2100.arm.linux.org.uk> References: <4170130535e4ea14c66f8510042577be21941f4d.1375387593.git.joe@perches.com> <20130801203343.GG23006@n2100.arm.linux.org.uk> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 41 On Thu, 2013-08-01 at 21:33 +0100, Russell King - ARM Linux wrote: > On Thu, Aug 01, 2013 at 01:31:09PM -0700, Olof Johansson wrote: > > Hi, Hi all. > > On Thu, Aug 1, 2013 at 1:14 PM, Joe Perches wrote: > > > diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.h b/drivers/net/ethernet/pasemi/pasemi_mac.h [] > > > @@ -79,11 +79,11 @@ struct pasemi_mac { > > > int last_cs; > > > int num_cs; > > > u32 dma_if; > > > - u8 type; > > > #define MAC_TYPE_GMAC 1 > > > #define MAC_TYPE_XAUI 2 > > > > > > - u8 mac_addr[6]; > > > + u8 mac_addr[ETH_ALEN]; > > > + u8 type; > > > > Just promote 'type' to u32 instead, saves you from moving the #defines > > down, etc, etc. type is already u8, why change it? That would also change struct size. > There's a more fundamental question which has to be asked: what is the > point of moving that in the first place? Some is__ether_addr tests assume __aligned(2) by a casting char * to u16/be16 * and dereferencing. see patch 0/3 and include/linux/etherdevice.h -- 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/