]> git.dujemihanovic.xyz Git - u-boot.git/commit
headers: don't depend on errno.h being available
authorMax Krummenacher <max.krummenacher@toradex.com>
Thu, 18 Jan 2024 18:10:47 +0000 (19:10 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 24 Jan 2024 16:12:11 +0000 (11:12 -0500)
commite2e69291ee6031eccf50113fdd12099a1a7d44ba
tree0739009b7e6e5bb081e17b38f46734850d196eb5
parentcc7e3d1929342f9beb998933e26ce5e89d52a8fb
headers: don't depend on errno.h being available

These headers follow the pattern:

| #if CONFIG_IS_ENABLED(FANCY_FEATURE)
|   void foo(void);
| #else
|   static inline void foo(void) { return -ENOSYS; }
| #endif

In the #else path ENOSYS is used, however linux/errno.h is not included.
If errno.h has not been included already the compiler errors out even
if the inline function is not referenced.

Make those headers self contained.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 files changed:
include/dfu.h
include/dm/pinctrl.h
include/hwspinlock.h
include/i2c_eeprom.h
include/nvmem.h
include/power-domain.h
include/power/regulator.h
include/remoteproc.h
include/soc.h
include/spi-mem.h
include/sysinfo.h
include/tlv_eeprom.h