[U-Boot] [PATCH v2] cfi_flash: Fix unaligned accesses to cfi_qry structure

Stefan Roese sr at denx.de
Thu May 23 08:16:32 CEST 2013


Hi Albert,

On 05/22/2013 08:50 PM, Albert ARIBAUD wrote:

<snip>

>> @@ -148,10 +152,10 @@ struct cfi_qry {
>>  	u8	block_erase_timeout_max;
>>  	u8	chip_erase_timeout_max;
>>  	u8	dev_size;
>> -	u16	interface_desc;
>> -	u16	max_buf_write_size;
>> +	u16	interface_desc;		/* aligned */
>> +	u16	max_buf_write_size;	/* aligned */
>>  	u8	num_erase_regions;
>> -	u32	erase_region_info[NUM_ERASE_REGIONS];
>> +	u32	erase_region_info[NUM_ERASE_REGIONS];	/* unaligned */
>>  } __attribute__((packed));
>>  
>>  struct cfi_pri_hdr {
> 
> Reviewed-By: Albert ARIBAUD <albert.u.boot at aribaud.net>
> 
> Seems ok to me.
> 
> Now, seeing as this is global to all architectures, yet motivated by
> ARM alignment considerations, which repo should this go to?

I'm responsible for cfi-flash. I'll look at it today.

Thanks,
Stefan



More information about the U-Boot mailing list