Commit 5fb093f4 authored by Michal Simek's avatar Michal Simek

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: default avatarMichal Simek <>
parent 072dbc7a
......@@ -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;
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment