[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD6G_RSt9q4hdj4Zo6w1xXJOE0ER_yg874BL1t7cbj2q7HY45Q@mail.gmail.com>
Date: Mon, 18 May 2015 21:34:19 +0530
From: Jagan Teki <jteki@...nedev.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: devel@...verdev.osuosl.org,
Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Larry Finger <Larry.Finger@...inger.net>
Subject: Re: [PATCH v2] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
On 18 May 2015 at 20:08, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> On Mon, May 18, 2015 at 07:47:06PM +0530, Jagan Teki wrote:
>> struct eeprom_priv {
>> u8 bautoload_fail_flag; /* 0 1 */
>> u8 bempty; /* 1 1 */
>> u8 sys_config; /* 2 1 */
>> u8 mac_addr[6]; /* 3 6 */
>> ......
>> };
>
> This means it's not aligned as we want.
Why size upto mac_addr is 9 and is not divisible by 2 is it?
or the mac_addr size is 6 which is divisible by 2 (__align(2))
this is full pahole:
struct eeprom_priv {
u8 bautoload_fail_flag; /* 0 1 */
u8 bempty; /* 1 1 */
u8 sys_config; /* 2 1 */
u8 mac_addr[6]; /* 3 6 */
u8 config0; /* 9 1 */
u16 channel_plan; /* 10 2 */
u8 country_string[3]; /* 12 3 */
u8 tx_power_b[15]; /* 15 15 */
u8 tx_power_g[15]; /* 30 15 */
u8 tx_power_a[201]; /* 45 201 */
/* --- cacheline 3 boundary (192 bytes) was 54 bytes ago --- */
u8 efuse_eeprom_data[256]; /* 246 256 */
/* XXX 2 bytes hole, try to pack */
/* --- cacheline 7 boundary (448 bytes) was 56 bytes ago --- */
enum RT_CUSTOMER_ID CustomerID; /* 504 4 */
/* size: 508, cachelines: 8, members: 12 */
/* sum members: 506, holes: 1, sum holes: 2 */
/* last cacheline: 60 bytes */
};
thanks!
--
Jagan Teki,
Openedev.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists