Files
u-boot/include
Simon Glass 78aac05eb1 stddef: Avoid warning with clang with offsetof()
Some bright sparks have decided that a cast on a constant cannot be a
constant, so offsetof() produces this warning on clang-10:

include/intel_gnvs.h:113:1: error: static_assert expression is not an
	integral constant expression
check_member(acpi_global_nvs, unused2, GNVS_CHROMEOS_ACPI_OFFSET);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:284:2: note: expanded from macro 'check_member'
        offsetof(struct structure, member) == (offset), \
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/stddef.h:20:32: note: expanded from macro 'offsetof'
                                ^
include/intel_gnvs.h:113:1: note: cast that performs the conversions of
	a reinterpret_cast is ot allowed in a constant expression
include/linux/stddef.h:20:33: note: expanded from macro 'offsetof'

Fix it by using the compiler built-in version, if available. This syncs
the function to the same implementation as Linux v5.16 in this header
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-13 09:13:41 -07:00
..
2022-01-10 14:01:57 -05:00
2021-06-17 09:40:57 +08:00
2021-10-08 15:53:26 -04:00
2021-09-13 18:23:13 -04:00
2021-01-15 14:36:12 -05:00
2021-01-25 21:52:00 +00:00
2021-11-11 19:02:44 -05:00
2021-10-31 12:26:44 -06:00
2021-01-12 10:58:04 +05:30
2021-12-15 12:16:15 -05:00
2021-07-23 13:36:20 -04:00
2021-01-30 14:25:42 -07:00
2021-06-18 10:09:41 +02:00
2021-11-16 14:35:09 -05:00
2021-07-07 19:52:22 -04:00
2021-04-10 08:04:42 -04:00
2020-10-30 10:56:11 -04:00
2021-10-08 15:53:26 -04:00
2021-08-30 14:13:28 -04:00
2021-10-31 08:46:44 -04:00
2021-09-25 09:46:15 -06:00
2021-11-20 10:53:00 +01:00
2021-06-23 08:45:03 -04:00
2022-01-12 09:56:40 +09:00
2021-08-30 14:13:28 -04:00
2021-12-27 08:41:38 -05:00
2021-09-28 12:03:20 -04:00
2021-12-02 08:34:01 +02:00
2021-07-07 19:52:24 -04:00
2021-04-12 17:44:55 -04:00
2021-09-30 08:08:56 -04:00
2021-01-05 16:20:26 -05:00
2021-10-25 17:17:24 -04:00
2021-01-27 17:03:16 -05:00
2021-12-26 23:32:46 +01:00
2021-01-15 14:36:12 -05:00