commit | d61718b761a1fb178c82d2bfaf3ba6973ce4dd7d | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Tue Jun 23 15:38:31 2015 -0600 |
committer | Simon Glass <sjg@chromium.org> | Tue Jul 21 17:39:21 2015 -0600 |
tree | e15a18816eac5fb476a41696c440af54c31f3414 | |
parent | 06f1c74b176858e9d59d150e6d5f42f46ff5c054 [diff] |
Add a way of checking the position of a structure member U-Boot uses structures for hardware access so it is important that these structures are correct. Add a way of asserting that a structure member is at a particular offset. This can be created using the datasheet for the hardware. This implementation uses Static_assert() since BUILD_BUG_ON() only works within functions. Signed-off-by: Simon Glass <sjg@chromium.org>