lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
From
On 18 May 2015 at 20:08, Dan Carpenter <dan.carpenter@oracle.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.


\
 
 \ /
  Last update: 2015-05-18 18:21    [W:0.039 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site