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>
};
struct fru_table {
- bool captured;
struct fru_common_hdr hdr;
struct fru_board_data brd;
+ bool captured;
};
#define FRU_TYPELEN_CODE_MASK 0xC0
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;