]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
Add a way of checking the position of a structure member
authorSimon Glass <sjg@chromium.org>
Tue, 23 Jun 2015 21:38:31 +0000 (15:38 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:36:28 +0000 (13:36 +0200)
commit9e4ffb824df785214205bcb3ac94fec43bc54f86
treed46049dfaca0c6b97f3a36e08158692717b685bb
parenta67d7f953a863e20bbf494890bc94b1aab802c79
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>
include/common.h