mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
fru: common: Switch capture variable with the rest
capture variable is bool which is just one byte and it is just causing unaligned accesses. Better to have it as last entry in the structure. It also simplify offset calculation for initial header copy. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
072dbc7ac5
commit
5fb093f471
|
@ -53,9 +53,9 @@ struct fru_board_data {
|
|||
};
|
||||
|
||||
struct fru_table {
|
||||
bool captured;
|
||||
struct fru_common_hdr hdr;
|
||||
struct fru_board_data brd;
|
||||
bool captured;
|
||||
};
|
||||
|
||||
#define FRU_TYPELEN_CODE_MASK 0xC0
|
||||
|
|
|
@ -217,7 +217,7 @@ int fru_capture(unsigned long addr)
|
|||
|
||||
hdr = (struct fru_common_hdr *)addr;
|
||||
|
||||
memcpy((void *)&fru_data.hdr, (void *)hdr,
|
||||
memcpy((void *)&fru_data, (void *)hdr,
|
||||
sizeof(struct fru_common_hdr));
|
||||
|
||||
fru_data.captured = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user