Re: [PATCH v2] staging: rtl8712: Use ether_addr_copy() instead of memcpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18 May 2015 at 20:08, Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux