[U-Boot] [PATCH v3 09/54] Add a way of checking the position of a structure member

Simon Glass sjg at chromium.org
Sat Jul 18 01:56:23 CEST 2015


On 23 June 2015 at 15:38, Simon Glass <sjg at chromium.org> wrote:
> 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 at chromium.org>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  include/common.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Applied to u-boot-dm.


More information about the U-Boot mailing list