From a2fd7d70ec72f96e7bae54ef0f90a172898b2720 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 26 Jun 2019 10:33:55 -0400 Subject: [PATCH] cleanup: include/: move misc/util.h to sys/util.h move misc/util.h to sys/util.h and create a shim for backward-compatibility. No functional changes to the headers. A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES. Related to #16539 Signed-off-by: Anas Nashif --- arch/arc/core/cache.c | 2 +- arch/arc/include/kernel_arch_data.h | 2 +- arch/arm/core/cortex_m/scb.c | 2 +- arch/arm/core/cortex_m/vector_table.h | 2 +- arch/nios2/include/kernel_arch_data.h | 2 +- arch/riscv32/include/kernel_arch_data.h | 2 +- arch/x86/core/ia32/cache.c | 2 +- arch/x86/include/kernel_arch_data.h | 4 +- arch/xtensa/core/xtensa_intgen.py | 2 +- arch/xtensa/include/kernel_arch_data.h | 2 +- boards/posix/native_posix/hw_models_top.c | 2 +- boards/posix/native_posix/main.c | 2 +- boards/posix/native_posix/timer_model.c | 2 +- boards/posix/nrf52_bsim/board_soc.h | 2 +- drivers/adc/adc_intel_quark_se_c1000_ss.c | 2 +- drivers/adc/adc_sam_afec.c | 2 +- drivers/audio/tlv320dac310x.c | 2 +- drivers/bluetooth/hci/h4.c | 2 +- drivers/bluetooth/hci/h5.c | 2 +- drivers/bluetooth/hci/ipm_stm32wb.c | 2 +- drivers/bluetooth/hci/spi.c | 2 +- drivers/bluetooth/hci/userchan.c | 2 +- drivers/can/can_stm32.c | 2 +- drivers/clock_control/beetle_clock_control.c | 2 +- drivers/clock_control/clock_stm32_ll_common.c | 2 +- drivers/clock_control/clock_stm32_ll_mp1.c | 2 +- drivers/clock_control/clock_stm32f0_f3.c | 2 +- drivers/clock_control/clock_stm32f1.c | 2 +- drivers/clock_control/clock_stm32f2_f4_f7.c | 2 +- drivers/clock_control/clock_stm32l0_l1.c | 2 +- drivers/clock_control/clock_stm32l4_wb.c | 2 +- drivers/counter/counter_ll_stm32_rtc.c | 2 +- drivers/counter/counter_qmsi_aonpt.c | 2 +- drivers/counter/counter_rtc_qmsi.c | 2 +- drivers/crypto/crypto_ataes132a_priv.h | 2 +- drivers/display/grove_lcd_rgb.c | 2 +- drivers/dma/dma_stm32f4x.c | 2 +- drivers/entropy/entropy_stm32.c | 2 +- drivers/entropy/fake_entropy_native_posix.c | 2 +- drivers/ethernet/eth_dw_priv.h | 2 +- drivers/ethernet/eth_mcux.c | 2 +- drivers/ethernet/eth_sam_gmac.c | 2 +- drivers/ethernet/eth_stm32_hal.c | 2 +- drivers/flash/flash_simulator.c | 2 +- drivers/flash/soc_flash_nios2_qspi.c | 2 +- drivers/flash/soc_flash_qmsi.c | 2 +- drivers/flash/spi_nor.h | 2 +- drivers/gpio/gpio_dw.c | 2 +- drivers/gpio/gpio_esp32.c | 2 +- drivers/gpio/gpio_pcal9535a.c | 2 +- drivers/gpio/gpio_qmsi.c | 2 +- drivers/gpio/gpio_qmsi_ss.c | 2 +- drivers/gpio/gpio_sch.c | 2 +- drivers/gpio/gpio_sifive.c | 2 +- drivers/gpio/gpio_stm32.c | 2 +- drivers/gpio/gpio_sx1509b.c | 2 +- drivers/i2c/i2c_dw.c | 2 +- drivers/i2c/i2c_esp32.c | 2 +- drivers/i2c/i2c_gecko.c | 2 +- drivers/i2c/i2c_imx.c | 2 +- drivers/i2c/i2c_ll_stm32.c | 2 +- drivers/i2c/i2c_ll_stm32_v1.c | 2 +- drivers/i2c/i2c_ll_stm32_v2.c | 2 +- drivers/i2c/i2c_mcux.c | 2 +- drivers/i2c/i2c_nios2.c | 2 +- drivers/i2c/slave/eeprom_slave.c | 2 +- drivers/led/lp3943.c | 2 +- drivers/led/pca9633.c | 2 +- drivers/led_strip/lpd880x.c | 2 +- drivers/led_strip/ws2812.c | 2 +- drivers/net/slip.c | 2 +- drivers/pinmux/pinmux_cc2650.c | 2 +- drivers/pinmux/pinmux_esp32.c | 2 +- drivers/pwm/pwm_qmsi.c | 2 +- drivers/rtc/rtc_ll_stm32.c | 2 +- drivers/rtc/rtc_mcux.c | 2 +- drivers/sensor/adt7420/adt7420.c | 2 +- drivers/sensor/adt7420/adt7420_trigger.c | 2 +- drivers/sensor/adxl362/adxl362_trigger.c | 2 +- drivers/sensor/adxl372/adxl372.h | 2 +- drivers/sensor/adxl372/adxl372_trigger.c | 2 +- drivers/sensor/ak8975/ak8975.c | 2 +- drivers/sensor/amg88xx/amg88xx.c | 2 +- drivers/sensor/amg88xx/amg88xx.h | 2 +- drivers/sensor/amg88xx/amg88xx_trigger.c | 2 +- drivers/sensor/ams_iAQcore/iAQcore.c | 2 +- drivers/sensor/ams_iAQcore/iAQcore.h | 2 +- drivers/sensor/apds9960/apds9960_trigger.c | 2 +- drivers/sensor/bma280/bma280.h | 2 +- drivers/sensor/bma280/bma280_trigger.c | 2 +- drivers/sensor/bmc150_magn/bmc150_magn.h | 2 +- .../sensor/bmc150_magn/bmc150_magn_trigger.c | 2 +- drivers/sensor/bmg160/bmg160.h | 2 +- drivers/sensor/bmi160/bmi160.h | 2 +- drivers/sensor/bmm150/bmm150.h | 2 +- drivers/sensor/ccs811/ccs811.c | 2 +- drivers/sensor/ccs811/ccs811.h | 2 +- drivers/sensor/dht/dht.c | 2 +- drivers/sensor/ens210/ens210.c | 2 +- drivers/sensor/ens210/ens210.h | 2 +- drivers/sensor/fxas21002/fxas21002.c | 2 +- drivers/sensor/fxos8700/fxos8700.c | 2 +- drivers/sensor/hmc5883l/hmc5883l.h | 2 +- drivers/sensor/hmc5883l/hmc5883l_trigger.c | 2 +- drivers/sensor/hp206c/hp206c.h | 2 +- drivers/sensor/hts221/hts221.h | 2 +- drivers/sensor/hts221/hts221_trigger.c | 2 +- drivers/sensor/isl29035/isl29035_trigger.c | 2 +- drivers/sensor/lis2dh/lis2dh.h | 2 +- drivers/sensor/lis2dh/lis2dh_trigger.c | 2 +- drivers/sensor/lis2ds12/lis2ds12_trigger.c | 2 +- drivers/sensor/lis2dw12/lis2dw12.h | 2 +- drivers/sensor/lis2mdl/lis2mdl.h | 2 +- drivers/sensor/lis3mdl/lis3mdl.h | 2 +- drivers/sensor/lis3mdl/lis3mdl_trigger.c | 2 +- drivers/sensor/lps22hb/lps22hb.h | 2 +- drivers/sensor/lps25hb/lps25hb.h | 2 +- drivers/sensor/lsm6ds0/lsm6ds0.h | 2 +- drivers/sensor/lsm6dsl/lsm6dsl.h | 2 +- drivers/sensor/lsm6dsl/lsm6dsl_shub.c | 2 +- drivers/sensor/lsm6dsl/lsm6dsl_trigger.c | 2 +- drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h | 2 +- drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.h | 2 +- drivers/sensor/max44009/max44009.h | 2 +- drivers/sensor/mcp9808/mcp9808.h | 2 +- drivers/sensor/mpu6050/mpu6050.h | 2 +- drivers/sensor/mpu6050/mpu6050_trigger.c | 2 +- drivers/sensor/sht3xd/sht3xd_trigger.c | 2 +- drivers/sensor/sx9500/sx9500_trigger.c | 2 +- drivers/sensor/th02/th02.c | 2 +- drivers/sensor/th02/th02.h | 2 +- drivers/sensor/ti_hdc/ti_hdc.c | 2 +- drivers/sensor/tmp007/tmp007.c | 2 +- drivers/sensor/tmp007/tmp007.h | 2 +- drivers/sensor/tmp007/tmp007_trigger.c | 2 +- drivers/sensor/tmp112/tmp112.c | 2 +- drivers/serial/uart_nrfx_uarte.c | 2 +- drivers/serial/uart_nsim.c | 2 +- drivers/spi/spi_dw.c | 2 +- drivers/spi/spi_ll_stm32.c | 2 +- drivers/timer/rv32m1_lptmr_timer.c | 2 +- drivers/usb/device/usb_dc_stm32.c | 2 +- drivers/usb/device/usb_dw_registers.h | 2 +- ext/hal/ti/simplelink/kernel/zephyr/dpl/dpl.c | 2 +- include/arch/arc/v2/irq.h | 2 +- include/arch/arm/cortex_m/memory_map.h | 2 +- include/arch/riscv32/arch.h | 2 +- include/arch/x86/linker.ld | 2 +- include/bluetooth/bluetooth.h | 2 +- include/bluetooth/gatt.h | 2 +- include/bluetooth/hci.h | 2 +- include/bluetooth/uuid.h | 2 +- include/crypto/cipher.h | 2 +- include/crypto/cipher_structs.h | 2 +- include/data/json.h | 2 +- include/display/mb_display.h | 2 +- include/drivers/rtc.h | 2 +- include/drivers/watchdog.h | 2 +- include/kernel_includes.h | 2 +- include/linker/linker-defs.h | 2 +- include/logging/log_core.h | 2 +- include/misc/util.h | 790 +---------------- include/net/buf.h | 2 +- include/net/ethernet.h | 2 +- include/net/net_ip.h | 2 +- include/ptp_clock.h | 2 +- include/sched_priq.h | 2 +- include/settings/settings.h | 2 +- include/shell/shell.h | 2 +- include/shell/shell_history.h | 2 +- include/sys/list_gen.h | 2 +- include/sys/ring_buffer.h | 2 +- include/sys/util.h | 797 ++++++++++++++++++ include/sys_clock.h | 2 +- kernel/device.c | 2 +- kernel/include/kernel_structs.h | 2 +- kernel/poll.c | 2 +- lib/libc/minimal/source/stdout/prf.c | 2 +- lib/libc/newlib/libc-hooks.c | 2 +- lib/os/json.c | 2 +- samples/basic/button/src/main.c | 2 +- samples/bluetooth/beacon/src/main.c | 2 +- samples/bluetooth/eddystone/src/main.c | 2 +- samples/bluetooth/hci_uart/src/main.c | 2 +- samples/bluetooth/ibeacon/src/main.c | 2 +- samples/bluetooth/scan_adv/src/main.c | 2 +- samples/boards/altera_max10/pio/src/main.c | 2 +- .../environmental_sensing/sensor/src/main.c | 2 +- .../boards/up_squared/gpio_counter/src/main.c | 2 +- samples/drivers/gpio/src/main.c | 2 +- samples/drivers/led_apa102/src/main.c | 2 +- samples/drivers/led_lp3943/src/main.c | 2 +- samples/drivers/led_lp5562/src/main.c | 2 +- samples/drivers/led_lpd8806/src/main.c | 2 +- samples/drivers/led_pca9633/src/main.c | 2 +- samples/drivers/led_ws2812/src/main.c | 2 +- samples/net/nats/src/nats.c | 2 +- samples/sensor/hts221/src/main.c | 2 +- samples/sensor/lsm303dlhc/src/main.c | 2 +- samples/sensor/lsm6dsl/src/main.c | 2 +- samples/sensor/th02/src/main.c | 2 +- samples/shields/x_nucleo_iks01a1/src/main.c | 2 +- samples/shields/x_nucleo_iks01a2/src/main.c | 2 +- samples/subsys/usb/console/src/main.c | 2 +- samples/userspace/shared_mem/src/main.h | 2 +- soc/arc/quark_se_c1000_ss/soc.h | 4 +- soc/arc/snps_arc_iot/soc.h | 4 +- soc/arc/snps_emsk/soc.h | 4 +- soc/arc/snps_nsim/soc.h | 4 +- soc/arm/arm/mps2/soc_registers.h | 2 +- soc/arm/arm/musca_a/soc.h | 2 +- soc/arm/arm/musca_b1/soc.h | 2 +- soc/arm/atmel_sam/common/soc_pmc.c | 2 +- soc/arm/nxp_imx/rt/soc.h | 2 +- soc/arm/nxp_kinetis/k6x/soc.h | 4 +- soc/arm/nxp_kinetis/ke1xf/soc.h | 2 +- soc/arm/nxp_kinetis/kl2x/soc.h | 4 +- soc/arm/nxp_kinetis/kwx/soc.h | 4 +- soc/arm/nxp_lpc/lpc54xxx/soc.h | 2 +- soc/arm/nxp_lpc/lpc55xxx/soc.h | 2 +- soc/arm/silabs_exx32/efm32hg/soc.h | 2 +- soc/arm/silabs_exx32/efm32pg12b/soc.h | 2 +- soc/arm/silabs_exx32/efm32wg/soc.h | 2 +- soc/arm/silabs_exx32/efr32fg1p/soc.h | 2 +- soc/arm/silabs_exx32/efr32mg12p/soc.h | 2 +- soc/arm/ti_lm3s6965/soc.h | 4 +- soc/arm/ti_lm3s6965/sys_arch_reboot.c | 2 +- soc/arm/ti_simplelink/cc2650/soc.h | 2 +- soc/riscv32/openisa_rv32m1/soc.c | 2 +- soc/x86/apollo_lake/soc.h | 2 +- soc/x86/atom/soc.h | 2 +- soc/x86/ia32/soc.h | 2 +- soc/x86/intel_quark/quark_se/soc.h | 2 +- soc/x86/intel_quark/quark_x1000/soc.h | 2 +- soc/xtensa/esp32/include/_soc_inthandlers.h | 2 +- subsys/bluetooth/common/log.c | 2 +- subsys/bluetooth/common/rpa.c | 2 +- subsys/bluetooth/controller/hci/hci.c | 2 +- subsys/bluetooth/controller/hci/hci_driver.c | 2 +- subsys/bluetooth/controller/ll_sw/ctrl.c | 2 +- .../controller/ll_sw/nordic/lll/lll_conn.c | 2 +- .../controller/ll_sw/nordic/lll/lll_master.c | 2 +- .../controller/ll_sw/nordic/lll/lll_slave.c | 2 +- subsys/bluetooth/host/a2dp.c | 2 +- subsys/bluetooth/host/att.c | 2 +- subsys/bluetooth/host/avdtp.c | 2 +- subsys/bluetooth/host/conn.c | 2 +- subsys/bluetooth/host/gatt.c | 2 +- subsys/bluetooth/host/hci_core.c | 2 +- subsys/bluetooth/host/hfp_hf.c | 2 +- subsys/bluetooth/host/keys.c | 2 +- subsys/bluetooth/host/keys_br.c | 2 +- subsys/bluetooth/host/l2cap.c | 2 +- subsys/bluetooth/host/l2cap_br.c | 2 +- subsys/bluetooth/host/mesh/access.c | 2 +- subsys/bluetooth/host/mesh/adv.c | 2 +- subsys/bluetooth/host/mesh/beacon.c | 2 +- subsys/bluetooth/host/mesh/cfg_cli.c | 2 +- subsys/bluetooth/host/mesh/cfg_srv.c | 2 +- subsys/bluetooth/host/mesh/crypto.c | 2 +- subsys/bluetooth/host/mesh/health_cli.c | 2 +- subsys/bluetooth/host/mesh/health_srv.c | 2 +- subsys/bluetooth/host/mesh/net.c | 2 +- subsys/bluetooth/host/mesh/prov.c | 2 +- subsys/bluetooth/host/mesh/settings.c | 2 +- subsys/bluetooth/host/mesh/transport.c | 2 +- subsys/bluetooth/host/rfcomm.c | 2 +- subsys/bluetooth/host/smp.c | 2 +- subsys/bluetooth/host/smp_null.c | 2 +- subsys/disk/disk_access.c | 2 +- subsys/disk/disk_access_flash.c | 2 +- subsys/net/ip/connection.c | 2 +- subsys/net/ip/connection.h | 2 +- subsys/net/ip/net_mgmt.c | 2 +- subsys/net/ip/net_pkt.c | 2 +- subsys/net/ip/trickle.c | 2 +- .../l2/ieee802154/ieee802154_radio_csma_ca.c | 2 +- subsys/net/l2/openthread/openthread.c | 2 +- subsys/net/lib/lwm2m/lwm2m_object.h | 2 +- subsys/net/lib/sockets/sockets_can.c | 2 +- subsys/net/lib/sockets/sockets_packet.c | 2 +- subsys/net/lib/sockets/sockets_tls.c | 2 +- subsys/usb/usb_device.c | 2 +- tests/benchmarks/app_kernel/src/master.h | 2 +- tests/bluetooth/tester/src/bttester.h | 2 +- .../gpio/gpio_basic_api/src/test_gpio.h | 2 +- .../i2c/i2c_slave_api/common/i2c_virtual.c | 2 +- tests/drivers/i2c/i2c_slave_api/src/main.c | 2 +- tests/kernel/fifo/fifo_timeout/src/main.c | 2 +- tests/kernel/mem_pool/mem_pool/src/main.c | 2 +- tests/kernel/mem_protect/userspace/src/main.c | 2 +- tests/kernel/sleep/src/main.c | 2 +- tests/kernel/workq/work_queue/src/main.c | 2 +- tests/misc/util/src/main.c | 2 +- tests/net/lib/mqtt_packet/src/mqtt_packet.c | 2 +- 295 files changed, 1103 insertions(+), 1088 deletions(-) create mode 100644 include/sys/util.h diff --git a/arch/arc/core/cache.c b/arch/arc/core/cache.c index efbb92e3f190da..9c1f5966828e8d 100644 --- a/arch/arc/core/cache.c +++ b/arch/arc/core/cache.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arc/include/kernel_arch_data.h b/arch/arc/include/kernel_arch_data.h index 9d17907e8965cd..616a8c625a0b99 100644 --- a/arch/arc/include/kernel_arch_data.h +++ b/arch/arc/include/kernel_arch_data.h @@ -34,7 +34,7 @@ extern "C" { #include #include #include -#include +#include #include #endif diff --git a/arch/arm/core/cortex_m/scb.c b/arch/arm/core/cortex_m/scb.c index bb3e6a8304e2b6..e0e04ba6bf6a17 100644 --- a/arch/arm/core/cortex_m/scb.c +++ b/arch/arm/core/cortex_m/scb.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include /** diff --git a/arch/arm/core/cortex_m/vector_table.h b/arch/arm/core/cortex_m/vector_table.h index b7495e170fb1c2..850d5c4cb1c155 100644 --- a/arch/arm/core/cortex_m/vector_table.h +++ b/arch/arm/core/cortex_m/vector_table.h @@ -29,7 +29,7 @@ extern "C" { #include #include -#include +#include GTEXT(__start) GTEXT(_vector_table) diff --git a/arch/nios2/include/kernel_arch_data.h b/arch/nios2/include/kernel_arch_data.h index d7a085cb56db86..ae2c7d694335b2 100644 --- a/arch/nios2/include/kernel_arch_data.h +++ b/arch/nios2/include/kernel_arch_data.h @@ -34,7 +34,7 @@ extern "C" { #include #include #include -#include +#include #include #endif diff --git a/arch/riscv32/include/kernel_arch_data.h b/arch/riscv32/include/kernel_arch_data.h index 8768e90ca52ccb..2276556e0bcf3f 100644 --- a/arch/riscv32/include/kernel_arch_data.h +++ b/arch/riscv32/include/kernel_arch_data.h @@ -27,7 +27,7 @@ extern "C" { #ifndef _ASMLANGUAGE #include #include -#include +#include #include #include diff --git a/arch/x86/core/ia32/cache.c b/arch/x86/core/ia32/cache.c index b3c442cf1b787c..8a7830edfc294e 100644 --- a/arch/x86/core/ia32/cache.c +++ b/arch/x86/core/ia32/cache.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/x86/include/kernel_arch_data.h b/arch/x86/include/kernel_arch_data.h index ebb3df1e101759..a3f04f2f4925fd 100644 --- a/arch/x86/include/kernel_arch_data.h +++ b/arch/x86/include/kernel_arch_data.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include #ifndef _ASMLANGUAGE #include @@ -110,7 +110,7 @@ #ifndef _ASMLANGUAGE -#include +#include #ifdef _THREAD_WRAPPER_REQUIRED extern void z_x86_thread_entry_wrapper(k_thread_entry_t entry, diff --git a/arch/xtensa/core/xtensa_intgen.py b/arch/xtensa/core/xtensa_intgen.py index 6985961f89b0f3..21dc4f1c46bbf5 100755 --- a/arch/xtensa/core/xtensa_intgen.py +++ b/arch/xtensa/core/xtensa_intgen.py @@ -94,7 +94,7 @@ def emit_int_handler(ints): # Re-include the core-isa header and be sure our definitions match, for sanity cprint("#include ") -cprint("#include ") +cprint("#include ") cprint("#include ") cprint("") for l in ints_by_lvl: diff --git a/arch/xtensa/include/kernel_arch_data.h b/arch/xtensa/include/kernel_arch_data.h index 3f078ccab07b4a..b544602d54adb6 100644 --- a/arch/xtensa/include/kernel_arch_data.h +++ b/arch/xtensa/include/kernel_arch_data.h @@ -34,7 +34,7 @@ extern "C" { #include #include #include -#include +#include /* Bitmask definitions for the struct k_thread->flags bit field */ diff --git a/boards/posix/native_posix/hw_models_top.c b/boards/posix/native_posix/hw_models_top.c index 3c0843ee7575ee..7e156434b9ee05 100644 --- a/boards/posix/native_posix/hw_models_top.c +++ b/boards/posix/native_posix/hw_models_top.c @@ -21,7 +21,7 @@ #include "posix_soc_if.h" #include "posix_arch_internal.h" #include "sdl_events.h" -#include +#include static u64_t simu_time; /* The actual time as known by the HW models */ diff --git a/boards/posix/native_posix/main.c b/boards/posix/native_posix/main.c index 956a44a328a5b0..a427ff1f265558 100644 --- a/boards/posix/native_posix/main.c +++ b/boards/posix/native_posix/main.c @@ -29,7 +29,7 @@ #include #include "hw_models_top.h" #include -#include "misc/util.h" +#include #include "cmdline.h" void posix_exit(int exit_code) diff --git a/boards/posix/native_posix/timer_model.c b/boards/posix/native_posix/timer_model.c index a4e85de5083bf3..452031ac0089df 100644 --- a/boards/posix/native_posix/timer_model.c +++ b/boards/posix/native_posix/timer_model.c @@ -27,7 +27,7 @@ #include "board_soc.h" #include "zephyr/types.h" #include "posix_trace.h" -#include "misc/util.h" +#include #include "cmdline.h" #include "soc.h" diff --git a/boards/posix/nrf52_bsim/board_soc.h b/boards/posix/nrf52_bsim/board_soc.h index a1226eee3280ec..75a7ee2c7d0c86 100644 --- a/boards/posix/nrf52_bsim/board_soc.h +++ b/boards/posix/nrf52_bsim/board_soc.h @@ -20,7 +20,7 @@ #define _POSIX_NRF52_BOARD_SOC_H #include -#include +#include #include #include diff --git a/drivers/adc/adc_intel_quark_se_c1000_ss.c b/drivers/adc/adc_intel_quark_se_c1000_ss.c index 18fce05d19fa18..72a3f2928e2c4a 100644 --- a/drivers/adc/adc_intel_quark_se_c1000_ss.c +++ b/drivers/adc/adc_intel_quark_se_c1000_ss.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #define ADC_CONTEXT_USES_KERNEL_TIMER #include "adc_context.h" diff --git a/drivers/adc/adc_sam_afec.c b/drivers/adc/adc_sam_afec.c index 43d6abcfb6bae6..f993265bd0640e 100644 --- a/drivers/adc/adc_sam_afec.c +++ b/drivers/adc/adc_sam_afec.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/audio/tlv320dac310x.c b/drivers/audio/tlv320dac310x.c index 67b67ab1c9aa6c..9fd6d0c33e5a0d 100644 --- a/drivers/audio/tlv320dac310x.c +++ b/drivers/audio/tlv320dac310x.c @@ -6,7 +6,7 @@ #include -#include +#include #include #include diff --git a/drivers/bluetooth/hci/h4.c b/drivers/bluetooth/hci/h4.c index b2c51e7191269d..5248c11e05643e 100644 --- a/drivers/bluetooth/hci/h4.c +++ b/drivers/bluetooth/hci/h4.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/bluetooth/hci/h5.c b/drivers/bluetooth/hci/h5.c index 4b6f0c61f34026..3b3ccf45d98435 100644 --- a/drivers/bluetooth/hci/h5.c +++ b/drivers/bluetooth/hci/h5.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/bluetooth/hci/ipm_stm32wb.c b/drivers/bluetooth/hci/ipm_stm32wb.c index ba67ef561102be..a4d14a1979f1d3 100644 --- a/drivers/bluetooth/hci/ipm_stm32wb.c +++ b/drivers/bluetooth/hci/ipm_stm32wb.c @@ -8,7 +8,7 @@ #include -#include +#include #include #include diff --git a/drivers/bluetooth/hci/spi.c b/drivers/bluetooth/hci/spi.c index a04d776a18fc61..534fb860cc6554 100644 --- a/drivers/bluetooth/hci/spi.c +++ b/drivers/bluetooth/hci/spi.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/bluetooth/hci/userchan.c b/drivers/bluetooth/hci/userchan.c index f64b66ed1f7694..1b80dc19d7b85b 100644 --- a/drivers/bluetooth/hci/userchan.c +++ b/drivers/bluetooth/hci/userchan.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/can/can_stm32.c b/drivers/can/can_stm32.c index 8aa5281a93f9ae..dba30db8b0090e 100644 --- a/drivers/can/can_stm32.c +++ b/drivers/can/can_stm32.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/clock_control/beetle_clock_control.c b/drivers/clock_control/beetle_clock_control.c index 46cb04d64b8276..88218747e876d8 100644 --- a/drivers/clock_control/beetle_clock_control.c +++ b/drivers/clock_control/beetle_clock_control.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #define MAINCLK_BASE_FREQ 24000000 diff --git a/drivers/clock_control/clock_stm32_ll_common.c b/drivers/clock_control/clock_stm32_ll_common.c index 5ddd7d03b80eaf..eecf6f9b698dc3 100644 --- a/drivers/clock_control/clock_stm32_ll_common.c +++ b/drivers/clock_control/clock_stm32_ll_common.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "clock_stm32_ll_common.h" diff --git a/drivers/clock_control/clock_stm32_ll_mp1.c b/drivers/clock_control/clock_stm32_ll_mp1.c index c7dcdec96966f9..5211d8df227f49 100644 --- a/drivers/clock_control/clock_stm32_ll_mp1.c +++ b/drivers/clock_control/clock_stm32_ll_mp1.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include /** diff --git a/drivers/clock_control/clock_stm32f0_f3.c b/drivers/clock_control/clock_stm32f0_f3.c index a4f953c55dfee1..9fb0135d63a332 100644 --- a/drivers/clock_control/clock_stm32f0_f3.c +++ b/drivers/clock_control/clock_stm32f0_f3.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "clock_stm32_ll_common.h" diff --git a/drivers/clock_control/clock_stm32f1.c b/drivers/clock_control/clock_stm32f1.c index 79c174da31e2b5..2ed20c010573a7 100644 --- a/drivers/clock_control/clock_stm32f1.c +++ b/drivers/clock_control/clock_stm32f1.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "clock_stm32_ll_common.h" diff --git a/drivers/clock_control/clock_stm32f2_f4_f7.c b/drivers/clock_control/clock_stm32f2_f4_f7.c index a8b3c0e665a221..88c33e821b3971 100644 --- a/drivers/clock_control/clock_stm32f2_f4_f7.c +++ b/drivers/clock_control/clock_stm32f2_f4_f7.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "clock_stm32_ll_common.h" diff --git a/drivers/clock_control/clock_stm32l0_l1.c b/drivers/clock_control/clock_stm32l0_l1.c index 35979ff1a71194..218e60f1fa3ed5 100644 --- a/drivers/clock_control/clock_stm32l0_l1.c +++ b/drivers/clock_control/clock_stm32l0_l1.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "clock_stm32_ll_common.h" diff --git a/drivers/clock_control/clock_stm32l4_wb.c b/drivers/clock_control/clock_stm32l4_wb.c index 9a2ed4352f9a32..2a3345316b5b6b 100644 --- a/drivers/clock_control/clock_stm32l4_wb.c +++ b/drivers/clock_control/clock_stm32l4_wb.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "clock_stm32_ll_common.h" diff --git a/drivers/counter/counter_ll_stm32_rtc.c b/drivers/counter/counter_ll_stm32_rtc.c index e98621df8b2eb8..c8f30acb133d17 100644 --- a/drivers/counter/counter_ll_stm32_rtc.c +++ b/drivers/counter/counter_ll_stm32_rtc.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/counter/counter_qmsi_aonpt.c b/drivers/counter/counter_qmsi_aonpt.c index 86721a657a7d52..4b93298a44eec8 100644 --- a/drivers/counter/counter_qmsi_aonpt.c +++ b/drivers/counter/counter_qmsi_aonpt.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "qm_aon_counters.h" #include "qm_isr.h" diff --git a/drivers/counter/counter_rtc_qmsi.c b/drivers/counter/counter_rtc_qmsi.c index b81d5576803940..abd1a6579e91cd 100644 --- a/drivers/counter/counter_rtc_qmsi.c +++ b/drivers/counter/counter_rtc_qmsi.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "qm_isr.h" #include "qm_rtc.h" diff --git a/drivers/crypto/crypto_ataes132a_priv.h b/drivers/crypto/crypto_ataes132a_priv.h index e62d7aa30f2f55..ef7e21d2a23c9b 100644 --- a/drivers/crypto/crypto_ataes132a_priv.h +++ b/drivers/crypto/crypto_ataes132a_priv.h @@ -10,7 +10,7 @@ #include #include -#include +#include /* Configuration Read Only Registers */ #define ATAES_SERIALNUM_REG 0xF000 diff --git a/drivers/display/grove_lcd_rgb.c b/drivers/display/grove_lcd_rgb.c index b28e4abaa5250e..1c4466725f13b6 100644 --- a/drivers/display/grove_lcd_rgb.c +++ b/drivers/display/grove_lcd_rgb.c @@ -11,7 +11,7 @@ #include #include -#include +#include #define LOG_LEVEL CONFIG_DISPLAY_LOG_LEVEL #include diff --git a/drivers/dma/dma_stm32f4x.c b/drivers/dma/dma_stm32f4x.c index 6d658fe88d5bf2..e0bf00e2eabf73 100644 --- a/drivers/dma/dma_stm32f4x.c +++ b/drivers/dma/dma_stm32f4x.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #define LOG_LEVEL CONFIG_DMA_LOG_LEVEL #include diff --git a/drivers/entropy/entropy_stm32.c b/drivers/entropy/entropy_stm32.c index a6f0eef75b38aa..32ffc451769002 100644 --- a/drivers/entropy/entropy_stm32.c +++ b/drivers/entropy/entropy_stm32.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/entropy/fake_entropy_native_posix.c b/drivers/entropy/fake_entropy_native_posix.c index 2a40f86686afe7..ef1c0088131b4d 100644 --- a/drivers/entropy/fake_entropy_native_posix.c +++ b/drivers/entropy/fake_entropy_native_posix.c @@ -14,7 +14,7 @@ #include "device.h" #include #include "init.h" -#include "misc/util.h" +#include #include #include #include "posix_trace.h" diff --git a/drivers/ethernet/eth_dw_priv.h b/drivers/ethernet/eth_dw_priv.h index 87c04eb10765b0..bd7fb9cdf66e53 100644 --- a/drivers/ethernet/eth_dw_priv.h +++ b/drivers/ethernet/eth_dw_priv.h @@ -12,7 +12,7 @@ #include #endif /* CONFIG_PCI */ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c index e67a4c4f03b0de..bdc8a10d750aa7 100644 --- a/drivers/ethernet/eth_mcux.c +++ b/drivers/ethernet/eth_mcux.c @@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include -#include +#include #include #include #include diff --git a/drivers/ethernet/eth_sam_gmac.c b/drivers/ethernet/eth_sam_gmac.c index 8daac1d3ae78b3..4a2012220127de 100644 --- a/drivers/ethernet/eth_sam_gmac.c +++ b/drivers/ethernet/eth_sam_gmac.c @@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include #include -#include +#include #include #include #include diff --git a/drivers/ethernet/eth_stm32_hal.c b/drivers/ethernet/eth_stm32_hal.c index 124f518a3d6969..6e1bf8533aa1c7 100644 --- a/drivers/ethernet/eth_stm32_hal.c +++ b/drivers/ethernet/eth_stm32_hal.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include #include -#include +#include #include #include #include diff --git a/drivers/flash/flash_simulator.c b/drivers/flash/flash_simulator.c index 2362509cfc5585..628172db2a3f4b 100644 --- a/drivers/flash/flash_simulator.c +++ b/drivers/flash/flash_simulator.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/flash/soc_flash_nios2_qspi.c b/drivers/flash/soc_flash_nios2_qspi.c index f8458c3352e8c7..5c7a97057712a6 100644 --- a/drivers/flash/soc_flash_nios2_qspi.c +++ b/drivers/flash/soc_flash_nios2_qspi.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "flash_priv.h" #include "altera_generic_quad_spi_controller2_regs.h" #include "altera_generic_quad_spi_controller2.h" diff --git a/drivers/flash/soc_flash_qmsi.c b/drivers/flash/soc_flash_qmsi.c index 68369b16cc0bf2..3bf7d33e05ea25 100644 --- a/drivers/flash/soc_flash_qmsi.c +++ b/drivers/flash/soc_flash_qmsi.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include "flash_priv.h" #include "qm_flash.h" diff --git a/drivers/flash/spi_nor.h b/drivers/flash/spi_nor.h index 0fde737ed76f74..6343c64cece44d 100644 --- a/drivers/flash/spi_nor.h +++ b/drivers/flash/spi_nor.h @@ -7,7 +7,7 @@ #ifndef __SPI_NOR_H__ #define __SPI_NOR_H__ -#include +#include #define SPI_NOR_MAX_ID_LEN 3 diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c index bb5e55cce75b7d..6ff4ce97b7d5aa 100644 --- a/drivers/gpio/gpio_dw.c +++ b/drivers/gpio/gpio_dw.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/gpio/gpio_esp32.c b/drivers/gpio/gpio_esp32.c index b0a3ae89215615..ce5a440ad2b239 100644 --- a/drivers/gpio/gpio_esp32.c +++ b/drivers/gpio/gpio_esp32.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "gpio_utils.h" diff --git a/drivers/gpio/gpio_pcal9535a.c b/drivers/gpio/gpio_pcal9535a.c index 8ed265c322d232..74de7b9b02f02b 100644 --- a/drivers/gpio/gpio_pcal9535a.c +++ b/drivers/gpio/gpio_pcal9535a.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/gpio/gpio_qmsi.c b/drivers/gpio/gpio_qmsi.c index d3a2d63b682734..e3dc005bb2328f 100644 --- a/drivers/gpio/gpio_qmsi.c +++ b/drivers/gpio/gpio_qmsi.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "qm_gpio.h" #include "gpio_utils.h" diff --git a/drivers/gpio/gpio_qmsi_ss.c b/drivers/gpio/gpio_qmsi_ss.c index 3184b0efa47aa0..ef3059ea96cb54 100644 --- a/drivers/gpio/gpio_qmsi_ss.c +++ b/drivers/gpio/gpio_qmsi_ss.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include "qm_ss_gpio.h" #include "qm_ss_isr.h" diff --git a/drivers/gpio/gpio_sch.c b/drivers/gpio/gpio_sch.c index a9872ef1d71fee..e5adb24c28a9dd 100644 --- a/drivers/gpio/gpio_sch.c +++ b/drivers/gpio/gpio_sch.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "gpio_sch.h" #include "gpio_utils.h" diff --git a/drivers/gpio/gpio_sifive.c b/drivers/gpio/gpio_sifive.c index a6efc2cce3141a..2f10b7c99321b8 100644 --- a/drivers/gpio/gpio_sifive.c +++ b/drivers/gpio/gpio_sifive.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "gpio_utils.h" diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index a6a3377a44d960..bd979685071e08 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "gpio_stm32.h" diff --git a/drivers/gpio/gpio_sx1509b.c b/drivers/gpio/gpio_sx1509b.c index 291b0649aaee37..cabde4fb164696 100644 --- a/drivers/gpio/gpio_sx1509b.c +++ b/drivers/gpio/gpio_sx1509b.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #ifdef CONFIG_HAS_DTS_I2C #define CONFIG_GPIO_SX1509B_DEV_NAME DT_INST_0_SEMTECH_SX1509B_LABEL diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index dffc70376d2fb4..9e53b9856fcfea 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -20,7 +20,7 @@ #include #include -#include +#include #ifdef CONFIG_IOAPIC #include diff --git a/drivers/i2c/i2c_esp32.c b/drivers/i2c/i2c_esp32.c index 5afdcd92dc5b2e..9af9601aea54aa 100644 --- a/drivers/i2c/i2c_esp32.c +++ b/drivers/i2c/i2c_esp32.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include /* Number of entries in hardware command queue */ diff --git a/drivers/i2c/i2c_gecko.c b/drivers/i2c/i2c_gecko.c index 3f26b843a58d52..73c197ff0cfd75 100644 --- a/drivers/i2c/i2c_gecko.c +++ b/drivers/i2c/i2c_gecko.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/i2c/i2c_imx.c b/drivers/i2c/i2c_imx.c index f8bdd684a1af72..f9d8cb389a56eb 100644 --- a/drivers/i2c/i2c_imx.c +++ b/drivers/i2c/i2c_imx.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include LOG_MODULE_REGISTER(i2c_imx); diff --git a/drivers/i2c/i2c_ll_stm32.c b/drivers/i2c/i2c_ll_stm32.c index edab21d6d0d820..d69e8df28fae4f 100644 --- a/drivers/i2c/i2c_ll_stm32.c +++ b/drivers/i2c/i2c_ll_stm32.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/i2c/i2c_ll_stm32_v1.c b/drivers/i2c/i2c_ll_stm32_v1.c index 5896dad7832d4a..cda136ea40eefd 100644 --- a/drivers/i2c/i2c_ll_stm32_v1.c +++ b/drivers/i2c/i2c_ll_stm32_v1.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/i2c/i2c_ll_stm32_v2.c b/drivers/i2c/i2c_ll_stm32_v2.c index 997498ab05bf52..e5d28a645f5e83 100644 --- a/drivers/i2c/i2c_ll_stm32_v2.c +++ b/drivers/i2c/i2c_ll_stm32_v2.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/i2c/i2c_mcux.c b/drivers/i2c/i2c_mcux.c index 35f4700f513317..1e4ceb91c47817 100644 --- a/drivers/i2c/i2c_mcux.c +++ b/drivers/i2c/i2c_mcux.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include LOG_MODULE_REGISTER(i2c_mcux); diff --git a/drivers/i2c/i2c_nios2.c b/drivers/i2c/i2c_nios2.c index 64a0672a617869..1ff44d03d67148 100644 --- a/drivers/i2c/i2c_nios2.c +++ b/drivers/i2c/i2c_nios2.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include "altera_avalon_i2c.h" diff --git a/drivers/i2c/slave/eeprom_slave.c b/drivers/i2c/slave/eeprom_slave.c index 15a263c729ccf1..eb83989a4e45ba 100644 --- a/drivers/i2c/slave/eeprom_slave.c +++ b/drivers/i2c/slave/eeprom_slave.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include #include #include diff --git a/drivers/led/lp3943.c b/drivers/led/lp3943.c index a38f2d9fbc585b..91298073bbc77b 100644 --- a/drivers/led/lp3943.c +++ b/drivers/led/lp3943.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #define LOG_LEVEL CONFIG_LED_LOG_LEVEL diff --git a/drivers/led/pca9633.c b/drivers/led/pca9633.c index 1ef451c182f266..2bfba681778952 100644 --- a/drivers/led/pca9633.c +++ b/drivers/led/pca9633.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #define LOG_LEVEL CONFIG_LED_LOG_LEVEL diff --git a/drivers/led_strip/lpd880x.c b/drivers/led_strip/lpd880x.c index 9aedd32f915d6d..c2d18166df551c 100644 --- a/drivers/led_strip/lpd880x.c +++ b/drivers/led_strip/lpd880x.c @@ -30,7 +30,7 @@ LOG_MODULE_REGISTER(lpd880x); #include #include #include -#include +#include /* * LPD880X SPI master configuration: diff --git a/drivers/led_strip/ws2812.c b/drivers/led_strip/ws2812.c index 0c43662c536b43..5c7477291811d9 100644 --- a/drivers/led_strip/ws2812.c +++ b/drivers/led_strip/ws2812.c @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(ws2812); #include #include #include -#include +#include /* * WS2812-ish SPI master configuration: diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 1df099fef544fe..d915afad3c7fc1 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -24,7 +24,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include #include -#include +#include #include #include #include diff --git a/drivers/pinmux/pinmux_cc2650.c b/drivers/pinmux/pinmux_cc2650.c index 19c87e7e731ab9..3c255870ac7fe3 100644 --- a/drivers/pinmux/pinmux_cc2650.c +++ b/drivers/pinmux/pinmux_cc2650.c @@ -51,7 +51,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/pinmux/pinmux_esp32.c b/drivers/pinmux/pinmux_esp32.c index beeb9e518b109f..c5ae2b4d5ea487 100644 --- a/drivers/pinmux/pinmux_esp32.c +++ b/drivers/pinmux/pinmux_esp32.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include /* DR_REG_IO_MUX_BASE is a 32-bit constant. Define a pin mux table diff --git a/drivers/pwm/pwm_qmsi.c b/drivers/pwm/pwm_qmsi.c index ca7da986406786..30c5e1fe83a093 100644 --- a/drivers/pwm/pwm_qmsi.c +++ b/drivers/pwm/pwm_qmsi.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "qm_pwm.h" #include "clk.h" diff --git a/drivers/rtc/rtc_ll_stm32.c b/drivers/rtc/rtc_ll_stm32.c index 6afce1847a2c78..260f74075a27d7 100644 --- a/drivers/rtc/rtc_ll_stm32.c +++ b/drivers/rtc/rtc_ll_stm32.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/rtc/rtc_mcux.c b/drivers/rtc/rtc_mcux.c index a2b1dd9fbb326d..061fe82ed00c50 100644 --- a/drivers/rtc/rtc_mcux.c +++ b/drivers/rtc/rtc_mcux.c @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(rtc_mcux); #include #include #include -#include +#include #include struct mcux_rtc_config { diff --git a/drivers/sensor/adt7420/adt7420.c b/drivers/sensor/adt7420/adt7420.c index 0cc26b402f4722..4202643b66b83c 100644 --- a/drivers/sensor/adt7420/adt7420.c +++ b/drivers/sensor/adt7420/adt7420.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/adt7420/adt7420_trigger.c b/drivers/sensor/adt7420/adt7420_trigger.c index 87fb0414afce11..6f2a670362a344 100644 --- a/drivers/sensor/adt7420/adt7420_trigger.c +++ b/drivers/sensor/adt7420/adt7420_trigger.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/adxl362/adxl362_trigger.c b/drivers/sensor/adxl362/adxl362_trigger.c index a0f3b777d81289..eb9d5faf0ab610 100644 --- a/drivers/sensor/adxl362/adxl362_trigger.c +++ b/drivers/sensor/adxl362/adxl362_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/sensor/adxl372/adxl372.h b/drivers/sensor/adxl372/adxl372.h index 1cfa39449a7a95..e76dafdd71fecc 100644 --- a/drivers/sensor/adxl372/adxl372.h +++ b/drivers/sensor/adxl372/adxl372.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include /* * ADXL372 registers definition diff --git a/drivers/sensor/adxl372/adxl372_trigger.c b/drivers/sensor/adxl372/adxl372_trigger.c index 32d8fa1cdaf911..63bdf1741b9ebf 100644 --- a/drivers/sensor/adxl372/adxl372_trigger.c +++ b/drivers/sensor/adxl372/adxl372_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include "adxl372.h" diff --git a/drivers/sensor/ak8975/ak8975.c b/drivers/sensor/ak8975/ak8975.c index 74d9a66c5d4782..f427721445582b 100644 --- a/drivers/sensor/ak8975/ak8975.c +++ b/drivers/sensor/ak8975/ak8975.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include "ak8975.h" diff --git a/drivers/sensor/amg88xx/amg88xx.c b/drivers/sensor/amg88xx/amg88xx.c index 4075cb514f3ffb..1cacdbe3f24274 100644 --- a/drivers/sensor/amg88xx/amg88xx.c +++ b/drivers/sensor/amg88xx/amg88xx.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/amg88xx/amg88xx.h b/drivers/sensor/amg88xx/amg88xx.h index 335001db07ab71..bae7b0e890e5a9 100644 --- a/drivers/sensor/amg88xx/amg88xx.h +++ b/drivers/sensor/amg88xx/amg88xx.h @@ -9,7 +9,7 @@ #include #include -#include +#include #define AMG88XX_I2C_ADDRESS CONFIG_AMG88XX_I2C_ADDR diff --git a/drivers/sensor/amg88xx/amg88xx_trigger.c b/drivers/sensor/amg88xx/amg88xx_trigger.c index 6bb63e88a4e315..d4d3e6be7a9627 100644 --- a/drivers/sensor/amg88xx/amg88xx_trigger.c +++ b/drivers/sensor/amg88xx/amg88xx_trigger.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include "amg88xx.h" diff --git a/drivers/sensor/ams_iAQcore/iAQcore.c b/drivers/sensor/ams_iAQcore/iAQcore.c index e8f477418999cf..07036ecc420c11 100644 --- a/drivers/sensor/ams_iAQcore/iAQcore.c +++ b/drivers/sensor/ams_iAQcore/iAQcore.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/ams_iAQcore/iAQcore.h b/drivers/sensor/ams_iAQcore/iAQcore.h index e66dec2b15fe3f..ae6a6b9a685ab8 100644 --- a/drivers/sensor/ams_iAQcore/iAQcore.h +++ b/drivers/sensor/ams_iAQcore/iAQcore.h @@ -8,7 +8,7 @@ #define ZEPHYR_DRIVERS_SENSOR_AMS_IAQCORE_IAQCORE_H_ #include -#include +#include struct iaq_registers { u16_t co2_pred; diff --git a/drivers/sensor/apds9960/apds9960_trigger.c b/drivers/sensor/apds9960/apds9960_trigger.c index aa53f4a9126fba..093e578af8dc68 100644 --- a/drivers/sensor/apds9960/apds9960_trigger.c +++ b/drivers/sensor/apds9960/apds9960_trigger.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include "apds9960.h" diff --git a/drivers/sensor/bma280/bma280.h b/drivers/sensor/bma280/bma280.h index 11152aece16310..99616a704672fb 100644 --- a/drivers/sensor/bma280/bma280.h +++ b/drivers/sensor/bma280/bma280.h @@ -8,7 +8,7 @@ #define ZEPHYR_DRIVERS_SENSOR_BMA280_BMA280_H_ #include -#include +#include #include #include diff --git a/drivers/sensor/bma280/bma280_trigger.c b/drivers/sensor/bma280/bma280_trigger.c index 8d6f113b00037a..33a0a33451d7bb 100644 --- a/drivers/sensor/bma280/bma280_trigger.c +++ b/drivers/sensor/bma280/bma280_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/sensor/bmc150_magn/bmc150_magn.h b/drivers/sensor/bmc150_magn/bmc150_magn.h index a70cb19afeb800..d3a40db57bad22 100644 --- a/drivers/sensor/bmc150_magn/bmc150_magn.h +++ b/drivers/sensor/bmc150_magn/bmc150_magn.h @@ -11,7 +11,7 @@ #include #include -#include +#include #define BMC150_MAGN_REG_CHIP_ID 0x40 #define BMC150_MAGN_CHIP_ID_VAL 0x32 diff --git a/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c b/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c index 88e8d23925701d..53de5c4e046efe 100644 --- a/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c +++ b/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/sensor/bmg160/bmg160.h b/drivers/sensor/bmg160/bmg160.h index 85e02d630ca03d..a320194b408549 100644 --- a/drivers/sensor/bmg160/bmg160.h +++ b/drivers/sensor/bmg160/bmg160.h @@ -11,7 +11,7 @@ #include #include -#include +#include /* registers */ #define BMG160_REG_CHIPID 0x00 diff --git a/drivers/sensor/bmi160/bmi160.h b/drivers/sensor/bmi160/bmi160.h index 7825c1e8616654..f399a1a6c6bb58 100644 --- a/drivers/sensor/bmi160/bmi160.h +++ b/drivers/sensor/bmi160/bmi160.h @@ -10,7 +10,7 @@ #include #include -#include +#include /* registers */ #define BMI160_REG_CHIPID 0x00 diff --git a/drivers/sensor/bmm150/bmm150.h b/drivers/sensor/bmm150/bmm150.h index 48ca5e4c703dcc..e2f84f0484264e 100644 --- a/drivers/sensor/bmm150/bmm150.h +++ b/drivers/sensor/bmm150/bmm150.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/ccs811/ccs811.c b/drivers/sensor/ccs811/ccs811.c index 26a4a0cc824fb6..14770a3ffdaac2 100644 --- a/drivers/sensor/ccs811/ccs811.c +++ b/drivers/sensor/ccs811/ccs811.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/ccs811/ccs811.h b/drivers/sensor/ccs811/ccs811.h index 9b9b4e56f4c95d..eb91022a9e05bd 100644 --- a/drivers/sensor/ccs811/ccs811.h +++ b/drivers/sensor/ccs811/ccs811.h @@ -9,7 +9,7 @@ #include #include -#include +#include /* Registers */ #define CCS811_REG_STATUS 0x00 diff --git a/drivers/sensor/dht/dht.c b/drivers/sensor/dht/dht.c index 0dd29face34415..2c435e93db4ee7 100644 --- a/drivers/sensor/dht/dht.c +++ b/drivers/sensor/dht/dht.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/ens210/ens210.c b/drivers/sensor/ens210/ens210.c index 3728f842c3af47..656f1c35ec609d 100644 --- a/drivers/sensor/ens210/ens210.c +++ b/drivers/sensor/ens210/ens210.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/ens210/ens210.h b/drivers/sensor/ens210/ens210.h index 595038ab6b09f1..c67bcf397b5fab 100644 --- a/drivers/sensor/ens210/ens210.h +++ b/drivers/sensor/ens210/ens210.h @@ -9,7 +9,7 @@ #include #include -#include +#include /* Registers */ #define ENS210_REG_PART_ID 0x00 diff --git a/drivers/sensor/fxas21002/fxas21002.c b/drivers/sensor/fxas21002/fxas21002.c index 66eac1b487be68..5c52613b5a478f 100644 --- a/drivers/sensor/fxas21002/fxas21002.c +++ b/drivers/sensor/fxas21002/fxas21002.c @@ -5,7 +5,7 @@ */ #include "fxas21002.h" -#include +#include #include #include diff --git a/drivers/sensor/fxos8700/fxos8700.c b/drivers/sensor/fxos8700/fxos8700.c index 21429f36b9aa08..9ca5d70a0366d2 100644 --- a/drivers/sensor/fxos8700/fxos8700.c +++ b/drivers/sensor/fxos8700/fxos8700.c @@ -6,7 +6,7 @@ */ #include "fxos8700.h" -#include +#include #include #include #include diff --git a/drivers/sensor/hmc5883l/hmc5883l.h b/drivers/sensor/hmc5883l/hmc5883l.h index b773a5223b1875..f7d3ead899282e 100644 --- a/drivers/sensor/hmc5883l/hmc5883l.h +++ b/drivers/sensor/hmc5883l/hmc5883l.h @@ -8,7 +8,7 @@ #define ZEPHYR_DRIVERS_SENSOR_HMC5883L_HMC5883L_H_ #include -#include +#include #include #include diff --git a/drivers/sensor/hmc5883l/hmc5883l_trigger.c b/drivers/sensor/hmc5883l/hmc5883l_trigger.c index 381984c8245fe2..19d2ac6c08400b 100644 --- a/drivers/sensor/hmc5883l/hmc5883l_trigger.c +++ b/drivers/sensor/hmc5883l/hmc5883l_trigger.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/hp206c/hp206c.h b/drivers/sensor/hp206c/hp206c.h index 277330aeae936b..9d7c1259dff4a7 100644 --- a/drivers/sensor/hp206c/hp206c.h +++ b/drivers/sensor/hp206c/hp206c.h @@ -9,7 +9,7 @@ #ifndef ZEPHYR_DRIVERS_SENSOR_HP206C_HP206C_H_ #define ZEPHYR_DRIVERS_SENSOR_HP206C_HP206C_H_ -#include +#include #define HP206C_I2C_ADDRESS 0x76 diff --git a/drivers/sensor/hts221/hts221.h b/drivers/sensor/hts221/hts221.h index 26fbbeeb665ab6..a27e230038a02b 100644 --- a/drivers/sensor/hts221/hts221.h +++ b/drivers/sensor/hts221/hts221.h @@ -8,7 +8,7 @@ #define ZEPHYR_DRIVERS_SENSOR_HTS221_HTS221_H_ #include -#include +#include #include #include diff --git a/drivers/sensor/hts221/hts221_trigger.c b/drivers/sensor/hts221/hts221_trigger.c index 9ecb0a92ec5e81..bf70a0ac352b2e 100644 --- a/drivers/sensor/hts221/hts221_trigger.c +++ b/drivers/sensor/hts221/hts221_trigger.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/isl29035/isl29035_trigger.c b/drivers/sensor/isl29035/isl29035_trigger.c index 7c428dad938525..0e747ca0137a1e 100644 --- a/drivers/sensor/isl29035/isl29035_trigger.c +++ b/drivers/sensor/isl29035/isl29035_trigger.c @@ -7,7 +7,7 @@ */ #include -#include +#include #include #include "isl29035.h" diff --git a/drivers/sensor/lis2dh/lis2dh.h b/drivers/sensor/lis2dh/lis2dh.h index 768c101239f1ba..aa950b2375b1f6 100644 --- a/drivers/sensor/lis2dh/lis2dh.h +++ b/drivers/sensor/lis2dh/lis2dh.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/lis2dh/lis2dh_trigger.c b/drivers/sensor/lis2dh/lis2dh_trigger.c index e40125d5cc4701..c20830f92591d8 100644 --- a/drivers/sensor/lis2dh/lis2dh_trigger.c +++ b/drivers/sensor/lis2dh/lis2dh_trigger.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include #define START_TRIG_INT1 0 diff --git a/drivers/sensor/lis2ds12/lis2ds12_trigger.c b/drivers/sensor/lis2ds12/lis2ds12_trigger.c index 5bc208234e016c..c89e13221e3720 100644 --- a/drivers/sensor/lis2ds12/lis2ds12_trigger.c +++ b/drivers/sensor/lis2ds12/lis2ds12_trigger.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/lis2dw12/lis2dw12.h b/drivers/sensor/lis2dw12/lis2dw12.h index 7ba36e140dffc7..0895981eac289e 100644 --- a/drivers/sensor/lis2dw12/lis2dw12.h +++ b/drivers/sensor/lis2dw12/lis2dw12.h @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include "lis2dw12_reg.h" diff --git a/drivers/sensor/lis2mdl/lis2mdl.h b/drivers/sensor/lis2mdl/lis2mdl.h index 323affa07e51a2..f591a48b410b94 100644 --- a/drivers/sensor/lis2mdl/lis2mdl.h +++ b/drivers/sensor/lis2mdl/lis2mdl.h @@ -10,7 +10,7 @@ #define __MAG_LIS2MDL_H #include -#include +#include #include #define LIS2MDL_EN_BIT 1 diff --git a/drivers/sensor/lis3mdl/lis3mdl.h b/drivers/sensor/lis3mdl/lis3mdl.h index 5de57e5e653474..d3818fc3069a93 100644 --- a/drivers/sensor/lis3mdl/lis3mdl.h +++ b/drivers/sensor/lis3mdl/lis3mdl.h @@ -8,7 +8,7 @@ #define ZEPHYR_DRIVERS_SENSOR_LIS3MDL_LIS3MDL_H_ #include -#include +#include #include #include diff --git a/drivers/sensor/lis3mdl/lis3mdl_trigger.c b/drivers/sensor/lis3mdl/lis3mdl_trigger.c index 5f8fd96dfb6e76..3e63f1a5760e2b 100644 --- a/drivers/sensor/lis3mdl/lis3mdl_trigger.c +++ b/drivers/sensor/lis3mdl/lis3mdl_trigger.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/lps22hb/lps22hb.h b/drivers/sensor/lps22hb/lps22hb.h index 85ae8edb69c8de..8b8e52a0c5605f 100644 --- a/drivers/sensor/lps22hb/lps22hb.h +++ b/drivers/sensor/lps22hb/lps22hb.h @@ -13,7 +13,7 @@ #include #include -#include +#include #define LPS22HB_REG_WHO_AM_I 0x0F #define LPS22HB_VAL_WHO_AM_I 0xB1 diff --git a/drivers/sensor/lps25hb/lps25hb.h b/drivers/sensor/lps25hb/lps25hb.h index ff10ce5756084e..ec91a110d0b933 100644 --- a/drivers/sensor/lps25hb/lps25hb.h +++ b/drivers/sensor/lps25hb/lps25hb.h @@ -13,7 +13,7 @@ #include #include -#include +#include #define LPS25HB_REG_WHO_AM_I 0x0F #define LPS25HB_VAL_WHO_AM_I 0xBD diff --git a/drivers/sensor/lsm6ds0/lsm6ds0.h b/drivers/sensor/lsm6ds0/lsm6ds0.h index 34cd000024fa69..6d451300da8aa4 100644 --- a/drivers/sensor/lsm6ds0/lsm6ds0.h +++ b/drivers/sensor/lsm6ds0/lsm6ds0.h @@ -13,7 +13,7 @@ #include #include -#include +#include #define LSM6DS0_REG_ACT_THS 0x04 #define LSM6DS0_MASK_ACT_THS_SLEEP_ON_INACT_EN BIT(7) diff --git a/drivers/sensor/lsm6dsl/lsm6dsl.h b/drivers/sensor/lsm6dsl/lsm6dsl.h index dd742889287e11..a40d1764e06c25 100644 --- a/drivers/sensor/lsm6dsl/lsm6dsl.h +++ b/drivers/sensor/lsm6dsl/lsm6dsl.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #define LSM6DSL_REG_FUNC_CFG_ACCESS 0x01 #define LSM6DSL_MASK_FUNC_CFG_EN BIT(7) diff --git a/drivers/sensor/lsm6dsl/lsm6dsl_shub.c b/drivers/sensor/lsm6dsl/lsm6dsl_shub.c index fe6c2ad4823ea8..3b728b476caa0e 100644 --- a/drivers/sensor/lsm6dsl/lsm6dsl_shub.c +++ b/drivers/sensor/lsm6dsl/lsm6dsl_shub.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c b/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c index 62a0c6dfeefcfa..c4d28b44fb0493 100644 --- a/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c +++ b/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h b/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h index 55dfb3cc8bdb96..091e9dd461ede5 100644 --- a/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h +++ b/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.h @@ -11,7 +11,7 @@ #include #include -#include +#include #define DEG2RAD 0.017453292519943295769236907684 diff --git a/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.h b/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.h index 284a1b978b400b..9155bf956df200 100644 --- a/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.h +++ b/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.h @@ -12,7 +12,7 @@ #define ZEPHYR_DRIVERS_SENSOR_LSM9DS0_MFD_LSM9DS0_MFD_H_ #include -#include +#include #define LSM9DS0_MFD_REG_OUT_TEMP_L_XM 0x05 #define LSM9DS0_MFD_REG_OUT_TEMP_H_XM 0x06 diff --git a/drivers/sensor/max44009/max44009.h b/drivers/sensor/max44009/max44009.h index ded65d800c4159..820fac7bdffcfd 100644 --- a/drivers/sensor/max44009/max44009.h +++ b/drivers/sensor/max44009/max44009.h @@ -7,7 +7,7 @@ #ifndef ZEPHYR_DRIVERS_SENSOR_MAX44009_MAX44009_H_ #define ZEPHYR_DRIVERS_SENSOR_MAX44009_MAX44009_H_ -#include +#include #define MAX44009_I2C_ADDRESS CONFIG_MAX44009_I2C_ADDR diff --git a/drivers/sensor/mcp9808/mcp9808.h b/drivers/sensor/mcp9808/mcp9808.h index 23f66d958d408e..0bd684f75fa02d 100644 --- a/drivers/sensor/mcp9808/mcp9808.h +++ b/drivers/sensor/mcp9808/mcp9808.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #define MCP9808_REG_CONFIG 0x01 diff --git a/drivers/sensor/mpu6050/mpu6050.h b/drivers/sensor/mpu6050/mpu6050.h index db4eab3500ff55..0beaa787e3a980 100644 --- a/drivers/sensor/mpu6050/mpu6050.h +++ b/drivers/sensor/mpu6050/mpu6050.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #define MPU6050_REG_CHIP_ID 0x75 diff --git a/drivers/sensor/mpu6050/mpu6050_trigger.c b/drivers/sensor/mpu6050/mpu6050_trigger.c index 4d00e3cb25d12a..f6e4689d3097d0 100644 --- a/drivers/sensor/mpu6050/mpu6050_trigger.c +++ b/drivers/sensor/mpu6050/mpu6050_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/sensor/sht3xd/sht3xd_trigger.c b/drivers/sensor/sht3xd/sht3xd_trigger.c index f3ed2f961d9745..6d32f4342d2e5f 100644 --- a/drivers/sensor/sht3xd/sht3xd_trigger.c +++ b/drivers/sensor/sht3xd/sht3xd_trigger.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/sensor/sx9500/sx9500_trigger.c b/drivers/sensor/sx9500/sx9500_trigger.c index a2d047bbe3a2eb..eb12bb3b8d08fc 100644 --- a/drivers/sensor/sx9500/sx9500_trigger.c +++ b/drivers/sensor/sx9500/sx9500_trigger.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "sx9500.h" diff --git a/drivers/sensor/th02/th02.c b/drivers/sensor/th02/th02.c index 90135edc80039e..23e58cf0588466 100644 --- a/drivers/sensor/th02/th02.c +++ b/drivers/sensor/th02/th02.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/th02/th02.h b/drivers/sensor/th02/th02.h index 52fa85b8806472..0825c38c0ad258 100644 --- a/drivers/sensor/th02/th02.h +++ b/drivers/sensor/th02/th02.h @@ -8,7 +8,7 @@ #define ZEPHYR_DRIVERS_SENSOR_TH02_TH02_H_ #include -#include +#include #define TH02_I2C_DEV_ID 0x40 #define TH02_REG_STATUS 0x00 diff --git a/drivers/sensor/ti_hdc/ti_hdc.c b/drivers/sensor/ti_hdc/ti_hdc.c index a799124415b1a0..0f7bf079ce802b 100644 --- a/drivers/sensor/ti_hdc/ti_hdc.c +++ b/drivers/sensor/ti_hdc/ti_hdc.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/sensor/tmp007/tmp007.c b/drivers/sensor/tmp007/tmp007.c index 27be80c2d052f6..decad9159153ba 100644 --- a/drivers/sensor/tmp007/tmp007.c +++ b/drivers/sensor/tmp007/tmp007.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/sensor/tmp007/tmp007.h b/drivers/sensor/tmp007/tmp007.h index 325c11889e1874..c3d68ee9c11ae1 100644 --- a/drivers/sensor/tmp007/tmp007.h +++ b/drivers/sensor/tmp007/tmp007.h @@ -9,7 +9,7 @@ #include #include -#include +#include #define TMP007_I2C_ADDRESS CONFIG_TMP007_I2C_ADDR diff --git a/drivers/sensor/tmp007/tmp007_trigger.c b/drivers/sensor/tmp007/tmp007_trigger.c index 4dabc4f98a676b..7524ca69c8b606 100644 --- a/drivers/sensor/tmp007/tmp007_trigger.c +++ b/drivers/sensor/tmp007/tmp007_trigger.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/sensor/tmp112/tmp112.c b/drivers/sensor/tmp112/tmp112.c index 04cf2fd9d3b09c..30882608483e76 100644 --- a/drivers/sensor/tmp112/tmp112.c +++ b/drivers/sensor/tmp112/tmp112.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c index 5f993c5e46d0e7..46f856b5b7bb1e 100644 --- a/drivers/serial/uart_nrfx_uarte.c +++ b/drivers/serial/uart_nrfx_uarte.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include LOG_MODULE_REGISTER(uart_nrfx_uarte, LOG_LEVEL_ERR); diff --git a/drivers/serial/uart_nsim.c b/drivers/serial/uart_nsim.c index 434b8a586ffd38..588b76909d965a 100644 --- a/drivers/serial/uart_nsim.c +++ b/drivers/serial/uart_nsim.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/spi/spi_dw.c b/drivers/spi/spi_dw.c index 336f46a7e38b61..a22137a3588c72 100644 --- a/drivers/spi/spi_dw.c +++ b/drivers/spi/spi_dw.c @@ -34,7 +34,7 @@ LOG_MODULE_REGISTER(spi_dw); #include #include -#include +#include #ifdef CONFIG_IOAPIC #include diff --git a/drivers/spi/spi_ll_stm32.c b/drivers/spi/spi_ll_stm32.c index 0d72a7a5f58977..d7383ca5c9f85d 100644 --- a/drivers/spi/spi_ll_stm32.c +++ b/drivers/spi/spi_ll_stm32.c @@ -8,7 +8,7 @@ #include LOG_MODULE_REGISTER(spi_ll_stm32); -#include +#include #include #include #include diff --git a/drivers/timer/rv32m1_lptmr_timer.c b/drivers/timer/rv32m1_lptmr_timer.c index efd7a4f1af386a..beb60c38a61010 100644 --- a/drivers/timer/rv32m1_lptmr_timer.c +++ b/drivers/timer/rv32m1_lptmr_timer.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/usb/device/usb_dc_stm32.c b/drivers/usb/device/usb_dc_stm32.c index 1d33e2adba3ab3..92b457a09e921a 100644 --- a/drivers/usb/device/usb_dc_stm32.c +++ b/drivers/usb/device/usb_dc_stm32.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #define LOG_LEVEL CONFIG_USB_DRIVER_LOG_LEVEL diff --git a/drivers/usb/device/usb_dw_registers.h b/drivers/usb/device/usb_dw_registers.h index f6584b5a6ff5fd..c43ac8a8e53834 100644 --- a/drivers/usb/device/usb_dw_registers.h +++ b/drivers/usb/device/usb_dw_registers.h @@ -15,7 +15,7 @@ #ifndef ZEPHYR_DRIVERS_USB_DEVICE_USB_DW_REGISTERS_H_ #define ZEPHYR_DRIVERS_USB_DEVICE_USB_DW_REGISTERS_H_ -#include +#include #if defined(CONFIG_SOC_QUARK_SE_C1000) #include "qm_soc_regs.h" diff --git a/ext/hal/ti/simplelink/kernel/zephyr/dpl/dpl.c b/ext/hal/ti/simplelink/kernel/zephyr/dpl/dpl.c index 33c549fdb82920..39f3ef22e04abe 100644 --- a/ext/hal/ti/simplelink/kernel/zephyr/dpl/dpl.c +++ b/ext/hal/ti/simplelink/kernel/zephyr/dpl/dpl.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/arch/arc/v2/irq.h b/include/arch/arc/v2/irq.h index b462f3f8a6c8ba..4ed93a829673b3 100644 --- a/include/arch/arc/v2/irq.h +++ b/include/arch/arc/v2/irq.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/arch/arm/cortex_m/memory_map.h b/include/arch/arm/cortex_m/memory_map.h index 4427dd150bd977..782754068ec18d 100644 --- a/include/arch/arm/cortex_m/memory_map.h +++ b/include/arch/arm/cortex_m/memory_map.h @@ -15,7 +15,7 @@ #ifndef ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_M_MEMORY_MAP_H_ #define ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_M_MEMORY_MAP_H_ -#include +#include /* 0x00000000 -> 0x1fffffff: Code in ROM [0.5 GB] */ #define _CODE_BASE_ADDR 0x00000000 diff --git a/include/arch/riscv32/arch.h b/include/arch/riscv32/arch.h index 86f13ebcb30f2e..edba48887e286d 100644 --- a/include/arch/riscv32/arch.h +++ b/include/arch/riscv32/arch.h @@ -32,7 +32,7 @@ extern "C" { #define STACK_ALIGN 16 #ifndef _ASMLANGUAGE -#include +#include #define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN) #define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN) diff --git a/include/arch/x86/linker.ld b/include/arch/x86/linker.ld index d0bdc9495d1bec..1c94bbb3d7824f 100644 --- a/include/arch/x86/linker.ld +++ b/include/arch/x86/linker.ld @@ -42,7 +42,7 @@ #define _ASMLANGUAGE #include #include -#include +#include #include diff --git a/include/bluetooth/bluetooth.h b/include/bluetooth/bluetooth.h index 2de2eeaf3ea885..833b46147c134c 100644 --- a/include/bluetooth/bluetooth.h +++ b/include/bluetooth/bluetooth.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/bluetooth/gatt.h b/include/bluetooth/gatt.h index 191594be75f496..0cff8f8a34d269 100644 --- a/include/bluetooth/gatt.h +++ b/include/bluetooth/gatt.h @@ -23,7 +23,7 @@ extern "C" { #include #include -#include +#include #include #include #include diff --git a/include/bluetooth/hci.h b/include/bluetooth/hci.h index 2769e7f2fbe372..82a591d9512112 100644 --- a/include/bluetooth/hci.h +++ b/include/bluetooth/hci.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/bluetooth/uuid.h b/include/bluetooth/uuid.h index 1b25a13fa6a6a5..2965f3290ed592 100644 --- a/include/bluetooth/uuid.h +++ b/include/bluetooth/uuid.h @@ -17,7 +17,7 @@ * @{ */ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/crypto/cipher.h b/include/crypto/cipher.h index f45e2ca200a323..6deb322ceec356 100644 --- a/include/crypto/cipher.h +++ b/include/crypto/cipher.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include "cipher_structs.h" diff --git a/include/crypto/cipher_structs.h b/include/crypto/cipher_structs.h index a0fef2dd463e9a..e923832126a8cd 100644 --- a/include/crypto/cipher_structs.h +++ b/include/crypto/cipher_structs.h @@ -18,7 +18,7 @@ #define ZEPHYR_INCLUDE_CRYPTO_CIPHER_STRUCTS_H_ #include -#include +#include enum cipher_algo { CRYPTO_CIPHER_ALGO_AES = 1, diff --git a/include/data/json.h b/include/data/json.h index d9e3ece5e71296..f810e2de6faaa3 100644 --- a/include/data/json.h +++ b/include/data/json.h @@ -21,7 +21,7 @@ * @{ */ -#include +#include #include #include #include diff --git a/include/display/mb_display.h b/include/display/mb_display.h index 63ddaaf75c42a9..f38bb424283148 100644 --- a/include/display/mb_display.h +++ b/include/display/mb_display.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/drivers/rtc.h b/include/drivers/rtc.h index e32fa684c0f245..009aa8dc77b64e 100644 --- a/include/drivers/rtc.h +++ b/include/drivers/rtc.h @@ -8,7 +8,7 @@ #define ZEPHYR_INCLUDE_DRIVERS_RTC_H_ #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/drivers/watchdog.h b/include/drivers/watchdog.h index 8e9aa58126c03b..e5594e61da0d0a 100644 --- a/include/drivers/watchdog.h +++ b/include/drivers/watchdog.h @@ -21,7 +21,7 @@ */ #include -#include +#include #include #ifdef __cplusplus diff --git a/include/kernel_includes.h b/include/kernel_includes.h index 0ee8bcf534d2cf..fa560b6e85987e 100644 --- a/include/kernel_includes.h +++ b/include/kernel_includes.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linker/linker-defs.h b/include/linker/linker-defs.h index b28be9b4670790..869add38a135a5 100644 --- a/include/linker/linker-defs.h +++ b/include/linker/linker-defs.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #ifdef _LINKER diff --git a/include/logging/log_core.h b/include/logging/log_core.h index 64be59ef462117..1665c67a7a25f4 100644 --- a/include/logging/log_core.h +++ b/include/logging/log_core.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/include/misc/util.h b/include/misc/util.h index 19f51d0a57b22a..d7d3a29608ba9e 100644 --- a/include/misc/util.h +++ b/include/misc/util.h @@ -1,797 +1,15 @@ /* - * Copyright (c) 2011-2014, Wind River Systems, Inc. + * Copyright (c) 2019 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ - -/** - * @file - * @brief Misc utilities - * - * Misc utilities usable by the kernel and application code. - */ - #ifndef ZEPHYR_INCLUDE_MISC_UTIL_H_ #define ZEPHYR_INCLUDE_MISC_UTIL_H_ -#ifndef _ASMLANGUAGE - -#include -#include - -/* Helper to pass a int as a pointer or vice-versa. */ -#define POINTER_TO_UINT(x) ((uintptr_t) (x)) -#define UINT_TO_POINTER(x) ((void *) (uintptr_t) (x)) -#define POINTER_TO_INT(x) ((intptr_t) (x)) -#define INT_TO_POINTER(x) ((void *) (intptr_t) (x)) - -#if !(defined (__CHAR_BIT__) && defined (__SIZEOF_LONG__)) -# error Missing required predefined macros for BITS_PER_LONG calculation -#endif - -#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) -/* Create a contiguous bitmask starting at bit position @l and ending at - * position @h. - */ -#define GENMASK(h, l) \ - (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) - -/* Evaluates to 0 if cond is true-ish; compile error otherwise */ -#define ZERO_OR_COMPILE_ERROR(cond) ((int) sizeof(char[1 - 2 * !(cond)]) - 1) - -/* Evaluates to 0 if array is an array; compile error if not array (e.g. - * pointer) - */ -#define IS_ARRAY(array) \ - ZERO_OR_COMPILE_ERROR( \ - !__builtin_types_compatible_p(__typeof__(array), \ - __typeof__(&(array)[0]))) - -#if defined(__cplusplus) -template < class T, size_t N > -constexpr size_t ARRAY_SIZE(T(&)[N]) { return N; } - -#else -/* Evaluates to number of elements in an array; compile error if not - * an array (e.g. pointer) - */ -#define ARRAY_SIZE(array) \ - ((long) (IS_ARRAY(array) + (sizeof(array) / sizeof((array)[0])))) -#endif - -/* Evaluates to 1 if ptr is part of array, 0 otherwise; compile error if - * "array" argument is not an array (e.g. "ptr" and "array" mixed up) - */ -#define PART_OF_ARRAY(array, ptr) \ - ((ptr) && ((ptr) >= &array[0] && (ptr) < &array[ARRAY_SIZE(array)])) - -#define CONTAINER_OF(ptr, type, field) \ - ((type *)(((char *)(ptr)) - offsetof(type, field))) - -/* round "x" up/down to next multiple of "align" (which must be a power of 2) */ -#define ROUND_UP(x, align) \ - (((unsigned long)(x) + ((unsigned long)(align) - 1)) & \ - ~((unsigned long)(align) - 1)) -#define ROUND_DOWN(x, align) \ - ((unsigned long)(x) & ~((unsigned long)(align) - 1)) - -/* round up/down to the next word boundary */ -#define WB_UP(x) ROUND_UP(x, sizeof(void *)) -#define WB_DN(x) ROUND_DOWN(x, sizeof(void *)) - -#define ceiling_fraction(numerator, divider) \ - (((numerator) + ((divider) - 1)) / (divider)) - -#ifdef INLINED -#define INLINE inline -#else -#define INLINE -#endif - -#ifndef MAX -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif - -#ifndef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif - -static inline bool is_power_of_two(unsigned int x) -{ - return (x != 0U) && ((x & (x - 1)) == 0U); -} - -static inline s64_t arithmetic_shift_right(s64_t value, u8_t shift) -{ - s64_t sign_ext; - - if (shift == 0U) { - return value; - } - - /* extract sign bit */ - sign_ext = (value >> 63) & 1; - - /* make all bits of sign_ext be the same as the value's sign bit */ - sign_ext = -sign_ext; - - /* shift value and fill opened bit positions with sign bit */ - return (value >> shift) | (sign_ext << (64 - shift)); -} - -#endif /* !_ASMLANGUAGE */ - -/* KB, MB, GB */ -#define KB(x) ((x) << 10) -#define MB(x) (KB(x) << 10) -#define GB(x) (MB(x) << 10) - -/* KHZ, MHZ */ -#define KHZ(x) ((x) * 1000) -#define MHZ(x) (KHZ(x) * 1000) - -#ifndef BIT -#if defined(_ASMLANGUAGE) -#define BIT(n) (1 << (n)) -#else -#define BIT(n) (1UL << (n)) +#ifndef CONFIG_COMPAT_INCLUDES +#warning "This header file has moved, include instead." #endif -#endif - -/** - * @brief Macro sets or clears bit depending on boolean value - * - * @param var Variable to be altered - * @param bit Bit number - * @param set Value 0 clears bit, any other value sets bit - */ -#define WRITE_BIT(var, bit, set) \ - ((var) = (set) ? ((var) | BIT(bit)) : ((var) & ~BIT(bit))) - -#define BIT_MASK(n) (BIT(n) - 1) - -/** - * @brief Check for macro definition in compiler-visible expressions - * - * This trick was pioneered in Linux as the config_enabled() macro. - * The madness has the effect of taking a macro value that may be - * defined to "1" (e.g. CONFIG_MYFEATURE), or may not be defined at - * all and turning it into a literal expression that can be used at - * "runtime". That is, it works similarly to - * "defined(CONFIG_MYFEATURE)" does except that it is an expansion - * that can exist in a standard expression and be seen by the compiler - * and optimizer. Thus much ifdef usage can be replaced with cleaner - * expressions like: - * - * if (IS_ENABLED(CONFIG_MYFEATURE)) - * myfeature_enable(); - * - * INTERNAL - * First pass just to expand any existing macros, we need the macro - * value to be e.g. a literal "1" at expansion time in the next macro, - * not "(1)", etc... Standard recursive expansion does not work. - */ -#define IS_ENABLED(config_macro) Z_IS_ENABLED1(config_macro) - -/* Now stick on a "_XXXX" prefix, it will now be "_XXXX1" if config_macro - * is "1", or just "_XXXX" if it's undefined. - * ENABLED: Z_IS_ENABLED2(_XXXX1) - * DISABLED Z_IS_ENABLED2(_XXXX) - */ -#define Z_IS_ENABLED1(config_macro) Z_IS_ENABLED2(_XXXX##config_macro) - -/* Here's the core trick, we map "_XXXX1" to "_YYYY," (i.e. a string - * with a trailing comma), so it has the effect of making this a - * two-argument tuple to the preprocessor only in the case where the - * value is defined to "1" - * ENABLED: _YYYY, <--- note comma! - * DISABLED: _XXXX - */ -#define _XXXX1 _YYYY, - -/* Then we append an extra argument to fool the gcc preprocessor into - * accepting it as a varargs macro. - * arg1 arg2 arg3 - * ENABLED: Z_IS_ENABLED3(_YYYY, 1, 0) - * DISABLED Z_IS_ENABLED3(_XXXX 1, 0) - */ -#define Z_IS_ENABLED2(one_or_two_args) Z_IS_ENABLED3(one_or_two_args true, false) - -/* And our second argument is thus now cooked to be 1 in the case - * where the value is defined to 1, and 0 if not: - */ -#define Z_IS_ENABLED3(ignore_this, val, ...) val - -/** - * @brief Insert code depending on result of flag evaluation. - * - * This is based on same idea as @ref IS_ENABLED macro but as the result of - * flag evaluation provided code is injected. Because preprocessor interprets - * each comma as an argument boundary, code must be provided in the brackets. - * Brackets are stripped away during macro processing. - * - * Usage example: - * - * \#define MACRO(x) COND_CODE_1(CONFIG_FLAG, (u32_t x;), ()) - * - * It can be considered as alternative to: - * - * \#if defined(CONFIG_FLAG) && (CONFIG_FLAG == 1) - * \#define MACRO(x) u32_t x; - * \#else - * \#define MACRO(x) - * \#endif - * - * However, the advantage of that approach is that code is resolved in place - * where it is used while \#if method resolves given macro when header is - * included and product is fixed in the given scope. - * - * @note Flag can also be a result of preprocessor output e.g. - * product of NUM_VA_ARGS_LESS_1(...). - * - * @param _flag Evaluated flag - * @param _if_1_code Code used if flag exists and equal 1. Argument must be - * in brackets. - * @param _else_code Code used if flag doesn't exists or isn't equal 1. - * - */ -#define COND_CODE_1(_flag, _if_1_code, _else_code) \ - Z_COND_CODE_1(_flag, _if_1_code, _else_code) - -#define Z_COND_CODE_1(_flag, _if_1_code, _else_code) \ - __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) - -/** - * @brief Insert code depending on result of flag evaluation. - * - * See @ref COND_CODE_1 for details. - * - * @param _flag Evaluated flag - * @param _if_0_code Code used if flag exists and equal 0. Argument must be - * in brackets. - * @param _else_code Code used if flag doesn't exists or isn't equal 0. - * - */ -#define COND_CODE_0(_flag, _if_0_code, _else_code) \ - Z_COND_CODE_0(_flag, _if_0_code, _else_code) - -#define Z_COND_CODE_0(_flag, _if_0_code, _else_code) \ - __COND_CODE(_ZZZZ##_flag, _if_0_code, _else_code) - -#define _ZZZZ0 _YYYY, - -/* Macro used internally by @ref COND_CODE_1 and @ref COND_CODE_0. */ -#define __COND_CODE(one_or_two_args, _if_code, _else_code) \ - __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) - -/* Macro used internally to remove brackets from argument. */ -#define __DEBRACKET(...) __VA_ARGS__ - -/* Macro used internally for getting second argument and removing brackets - * around that argument. It is expected that parameter is provided in brackets - */ -#define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val - -/** - * @brief Get first argument from variable list of arguments - */ -#define GET_ARG1(arg1, ...) arg1 - -/** - * @brief Get second argument from variable list of arguments - */ -#define GET_ARG2(arg1, arg2, ...) arg2 - -/** - * @brief Get all arguments except the first one. - */ -#define GET_ARGS_LESS_1(val, ...) __VA_ARGS__ - -/** - * Macros for doing code-generation with the preprocessor. - * - * Generally it is better to generate code with the preprocessor than - * to copy-paste code or to generate code with the build system / - * python script's etc. - * - * http://stackoverflow.com/a/12540675 - */ -#define UTIL_EMPTY(...) -#define UTIL_DEFER(...) __VA_ARGS__ UTIL_EMPTY() -#define UTIL_OBSTRUCT(...) __VA_ARGS__ UTIL_DEFER(UTIL_EMPTY)() -#define UTIL_EXPAND(...) __VA_ARGS__ - -#define UTIL_EVAL(...) UTIL_EVAL1(UTIL_EVAL1(UTIL_EVAL1(__VA_ARGS__))) -#define UTIL_EVAL1(...) UTIL_EVAL2(UTIL_EVAL2(UTIL_EVAL2(__VA_ARGS__))) -#define UTIL_EVAL2(...) UTIL_EVAL3(UTIL_EVAL3(UTIL_EVAL3(__VA_ARGS__))) -#define UTIL_EVAL3(...) UTIL_EVAL4(UTIL_EVAL4(UTIL_EVAL4(__VA_ARGS__))) -#define UTIL_EVAL4(...) UTIL_EVAL5(UTIL_EVAL5(UTIL_EVAL5(__VA_ARGS__))) -#define UTIL_EVAL5(...) __VA_ARGS__ - -#define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) -#define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__ - -#define UTIL_INC(x) UTIL_PRIMITIVE_CAT(UTIL_INC_, x) -#define UTIL_INC_0 1 -#define UTIL_INC_1 2 -#define UTIL_INC_2 3 -#define UTIL_INC_3 4 -#define UTIL_INC_4 5 -#define UTIL_INC_5 6 -#define UTIL_INC_6 7 -#define UTIL_INC_7 8 -#define UTIL_INC_8 9 -#define UTIL_INC_9 10 -#define UTIL_INC_10 11 -#define UTIL_INC_11 12 -#define UTIL_INC_12 13 -#define UTIL_INC_13 14 -#define UTIL_INC_14 15 -#define UTIL_INC_15 16 -#define UTIL_INC_16 17 -#define UTIL_INC_17 18 -#define UTIL_INC_18 19 -#define UTIL_INC_19 19 - -#define UTIL_DEC(x) UTIL_PRIMITIVE_CAT(UTIL_DEC_, x) -#define UTIL_DEC_0 0 -#define UTIL_DEC_1 0 -#define UTIL_DEC_2 1 -#define UTIL_DEC_3 2 -#define UTIL_DEC_4 3 -#define UTIL_DEC_5 4 -#define UTIL_DEC_6 5 -#define UTIL_DEC_7 6 -#define UTIL_DEC_8 7 -#define UTIL_DEC_9 8 -#define UTIL_DEC_10 9 -#define UTIL_DEC_11 10 -#define UTIL_DEC_12 11 -#define UTIL_DEC_13 12 -#define UTIL_DEC_14 13 -#define UTIL_DEC_15 14 -#define UTIL_DEC_16 15 -#define UTIL_DEC_17 16 -#define UTIL_DEC_18 17 -#define UTIL_DEC_19 18 -#define UTIL_DEC_20 19 -#define UTIL_DEC_21 20 -#define UTIL_DEC_22 21 -#define UTIL_DEC_23 22 -#define UTIL_DEC_24 23 -#define UTIL_DEC_25 24 -#define UTIL_DEC_26 25 -#define UTIL_DEC_27 26 -#define UTIL_DEC_28 27 -#define UTIL_DEC_29 28 -#define UTIL_DEC_30 29 -#define UTIL_DEC_31 30 -#define UTIL_DEC_32 31 -#define UTIL_DEC_33 32 -#define UTIL_DEC_34 33 -#define UTIL_DEC_35 34 -#define UTIL_DEC_36 35 -#define UTIL_DEC_37 36 -#define UTIL_DEC_38 37 -#define UTIL_DEC_39 38 -#define UTIL_DEC_40 39 -#define UTIL_DEC_41 40 -#define UTIL_DEC_42 41 -#define UTIL_DEC_43 42 -#define UTIL_DEC_44 43 -#define UTIL_DEC_45 44 -#define UTIL_DEC_46 45 -#define UTIL_DEC_47 46 -#define UTIL_DEC_48 47 -#define UTIL_DEC_49 48 -#define UTIL_DEC_50 49 -#define UTIL_DEC_51 50 -#define UTIL_DEC_52 51 -#define UTIL_DEC_53 52 -#define UTIL_DEC_54 53 -#define UTIL_DEC_55 54 -#define UTIL_DEC_56 55 -#define UTIL_DEC_57 56 -#define UTIL_DEC_58 57 -#define UTIL_DEC_59 58 -#define UTIL_DEC_60 59 -#define UTIL_DEC_61 60 -#define UTIL_DEC_62 61 -#define UTIL_DEC_63 62 -#define UTIL_DEC_64 63 -#define UTIL_DEC_65 64 -#define UTIL_DEC_66 65 -#define UTIL_DEC_67 66 -#define UTIL_DEC_68 67 -#define UTIL_DEC_69 68 -#define UTIL_DEC_70 69 -#define UTIL_DEC_71 70 -#define UTIL_DEC_72 71 -#define UTIL_DEC_73 72 -#define UTIL_DEC_74 73 -#define UTIL_DEC_75 74 -#define UTIL_DEC_76 75 -#define UTIL_DEC_77 76 -#define UTIL_DEC_78 77 -#define UTIL_DEC_79 78 -#define UTIL_DEC_80 79 -#define UTIL_DEC_81 80 -#define UTIL_DEC_82 81 -#define UTIL_DEC_83 82 -#define UTIL_DEC_84 83 -#define UTIL_DEC_85 84 -#define UTIL_DEC_86 85 -#define UTIL_DEC_87 86 -#define UTIL_DEC_88 87 -#define UTIL_DEC_89 88 -#define UTIL_DEC_90 89 -#define UTIL_DEC_91 90 -#define UTIL_DEC_92 91 -#define UTIL_DEC_93 92 -#define UTIL_DEC_94 93 -#define UTIL_DEC_95 94 -#define UTIL_DEC_96 95 -#define UTIL_DEC_97 96 -#define UTIL_DEC_98 97 -#define UTIL_DEC_99 98 -#define UTIL_DEC_100 99 -#define UTIL_DEC_101 100 -#define UTIL_DEC_102 101 -#define UTIL_DEC_103 102 -#define UTIL_DEC_104 103 -#define UTIL_DEC_105 104 -#define UTIL_DEC_106 105 -#define UTIL_DEC_107 106 -#define UTIL_DEC_108 107 -#define UTIL_DEC_109 108 -#define UTIL_DEC_110 109 -#define UTIL_DEC_111 110 -#define UTIL_DEC_112 111 -#define UTIL_DEC_113 112 -#define UTIL_DEC_114 113 -#define UTIL_DEC_115 114 -#define UTIL_DEC_116 115 -#define UTIL_DEC_117 116 -#define UTIL_DEC_118 117 -#define UTIL_DEC_119 118 -#define UTIL_DEC_120 119 -#define UTIL_DEC_121 120 -#define UTIL_DEC_122 121 -#define UTIL_DEC_123 122 -#define UTIL_DEC_124 123 -#define UTIL_DEC_125 124 -#define UTIL_DEC_126 125 -#define UTIL_DEC_127 126 -#define UTIL_DEC_128 127 -#define UTIL_DEC_129 128 -#define UTIL_DEC_130 129 -#define UTIL_DEC_131 130 -#define UTIL_DEC_132 131 -#define UTIL_DEC_133 132 -#define UTIL_DEC_134 133 -#define UTIL_DEC_135 134 -#define UTIL_DEC_136 135 -#define UTIL_DEC_137 136 -#define UTIL_DEC_138 137 -#define UTIL_DEC_139 138 -#define UTIL_DEC_140 139 -#define UTIL_DEC_141 140 -#define UTIL_DEC_142 141 -#define UTIL_DEC_143 142 -#define UTIL_DEC_144 143 -#define UTIL_DEC_145 144 -#define UTIL_DEC_146 145 -#define UTIL_DEC_147 146 -#define UTIL_DEC_148 147 -#define UTIL_DEC_149 148 -#define UTIL_DEC_150 149 -#define UTIL_DEC_151 150 -#define UTIL_DEC_152 151 -#define UTIL_DEC_153 152 -#define UTIL_DEC_154 153 -#define UTIL_DEC_155 154 -#define UTIL_DEC_156 155 -#define UTIL_DEC_157 156 -#define UTIL_DEC_158 157 -#define UTIL_DEC_159 158 -#define UTIL_DEC_160 159 -#define UTIL_DEC_161 160 -#define UTIL_DEC_162 161 -#define UTIL_DEC_163 162 -#define UTIL_DEC_164 163 -#define UTIL_DEC_165 164 -#define UTIL_DEC_166 165 -#define UTIL_DEC_167 166 -#define UTIL_DEC_168 167 -#define UTIL_DEC_169 168 -#define UTIL_DEC_170 169 -#define UTIL_DEC_171 170 -#define UTIL_DEC_172 171 -#define UTIL_DEC_173 172 -#define UTIL_DEC_174 173 -#define UTIL_DEC_175 174 -#define UTIL_DEC_176 175 -#define UTIL_DEC_177 176 -#define UTIL_DEC_178 177 -#define UTIL_DEC_179 178 -#define UTIL_DEC_180 179 -#define UTIL_DEC_181 180 -#define UTIL_DEC_182 181 -#define UTIL_DEC_183 182 -#define UTIL_DEC_184 183 -#define UTIL_DEC_185 184 -#define UTIL_DEC_186 185 -#define UTIL_DEC_187 186 -#define UTIL_DEC_188 187 -#define UTIL_DEC_189 188 -#define UTIL_DEC_190 189 -#define UTIL_DEC_191 190 -#define UTIL_DEC_192 191 -#define UTIL_DEC_193 192 -#define UTIL_DEC_194 193 -#define UTIL_DEC_195 194 -#define UTIL_DEC_196 195 -#define UTIL_DEC_197 196 -#define UTIL_DEC_198 197 -#define UTIL_DEC_199 198 -#define UTIL_DEC_200 199 -#define UTIL_DEC_201 200 -#define UTIL_DEC_202 201 -#define UTIL_DEC_203 202 -#define UTIL_DEC_204 203 -#define UTIL_DEC_205 204 -#define UTIL_DEC_206 205 -#define UTIL_DEC_207 206 -#define UTIL_DEC_208 207 -#define UTIL_DEC_209 208 -#define UTIL_DEC_210 209 -#define UTIL_DEC_211 210 -#define UTIL_DEC_212 211 -#define UTIL_DEC_213 212 -#define UTIL_DEC_214 213 -#define UTIL_DEC_215 214 -#define UTIL_DEC_216 215 -#define UTIL_DEC_217 216 -#define UTIL_DEC_218 217 -#define UTIL_DEC_219 218 -#define UTIL_DEC_220 219 -#define UTIL_DEC_221 220 -#define UTIL_DEC_222 221 -#define UTIL_DEC_223 222 -#define UTIL_DEC_224 223 -#define UTIL_DEC_225 224 -#define UTIL_DEC_226 225 -#define UTIL_DEC_227 226 -#define UTIL_DEC_228 227 -#define UTIL_DEC_229 228 -#define UTIL_DEC_230 229 -#define UTIL_DEC_231 230 -#define UTIL_DEC_232 231 -#define UTIL_DEC_233 232 -#define UTIL_DEC_234 233 -#define UTIL_DEC_235 234 -#define UTIL_DEC_236 235 -#define UTIL_DEC_237 236 -#define UTIL_DEC_238 237 -#define UTIL_DEC_239 238 -#define UTIL_DEC_240 239 -#define UTIL_DEC_241 240 -#define UTIL_DEC_242 241 -#define UTIL_DEC_243 242 -#define UTIL_DEC_244 243 -#define UTIL_DEC_245 244 -#define UTIL_DEC_246 245 -#define UTIL_DEC_247 246 -#define UTIL_DEC_248 247 -#define UTIL_DEC_249 248 -#define UTIL_DEC_250 249 -#define UTIL_DEC_251 250 -#define UTIL_DEC_252 251 -#define UTIL_DEC_253 252 -#define UTIL_DEC_254 253 -#define UTIL_DEC_255 254 -#define UTIL_DEC_256 255 - -#define UTIL_CHECK_N(x, n, ...) n -#define UTIL_CHECK(...) UTIL_CHECK_N(__VA_ARGS__, 0,) - -#define UTIL_NOT(x) UTIL_CHECK(UTIL_PRIMITIVE_CAT(UTIL_NOT_, x)) -#define UTIL_NOT_0 ~, 1, - -#define UTIL_COMPL(b) UTIL_PRIMITIVE_CAT(UTIL_COMPL_, b) -#define UTIL_COMPL_0 1 -#define UTIL_COMPL_1 0 - -#define UTIL_BOOL(x) UTIL_COMPL(UTIL_NOT(x)) - -#define UTIL_IIF(c) UTIL_PRIMITIVE_CAT(UTIL_IIF_, c) -#define UTIL_IIF_0(t, ...) __VA_ARGS__ -#define UTIL_IIF_1(t, ...) t - -#define UTIL_IF(c) UTIL_IIF(UTIL_BOOL(c)) - -#define UTIL_EAT(...) -#define UTIL_EXPAND(...) __VA_ARGS__ -#define UTIL_WHEN(c) UTIL_IF(c)(UTIL_EXPAND, UTIL_EAT) - -#define UTIL_REPEAT(count, macro, ...) \ - UTIL_WHEN(count) \ - ( \ - UTIL_OBSTRUCT(UTIL_REPEAT_INDIRECT) () \ - ( \ - UTIL_DEC(count), macro, __VA_ARGS__ \ - ) \ - UTIL_OBSTRUCT(macro) \ - ( \ - UTIL_DEC(count), __VA_ARGS__ \ - ) \ - ) -#define UTIL_REPEAT_INDIRECT() UTIL_REPEAT - -/** - * Generates a sequence of code. - * Useful for generating code like; - * - * NRF_PWM0, NRF_PWM1, NRF_PWM2, - * - * @arg LEN: The length of the sequence. Must be defined and less than - * 20. - * - * @arg F(i, F_ARG): A macro function that accepts two arguments. - * F is called repeatedly, the first argument - * is the index in the sequence, and the second argument is the third - * argument given to UTIL_LISTIFY. - * - * Example: - * - * \#define FOO(i, _) NRF_PWM ## i , - * { UTIL_LISTIFY(PWM_COUNT, FOO) } - * The above two lines will generate the below: - * { NRF_PWM0 , NRF_PWM1 , } - * - * @note Calling UTIL_LISTIFY with undefined arguments has undefined - * behavior. - */ -#define UTIL_LISTIFY(LEN, F, F_ARG) UTIL_EVAL(UTIL_REPEAT(LEN, F, F_ARG)) - -/**@brief Implementation details for NUM_VAR_ARGS */ -#define NUM_VA_ARGS_LESS_1_IMPL( \ - _ignored, \ - _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ - _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ - _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ - _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \ - _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \ - _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \ - _61, _62, N, ...) N - -/**@brief Macro to get the number of arguments in a call variadic macro call. - * First argument is not counted. - * - * param[in] ... List of arguments - * - * @retval Number of variadic arguments in the argument list - */ -#define NUM_VA_ARGS_LESS_1(...) \ - NUM_VA_ARGS_LESS_1_IMPL(__VA_ARGS__, 63, 62, 61, \ - 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, \ - 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ - 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \ - 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \ - 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ - 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, ~) - -/** - * @brief Mapping macro - * - * Macro that process all arguments using given macro - * - * @param ... Macro name to be used for argument processing followed by - * arguments to process. Macro should have following - * form: MACRO(argument). - * - * @return All arguments processed by given macro - */ -#define MACRO_MAP(...) MACRO_MAP_(__VA_ARGS__) -#define MACRO_MAP_(...) \ - /* To make sure it works also for 2 arguments in total */ \ - MACRO_MAP_N(NUM_VA_ARGS_LESS_1(__VA_ARGS__), __VA_ARGS__) - -/** - * @brief Mapping N arguments macro - * - * Macro similar to @ref MACRO_MAP but maps exact number of arguments. - * If there is more arguments given, the rest would be ignored. - * - * @param N Number of arguments to map - * @param ... Macro name to be used for argument processing followed by - * arguments to process. Macro should have following - * form: MACRO(argument). - * - * @return Selected number of arguments processed by given macro - */ -#define MACRO_MAP_N(N, ...) MACRO_MAP_N_(N, __VA_ARGS__) -#define MACRO_MAP_N_(N, ...) UTIL_CAT(MACRO_MAP_, N)(__VA_ARGS__,) - -#define MACRO_MAP_0(...) -#define MACRO_MAP_1(macro, a, ...) macro(a) -#define MACRO_MAP_2(macro, a, ...) macro(a)MACRO_MAP_1(macro, __VA_ARGS__,) -#define MACRO_MAP_3(macro, a, ...) macro(a)MACRO_MAP_2(macro, __VA_ARGS__,) -#define MACRO_MAP_4(macro, a, ...) macro(a)MACRO_MAP_3(macro, __VA_ARGS__,) -#define MACRO_MAP_5(macro, a, ...) macro(a)MACRO_MAP_4(macro, __VA_ARGS__,) -#define MACRO_MAP_6(macro, a, ...) macro(a)MACRO_MAP_5(macro, __VA_ARGS__,) -#define MACRO_MAP_7(macro, a, ...) macro(a)MACRO_MAP_6(macro, __VA_ARGS__,) -#define MACRO_MAP_8(macro, a, ...) macro(a)MACRO_MAP_7(macro, __VA_ARGS__,) -#define MACRO_MAP_9(macro, a, ...) macro(a)MACRO_MAP_8(macro, __VA_ARGS__,) -#define MACRO_MAP_10(macro, a, ...) macro(a)MACRO_MAP_9(macro, __VA_ARGS__,) -#define MACRO_MAP_11(macro, a, ...) macro(a)MACRO_MAP_10(macro, __VA_ARGS__,) -#define MACRO_MAP_12(macro, a, ...) macro(a)MACRO_MAP_11(macro, __VA_ARGS__,) -#define MACRO_MAP_13(macro, a, ...) macro(a)MACRO_MAP_12(macro, __VA_ARGS__,) -#define MACRO_MAP_14(macro, a, ...) macro(a)MACRO_MAP_13(macro, __VA_ARGS__,) -#define MACRO_MAP_15(macro, a, ...) macro(a)MACRO_MAP_14(macro, __VA_ARGS__,) -/* - * The following provides variadic preprocessor macro support to - * help eliminate multiple, repetitive function/macro calls. This - * allows up to 10 "arguments" in addition to z_call . - * Note - derived from work on: - * https://codecraft.co/2014/11/25/variadic-macros-tricks/ - */ - -#define Z_GET_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N - -#define _for_0(z_call, ...) -#define _for_1(z_call, x) z_call(x) -#define _for_2(z_call, x, ...) z_call(x) _for_1(z_call, ##__VA_ARGS__) -#define _for_3(z_call, x, ...) z_call(x) _for_2(z_call, ##__VA_ARGS__) -#define _for_4(z_call, x, ...) z_call(x) _for_3(z_call, ##__VA_ARGS__) -#define _for_5(z_call, x, ...) z_call(x) _for_4(z_call, ##__VA_ARGS__) -#define _for_6(z_call, x, ...) z_call(x) _for_5(z_call, ##__VA_ARGS__) -#define _for_7(z_call, x, ...) z_call(x) _for_6(z_call, ##__VA_ARGS__) -#define _for_8(z_call, x, ...) z_call(x) _for_7(z_call, ##__VA_ARGS__) -#define _for_9(z_call, x, ...) z_call(x) _for_8(z_call, ##__VA_ARGS__) -#define _for_10(z_call, x, ...) z_call(x) _for_9(z_call, ##__VA_ARGS__) - -#define FOR_EACH(x, ...) \ - Z_GET_ARG(__VA_ARGS__, \ - _for_10, _for_9, _for_8, _for_7, _for_6, _for_5, \ - _for_4, _for_3, _for_2, _for_1, _for_0)(x, ##__VA_ARGS__) - -/* FOR_EACH_FIXED_ARG is used for calling the same function - * With one fixed argument and changing 2nd argument. - */ - -#define z_rep_0(_fn, f, ...) -#define z_rep_1(_fn, f, x) {_fn(x, f); z_rep_0(_fn, f)} -#define z_rep_2(_fn, f, x, ...) {_fn(x, f); z_rep_1(_fn, f, ##__VA_ARGS__)} -#define z_rep_3(_fn, f, x, ...) {_fn(x, f); z_rep_2(_fn, f, ##__VA_ARGS__)} -#define z_rep_4(_fn, f, x, ...) {_fn(x, f); z_rep_3(_fn, f, ##__VA_ARGS__)} -#define z_rep_5(_fn, f, x, ...) {_fn(x, f); z_rep_4(_fn, f, ##__VA_ARGS__)} -#define z_rep_6(_fn, f, x, ...) {_fn(x, f); z_rep_5(_fn, f, ##__VA_ARGS__)} -#define z_rep_7(_fn, f, x, ...) {_fn(x, f); z_rep_6(_fn, f, ##__VA_ARGS__)} -#define z_rep_8(_fn, f, x, ...) {_fn(x, f); z_rep_7(_fn, f, ##__VA_ARGS__)} -#define z_rep_9(_fn, f, x, ...) {_fn(x, f); z_rep_8(_fn, f, ##__VA_ARGS__)} -#define z_rep_10(_fn, f, x, ...) {_fn(x, f); z_rep_9(_fn, f, ##__VA_ARGS__)} -#define z_rep_11(_fn, f, x, ...) {_fn(x, f); z_rep_10(_fn, f, ##__VA_ARGS__)} -#define z_rep_12(_fn, f, x, ...) {_fn(x, f); z_rep_11(_fn, f, ##__VA_ARGS__)} -#define z_rep_13(_fn, f, x, ...) {_fn(x, f); z_rep_12(_fn, f, ##__VA_ARGS__)} -#define z_rep_14(_fn, f, x, ...) {_fn(x, f); z_rep_13(_fn, f, ##__VA_ARGS__)} -#define z_rep_15(_fn, f, x, ...) {_fn(x, f); z_rep_14(_fn, f, ##__VA_ARGS__)} -#define z_rep_16(_fn, f, x, ...) {_fn(x, f); z_rep_15(_fn, f, ##__VA_ARGS__)} -#define z_rep_17(_fn, f, x, ...) {_fn(x, f); z_rep_16(_fn, f, ##__VA_ARGS__)} -#define z_rep_18(_fn, f, x, ...) {_fn(x, f); z_rep_17(_fn, f, ##__VA_ARGS__)} -#define z_rep_19(_fn, f, x, ...) {_fn(x, f); z_rep_18(_fn, f, ##__VA_ARGS__)} -#define z_rep_20(_fn, f, x, ...) {_fn(x, f); z_rep_19(_fn, f, ##__VA_ARGS__)} - - -#define Z_GET_ARG_2(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, \ - _14, _15, _16, _17, _18, _19, _20, N, ...) N -#define FOR_EACH_FIXED_ARG(fixed_arg, x, ...) \ - {Z_GET_ARG_2(__VA_ARGS__, \ - z_rep_20, z_rep_19, z_rep_18, z_rep_17, z_rep_16, \ - z_rep_15, z_rep_14, z_rep_13, z_rep_12, z_rep_11, \ - z_rep_10, z_rep_9, z_rep_8, z_rep_7, z_rep_6, \ - z_rep_5, z_rep_4, z_rep_3, z_rep_2, z_rep_1, z_rep_0) \ - (fixed_arg, x, ##__VA_ARGS__)} +#include #endif /* ZEPHYR_INCLUDE_MISC_UTIL_H_ */ diff --git a/include/net/buf.h b/include/net/buf.h index 006eaaec232e3c..5429d22beac678 100644 --- a/include/net/buf.h +++ b/include/net/buf.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/net/ethernet.h b/include/net/ethernet.h index b02b324279ba37..f363a7bb55af26 100644 --- a/include/net/ethernet.h +++ b/include/net/ethernet.h @@ -25,7 +25,7 @@ #include #endif -#include +#include #include #include diff --git a/include/net/net_ip.h b/include/net/net_ip.h index 04412cc117bd88..03c086b49e9d0b 100644 --- a/include/net/net_ip.h +++ b/include/net/net_ip.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/ptp_clock.h b/include/ptp_clock.h index edb908485b74dc..07128a6d69c2b0 100644 --- a/include/ptp_clock.h +++ b/include/ptp_clock.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #ifdef __cplusplus diff --git a/include/sched_priq.h b/include/sched_priq.h index 51e5624e22d2ed..c8d95770685953 100644 --- a/include/sched_priq.h +++ b/include/sched_priq.h @@ -6,7 +6,7 @@ #ifndef ZEPHYR_INCLUDE_SCHED_PRIQ_H_ #define ZEPHYR_INCLUDE_SCHED_PRIQ_H_ -#include +#include #include #include diff --git a/include/settings/settings.h b/include/settings/settings.h index afef4d5e2ddb83..001987cc9cf377 100644 --- a/include/settings/settings.h +++ b/include/settings/settings.h @@ -9,7 +9,7 @@ #define ZEPHYR_INCLUDE_SETTINGS_SETTINGS_H_ #include -#include +#include #include #include diff --git a/include/shell/shell.h b/include/shell/shell.h index 1c849f262daa13..0e8172cccd8c22 100644 --- a/include/shell/shell.h +++ b/include/shell/shell.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/shell/shell_history.h b/include/shell/shell_history.h index 3a76771fca0e98..ff9c2a46a6b460 100644 --- a/include/shell/shell_history.h +++ b/include/shell/shell_history.h @@ -8,7 +8,7 @@ #define SHELL_HISTORY_H__ #include -#include +#include #include #include #include diff --git a/include/sys/list_gen.h b/include/sys/list_gen.h index f6c8fe21b4aaf8..9f15deefb7a089 100644 --- a/include/sys/list_gen.h +++ b/include/sys/list_gen.h @@ -9,7 +9,7 @@ #include #include -#include +#include #define Z_GENLIST_FOR_EACH_NODE(__lname, __l, __sn) \ for (__sn = sys_ ## __lname ## _peek_head(__l); __sn != NULL; \ diff --git a/include/sys/ring_buffer.h b/include/sys/ring_buffer.h index a928cce8693eee..d226ea788abe83 100644 --- a/include/sys/ring_buffer.h +++ b/include/sys/ring_buffer.h @@ -11,7 +11,7 @@ #define ZEPHYR_INCLUDE_SYS_RING_BUFFER_H_ #include -#include +#include #include #include diff --git a/include/sys/util.h b/include/sys/util.h new file mode 100644 index 00000000000000..7121da23b98fcb --- /dev/null +++ b/include/sys/util.h @@ -0,0 +1,797 @@ +/* + * Copyright (c) 2011-2014, Wind River Systems, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file + * @brief Misc utilities + * + * Misc utilities usable by the kernel and application code. + */ + +#ifndef ZEPHYR_INCLUDE_SYS_UTIL_H_ +#define ZEPHYR_INCLUDE_SYS_UTIL_H_ + +#ifndef _ASMLANGUAGE + +#include +#include + +/* Helper to pass a int as a pointer or vice-versa. */ +#define POINTER_TO_UINT(x) ((uintptr_t) (x)) +#define UINT_TO_POINTER(x) ((void *) (uintptr_t) (x)) +#define POINTER_TO_INT(x) ((intptr_t) (x)) +#define INT_TO_POINTER(x) ((void *) (intptr_t) (x)) + +#if !(defined (__CHAR_BIT__) && defined (__SIZEOF_LONG__)) +# error Missing required predefined macros for BITS_PER_LONG calculation +#endif + +#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) +/* Create a contiguous bitmask starting at bit position @l and ending at + * position @h. + */ +#define GENMASK(h, l) \ + (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) + +/* Evaluates to 0 if cond is true-ish; compile error otherwise */ +#define ZERO_OR_COMPILE_ERROR(cond) ((int) sizeof(char[1 - 2 * !(cond)]) - 1) + +/* Evaluates to 0 if array is an array; compile error if not array (e.g. + * pointer) + */ +#define IS_ARRAY(array) \ + ZERO_OR_COMPILE_ERROR( \ + !__builtin_types_compatible_p(__typeof__(array), \ + __typeof__(&(array)[0]))) + +#if defined(__cplusplus) +template < class T, size_t N > +constexpr size_t ARRAY_SIZE(T(&)[N]) { return N; } + +#else +/* Evaluates to number of elements in an array; compile error if not + * an array (e.g. pointer) + */ +#define ARRAY_SIZE(array) \ + ((long) (IS_ARRAY(array) + (sizeof(array) / sizeof((array)[0])))) +#endif + +/* Evaluates to 1 if ptr is part of array, 0 otherwise; compile error if + * "array" argument is not an array (e.g. "ptr" and "array" mixed up) + */ +#define PART_OF_ARRAY(array, ptr) \ + ((ptr) && ((ptr) >= &array[0] && (ptr) < &array[ARRAY_SIZE(array)])) + +#define CONTAINER_OF(ptr, type, field) \ + ((type *)(((char *)(ptr)) - offsetof(type, field))) + +/* round "x" up/down to next multiple of "align" (which must be a power of 2) */ +#define ROUND_UP(x, align) \ + (((unsigned long)(x) + ((unsigned long)(align) - 1)) & \ + ~((unsigned long)(align) - 1)) +#define ROUND_DOWN(x, align) \ + ((unsigned long)(x) & ~((unsigned long)(align) - 1)) + +/* round up/down to the next word boundary */ +#define WB_UP(x) ROUND_UP(x, sizeof(void *)) +#define WB_DN(x) ROUND_DOWN(x, sizeof(void *)) + +#define ceiling_fraction(numerator, divider) \ + (((numerator) + ((divider) - 1)) / (divider)) + +#ifdef INLINED +#define INLINE inline +#else +#define INLINE +#endif + +#ifndef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +static inline bool is_power_of_two(unsigned int x) +{ + return (x != 0U) && ((x & (x - 1)) == 0U); +} + +static inline s64_t arithmetic_shift_right(s64_t value, u8_t shift) +{ + s64_t sign_ext; + + if (shift == 0U) { + return value; + } + + /* extract sign bit */ + sign_ext = (value >> 63) & 1; + + /* make all bits of sign_ext be the same as the value's sign bit */ + sign_ext = -sign_ext; + + /* shift value and fill opened bit positions with sign bit */ + return (value >> shift) | (sign_ext << (64 - shift)); +} + +#endif /* !_ASMLANGUAGE */ + +/* KB, MB, GB */ +#define KB(x) ((x) << 10) +#define MB(x) (KB(x) << 10) +#define GB(x) (MB(x) << 10) + +/* KHZ, MHZ */ +#define KHZ(x) ((x) * 1000) +#define MHZ(x) (KHZ(x) * 1000) + +#ifndef BIT +#if defined(_ASMLANGUAGE) +#define BIT(n) (1 << (n)) +#else +#define BIT(n) (1UL << (n)) +#endif +#endif + +/** + * @brief Macro sets or clears bit depending on boolean value + * + * @param var Variable to be altered + * @param bit Bit number + * @param set Value 0 clears bit, any other value sets bit + */ +#define WRITE_BIT(var, bit, set) \ + ((var) = (set) ? ((var) | BIT(bit)) : ((var) & ~BIT(bit))) + +#define BIT_MASK(n) (BIT(n) - 1) + +/** + * @brief Check for macro definition in compiler-visible expressions + * + * This trick was pioneered in Linux as the config_enabled() macro. + * The madness has the effect of taking a macro value that may be + * defined to "1" (e.g. CONFIG_MYFEATURE), or may not be defined at + * all and turning it into a literal expression that can be used at + * "runtime". That is, it works similarly to + * "defined(CONFIG_MYFEATURE)" does except that it is an expansion + * that can exist in a standard expression and be seen by the compiler + * and optimizer. Thus much ifdef usage can be replaced with cleaner + * expressions like: + * + * if (IS_ENABLED(CONFIG_MYFEATURE)) + * myfeature_enable(); + * + * INTERNAL + * First pass just to expand any existing macros, we need the macro + * value to be e.g. a literal "1" at expansion time in the next macro, + * not "(1)", etc... Standard recursive expansion does not work. + */ +#define IS_ENABLED(config_macro) Z_IS_ENABLED1(config_macro) + +/* Now stick on a "_XXXX" prefix, it will now be "_XXXX1" if config_macro + * is "1", or just "_XXXX" if it's undefined. + * ENABLED: Z_IS_ENABLED2(_XXXX1) + * DISABLED Z_IS_ENABLED2(_XXXX) + */ +#define Z_IS_ENABLED1(config_macro) Z_IS_ENABLED2(_XXXX##config_macro) + +/* Here's the core trick, we map "_XXXX1" to "_YYYY," (i.e. a string + * with a trailing comma), so it has the effect of making this a + * two-argument tuple to the preprocessor only in the case where the + * value is defined to "1" + * ENABLED: _YYYY, <--- note comma! + * DISABLED: _XXXX + */ +#define _XXXX1 _YYYY, + +/* Then we append an extra argument to fool the gcc preprocessor into + * accepting it as a varargs macro. + * arg1 arg2 arg3 + * ENABLED: Z_IS_ENABLED3(_YYYY, 1, 0) + * DISABLED Z_IS_ENABLED3(_XXXX 1, 0) + */ +#define Z_IS_ENABLED2(one_or_two_args) Z_IS_ENABLED3(one_or_two_args true, false) + +/* And our second argument is thus now cooked to be 1 in the case + * where the value is defined to 1, and 0 if not: + */ +#define Z_IS_ENABLED3(ignore_this, val, ...) val + +/** + * @brief Insert code depending on result of flag evaluation. + * + * This is based on same idea as @ref IS_ENABLED macro but as the result of + * flag evaluation provided code is injected. Because preprocessor interprets + * each comma as an argument boundary, code must be provided in the brackets. + * Brackets are stripped away during macro processing. + * + * Usage example: + * + * \#define MACRO(x) COND_CODE_1(CONFIG_FLAG, (u32_t x;), ()) + * + * It can be considered as alternative to: + * + * \#if defined(CONFIG_FLAG) && (CONFIG_FLAG == 1) + * \#define MACRO(x) u32_t x; + * \#else + * \#define MACRO(x) + * \#endif + * + * However, the advantage of that approach is that code is resolved in place + * where it is used while \#if method resolves given macro when header is + * included and product is fixed in the given scope. + * + * @note Flag can also be a result of preprocessor output e.g. + * product of NUM_VA_ARGS_LESS_1(...). + * + * @param _flag Evaluated flag + * @param _if_1_code Code used if flag exists and equal 1. Argument must be + * in brackets. + * @param _else_code Code used if flag doesn't exists or isn't equal 1. + * + */ +#define COND_CODE_1(_flag, _if_1_code, _else_code) \ + Z_COND_CODE_1(_flag, _if_1_code, _else_code) + +#define Z_COND_CODE_1(_flag, _if_1_code, _else_code) \ + __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) + +/** + * @brief Insert code depending on result of flag evaluation. + * + * See @ref COND_CODE_1 for details. + * + * @param _flag Evaluated flag + * @param _if_0_code Code used if flag exists and equal 0. Argument must be + * in brackets. + * @param _else_code Code used if flag doesn't exists or isn't equal 0. + * + */ +#define COND_CODE_0(_flag, _if_0_code, _else_code) \ + Z_COND_CODE_0(_flag, _if_0_code, _else_code) + +#define Z_COND_CODE_0(_flag, _if_0_code, _else_code) \ + __COND_CODE(_ZZZZ##_flag, _if_0_code, _else_code) + +#define _ZZZZ0 _YYYY, + +/* Macro used internally by @ref COND_CODE_1 and @ref COND_CODE_0. */ +#define __COND_CODE(one_or_two_args, _if_code, _else_code) \ + __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) + +/* Macro used internally to remove brackets from argument. */ +#define __DEBRACKET(...) __VA_ARGS__ + +/* Macro used internally for getting second argument and removing brackets + * around that argument. It is expected that parameter is provided in brackets + */ +#define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val + +/** + * @brief Get first argument from variable list of arguments + */ +#define GET_ARG1(arg1, ...) arg1 + +/** + * @brief Get second argument from variable list of arguments + */ +#define GET_ARG2(arg1, arg2, ...) arg2 + +/** + * @brief Get all arguments except the first one. + */ +#define GET_ARGS_LESS_1(val, ...) __VA_ARGS__ + +/** + * Macros for doing code-generation with the preprocessor. + * + * Generally it is better to generate code with the preprocessor than + * to copy-paste code or to generate code with the build system / + * python script's etc. + * + * http://stackoverflow.com/a/12540675 + */ +#define UTIL_EMPTY(...) +#define UTIL_DEFER(...) __VA_ARGS__ UTIL_EMPTY() +#define UTIL_OBSTRUCT(...) __VA_ARGS__ UTIL_DEFER(UTIL_EMPTY)() +#define UTIL_EXPAND(...) __VA_ARGS__ + +#define UTIL_EVAL(...) UTIL_EVAL1(UTIL_EVAL1(UTIL_EVAL1(__VA_ARGS__))) +#define UTIL_EVAL1(...) UTIL_EVAL2(UTIL_EVAL2(UTIL_EVAL2(__VA_ARGS__))) +#define UTIL_EVAL2(...) UTIL_EVAL3(UTIL_EVAL3(UTIL_EVAL3(__VA_ARGS__))) +#define UTIL_EVAL3(...) UTIL_EVAL4(UTIL_EVAL4(UTIL_EVAL4(__VA_ARGS__))) +#define UTIL_EVAL4(...) UTIL_EVAL5(UTIL_EVAL5(UTIL_EVAL5(__VA_ARGS__))) +#define UTIL_EVAL5(...) __VA_ARGS__ + +#define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) +#define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__ + +#define UTIL_INC(x) UTIL_PRIMITIVE_CAT(UTIL_INC_, x) +#define UTIL_INC_0 1 +#define UTIL_INC_1 2 +#define UTIL_INC_2 3 +#define UTIL_INC_3 4 +#define UTIL_INC_4 5 +#define UTIL_INC_5 6 +#define UTIL_INC_6 7 +#define UTIL_INC_7 8 +#define UTIL_INC_8 9 +#define UTIL_INC_9 10 +#define UTIL_INC_10 11 +#define UTIL_INC_11 12 +#define UTIL_INC_12 13 +#define UTIL_INC_13 14 +#define UTIL_INC_14 15 +#define UTIL_INC_15 16 +#define UTIL_INC_16 17 +#define UTIL_INC_17 18 +#define UTIL_INC_18 19 +#define UTIL_INC_19 19 + +#define UTIL_DEC(x) UTIL_PRIMITIVE_CAT(UTIL_DEC_, x) +#define UTIL_DEC_0 0 +#define UTIL_DEC_1 0 +#define UTIL_DEC_2 1 +#define UTIL_DEC_3 2 +#define UTIL_DEC_4 3 +#define UTIL_DEC_5 4 +#define UTIL_DEC_6 5 +#define UTIL_DEC_7 6 +#define UTIL_DEC_8 7 +#define UTIL_DEC_9 8 +#define UTIL_DEC_10 9 +#define UTIL_DEC_11 10 +#define UTIL_DEC_12 11 +#define UTIL_DEC_13 12 +#define UTIL_DEC_14 13 +#define UTIL_DEC_15 14 +#define UTIL_DEC_16 15 +#define UTIL_DEC_17 16 +#define UTIL_DEC_18 17 +#define UTIL_DEC_19 18 +#define UTIL_DEC_20 19 +#define UTIL_DEC_21 20 +#define UTIL_DEC_22 21 +#define UTIL_DEC_23 22 +#define UTIL_DEC_24 23 +#define UTIL_DEC_25 24 +#define UTIL_DEC_26 25 +#define UTIL_DEC_27 26 +#define UTIL_DEC_28 27 +#define UTIL_DEC_29 28 +#define UTIL_DEC_30 29 +#define UTIL_DEC_31 30 +#define UTIL_DEC_32 31 +#define UTIL_DEC_33 32 +#define UTIL_DEC_34 33 +#define UTIL_DEC_35 34 +#define UTIL_DEC_36 35 +#define UTIL_DEC_37 36 +#define UTIL_DEC_38 37 +#define UTIL_DEC_39 38 +#define UTIL_DEC_40 39 +#define UTIL_DEC_41 40 +#define UTIL_DEC_42 41 +#define UTIL_DEC_43 42 +#define UTIL_DEC_44 43 +#define UTIL_DEC_45 44 +#define UTIL_DEC_46 45 +#define UTIL_DEC_47 46 +#define UTIL_DEC_48 47 +#define UTIL_DEC_49 48 +#define UTIL_DEC_50 49 +#define UTIL_DEC_51 50 +#define UTIL_DEC_52 51 +#define UTIL_DEC_53 52 +#define UTIL_DEC_54 53 +#define UTIL_DEC_55 54 +#define UTIL_DEC_56 55 +#define UTIL_DEC_57 56 +#define UTIL_DEC_58 57 +#define UTIL_DEC_59 58 +#define UTIL_DEC_60 59 +#define UTIL_DEC_61 60 +#define UTIL_DEC_62 61 +#define UTIL_DEC_63 62 +#define UTIL_DEC_64 63 +#define UTIL_DEC_65 64 +#define UTIL_DEC_66 65 +#define UTIL_DEC_67 66 +#define UTIL_DEC_68 67 +#define UTIL_DEC_69 68 +#define UTIL_DEC_70 69 +#define UTIL_DEC_71 70 +#define UTIL_DEC_72 71 +#define UTIL_DEC_73 72 +#define UTIL_DEC_74 73 +#define UTIL_DEC_75 74 +#define UTIL_DEC_76 75 +#define UTIL_DEC_77 76 +#define UTIL_DEC_78 77 +#define UTIL_DEC_79 78 +#define UTIL_DEC_80 79 +#define UTIL_DEC_81 80 +#define UTIL_DEC_82 81 +#define UTIL_DEC_83 82 +#define UTIL_DEC_84 83 +#define UTIL_DEC_85 84 +#define UTIL_DEC_86 85 +#define UTIL_DEC_87 86 +#define UTIL_DEC_88 87 +#define UTIL_DEC_89 88 +#define UTIL_DEC_90 89 +#define UTIL_DEC_91 90 +#define UTIL_DEC_92 91 +#define UTIL_DEC_93 92 +#define UTIL_DEC_94 93 +#define UTIL_DEC_95 94 +#define UTIL_DEC_96 95 +#define UTIL_DEC_97 96 +#define UTIL_DEC_98 97 +#define UTIL_DEC_99 98 +#define UTIL_DEC_100 99 +#define UTIL_DEC_101 100 +#define UTIL_DEC_102 101 +#define UTIL_DEC_103 102 +#define UTIL_DEC_104 103 +#define UTIL_DEC_105 104 +#define UTIL_DEC_106 105 +#define UTIL_DEC_107 106 +#define UTIL_DEC_108 107 +#define UTIL_DEC_109 108 +#define UTIL_DEC_110 109 +#define UTIL_DEC_111 110 +#define UTIL_DEC_112 111 +#define UTIL_DEC_113 112 +#define UTIL_DEC_114 113 +#define UTIL_DEC_115 114 +#define UTIL_DEC_116 115 +#define UTIL_DEC_117 116 +#define UTIL_DEC_118 117 +#define UTIL_DEC_119 118 +#define UTIL_DEC_120 119 +#define UTIL_DEC_121 120 +#define UTIL_DEC_122 121 +#define UTIL_DEC_123 122 +#define UTIL_DEC_124 123 +#define UTIL_DEC_125 124 +#define UTIL_DEC_126 125 +#define UTIL_DEC_127 126 +#define UTIL_DEC_128 127 +#define UTIL_DEC_129 128 +#define UTIL_DEC_130 129 +#define UTIL_DEC_131 130 +#define UTIL_DEC_132 131 +#define UTIL_DEC_133 132 +#define UTIL_DEC_134 133 +#define UTIL_DEC_135 134 +#define UTIL_DEC_136 135 +#define UTIL_DEC_137 136 +#define UTIL_DEC_138 137 +#define UTIL_DEC_139 138 +#define UTIL_DEC_140 139 +#define UTIL_DEC_141 140 +#define UTIL_DEC_142 141 +#define UTIL_DEC_143 142 +#define UTIL_DEC_144 143 +#define UTIL_DEC_145 144 +#define UTIL_DEC_146 145 +#define UTIL_DEC_147 146 +#define UTIL_DEC_148 147 +#define UTIL_DEC_149 148 +#define UTIL_DEC_150 149 +#define UTIL_DEC_151 150 +#define UTIL_DEC_152 151 +#define UTIL_DEC_153 152 +#define UTIL_DEC_154 153 +#define UTIL_DEC_155 154 +#define UTIL_DEC_156 155 +#define UTIL_DEC_157 156 +#define UTIL_DEC_158 157 +#define UTIL_DEC_159 158 +#define UTIL_DEC_160 159 +#define UTIL_DEC_161 160 +#define UTIL_DEC_162 161 +#define UTIL_DEC_163 162 +#define UTIL_DEC_164 163 +#define UTIL_DEC_165 164 +#define UTIL_DEC_166 165 +#define UTIL_DEC_167 166 +#define UTIL_DEC_168 167 +#define UTIL_DEC_169 168 +#define UTIL_DEC_170 169 +#define UTIL_DEC_171 170 +#define UTIL_DEC_172 171 +#define UTIL_DEC_173 172 +#define UTIL_DEC_174 173 +#define UTIL_DEC_175 174 +#define UTIL_DEC_176 175 +#define UTIL_DEC_177 176 +#define UTIL_DEC_178 177 +#define UTIL_DEC_179 178 +#define UTIL_DEC_180 179 +#define UTIL_DEC_181 180 +#define UTIL_DEC_182 181 +#define UTIL_DEC_183 182 +#define UTIL_DEC_184 183 +#define UTIL_DEC_185 184 +#define UTIL_DEC_186 185 +#define UTIL_DEC_187 186 +#define UTIL_DEC_188 187 +#define UTIL_DEC_189 188 +#define UTIL_DEC_190 189 +#define UTIL_DEC_191 190 +#define UTIL_DEC_192 191 +#define UTIL_DEC_193 192 +#define UTIL_DEC_194 193 +#define UTIL_DEC_195 194 +#define UTIL_DEC_196 195 +#define UTIL_DEC_197 196 +#define UTIL_DEC_198 197 +#define UTIL_DEC_199 198 +#define UTIL_DEC_200 199 +#define UTIL_DEC_201 200 +#define UTIL_DEC_202 201 +#define UTIL_DEC_203 202 +#define UTIL_DEC_204 203 +#define UTIL_DEC_205 204 +#define UTIL_DEC_206 205 +#define UTIL_DEC_207 206 +#define UTIL_DEC_208 207 +#define UTIL_DEC_209 208 +#define UTIL_DEC_210 209 +#define UTIL_DEC_211 210 +#define UTIL_DEC_212 211 +#define UTIL_DEC_213 212 +#define UTIL_DEC_214 213 +#define UTIL_DEC_215 214 +#define UTIL_DEC_216 215 +#define UTIL_DEC_217 216 +#define UTIL_DEC_218 217 +#define UTIL_DEC_219 218 +#define UTIL_DEC_220 219 +#define UTIL_DEC_221 220 +#define UTIL_DEC_222 221 +#define UTIL_DEC_223 222 +#define UTIL_DEC_224 223 +#define UTIL_DEC_225 224 +#define UTIL_DEC_226 225 +#define UTIL_DEC_227 226 +#define UTIL_DEC_228 227 +#define UTIL_DEC_229 228 +#define UTIL_DEC_230 229 +#define UTIL_DEC_231 230 +#define UTIL_DEC_232 231 +#define UTIL_DEC_233 232 +#define UTIL_DEC_234 233 +#define UTIL_DEC_235 234 +#define UTIL_DEC_236 235 +#define UTIL_DEC_237 236 +#define UTIL_DEC_238 237 +#define UTIL_DEC_239 238 +#define UTIL_DEC_240 239 +#define UTIL_DEC_241 240 +#define UTIL_DEC_242 241 +#define UTIL_DEC_243 242 +#define UTIL_DEC_244 243 +#define UTIL_DEC_245 244 +#define UTIL_DEC_246 245 +#define UTIL_DEC_247 246 +#define UTIL_DEC_248 247 +#define UTIL_DEC_249 248 +#define UTIL_DEC_250 249 +#define UTIL_DEC_251 250 +#define UTIL_DEC_252 251 +#define UTIL_DEC_253 252 +#define UTIL_DEC_254 253 +#define UTIL_DEC_255 254 +#define UTIL_DEC_256 255 + +#define UTIL_CHECK_N(x, n, ...) n +#define UTIL_CHECK(...) UTIL_CHECK_N(__VA_ARGS__, 0,) + +#define UTIL_NOT(x) UTIL_CHECK(UTIL_PRIMITIVE_CAT(UTIL_NOT_, x)) +#define UTIL_NOT_0 ~, 1, + +#define UTIL_COMPL(b) UTIL_PRIMITIVE_CAT(UTIL_COMPL_, b) +#define UTIL_COMPL_0 1 +#define UTIL_COMPL_1 0 + +#define UTIL_BOOL(x) UTIL_COMPL(UTIL_NOT(x)) + +#define UTIL_IIF(c) UTIL_PRIMITIVE_CAT(UTIL_IIF_, c) +#define UTIL_IIF_0(t, ...) __VA_ARGS__ +#define UTIL_IIF_1(t, ...) t + +#define UTIL_IF(c) UTIL_IIF(UTIL_BOOL(c)) + +#define UTIL_EAT(...) +#define UTIL_EXPAND(...) __VA_ARGS__ +#define UTIL_WHEN(c) UTIL_IF(c)(UTIL_EXPAND, UTIL_EAT) + +#define UTIL_REPEAT(count, macro, ...) \ + UTIL_WHEN(count) \ + ( \ + UTIL_OBSTRUCT(UTIL_REPEAT_INDIRECT) () \ + ( \ + UTIL_DEC(count), macro, __VA_ARGS__ \ + ) \ + UTIL_OBSTRUCT(macro) \ + ( \ + UTIL_DEC(count), __VA_ARGS__ \ + ) \ + ) +#define UTIL_REPEAT_INDIRECT() UTIL_REPEAT + +/** + * Generates a sequence of code. + * Useful for generating code like; + * + * NRF_PWM0, NRF_PWM1, NRF_PWM2, + * + * @arg LEN: The length of the sequence. Must be defined and less than + * 20. + * + * @arg F(i, F_ARG): A macro function that accepts two arguments. + * F is called repeatedly, the first argument + * is the index in the sequence, and the second argument is the third + * argument given to UTIL_LISTIFY. + * + * Example: + * + * \#define FOO(i, _) NRF_PWM ## i , + * { UTIL_LISTIFY(PWM_COUNT, FOO) } + * The above two lines will generate the below: + * { NRF_PWM0 , NRF_PWM1 , } + * + * @note Calling UTIL_LISTIFY with undefined arguments has undefined + * behavior. + */ +#define UTIL_LISTIFY(LEN, F, F_ARG) UTIL_EVAL(UTIL_REPEAT(LEN, F, F_ARG)) + +/**@brief Implementation details for NUM_VAR_ARGS */ +#define NUM_VA_ARGS_LESS_1_IMPL( \ + _ignored, \ + _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ + _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ + _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ + _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \ + _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \ + _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \ + _61, _62, N, ...) N + +/**@brief Macro to get the number of arguments in a call variadic macro call. + * First argument is not counted. + * + * param[in] ... List of arguments + * + * @retval Number of variadic arguments in the argument list + */ +#define NUM_VA_ARGS_LESS_1(...) \ + NUM_VA_ARGS_LESS_1_IMPL(__VA_ARGS__, 63, 62, 61, \ + 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, \ + 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ + 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \ + 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \ + 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ + 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, ~) + +/** + * @brief Mapping macro + * + * Macro that process all arguments using given macro + * + * @param ... Macro name to be used for argument processing followed by + * arguments to process. Macro should have following + * form: MACRO(argument). + * + * @return All arguments processed by given macro + */ +#define MACRO_MAP(...) MACRO_MAP_(__VA_ARGS__) +#define MACRO_MAP_(...) \ + /* To make sure it works also for 2 arguments in total */ \ + MACRO_MAP_N(NUM_VA_ARGS_LESS_1(__VA_ARGS__), __VA_ARGS__) + +/** + * @brief Mapping N arguments macro + * + * Macro similar to @ref MACRO_MAP but maps exact number of arguments. + * If there is more arguments given, the rest would be ignored. + * + * @param N Number of arguments to map + * @param ... Macro name to be used for argument processing followed by + * arguments to process. Macro should have following + * form: MACRO(argument). + * + * @return Selected number of arguments processed by given macro + */ +#define MACRO_MAP_N(N, ...) MACRO_MAP_N_(N, __VA_ARGS__) +#define MACRO_MAP_N_(N, ...) UTIL_CAT(MACRO_MAP_, N)(__VA_ARGS__,) + +#define MACRO_MAP_0(...) +#define MACRO_MAP_1(macro, a, ...) macro(a) +#define MACRO_MAP_2(macro, a, ...) macro(a)MACRO_MAP_1(macro, __VA_ARGS__,) +#define MACRO_MAP_3(macro, a, ...) macro(a)MACRO_MAP_2(macro, __VA_ARGS__,) +#define MACRO_MAP_4(macro, a, ...) macro(a)MACRO_MAP_3(macro, __VA_ARGS__,) +#define MACRO_MAP_5(macro, a, ...) macro(a)MACRO_MAP_4(macro, __VA_ARGS__,) +#define MACRO_MAP_6(macro, a, ...) macro(a)MACRO_MAP_5(macro, __VA_ARGS__,) +#define MACRO_MAP_7(macro, a, ...) macro(a)MACRO_MAP_6(macro, __VA_ARGS__,) +#define MACRO_MAP_8(macro, a, ...) macro(a)MACRO_MAP_7(macro, __VA_ARGS__,) +#define MACRO_MAP_9(macro, a, ...) macro(a)MACRO_MAP_8(macro, __VA_ARGS__,) +#define MACRO_MAP_10(macro, a, ...) macro(a)MACRO_MAP_9(macro, __VA_ARGS__,) +#define MACRO_MAP_11(macro, a, ...) macro(a)MACRO_MAP_10(macro, __VA_ARGS__,) +#define MACRO_MAP_12(macro, a, ...) macro(a)MACRO_MAP_11(macro, __VA_ARGS__,) +#define MACRO_MAP_13(macro, a, ...) macro(a)MACRO_MAP_12(macro, __VA_ARGS__,) +#define MACRO_MAP_14(macro, a, ...) macro(a)MACRO_MAP_13(macro, __VA_ARGS__,) +#define MACRO_MAP_15(macro, a, ...) macro(a)MACRO_MAP_14(macro, __VA_ARGS__,) +/* + * The following provides variadic preprocessor macro support to + * help eliminate multiple, repetitive function/macro calls. This + * allows up to 10 "arguments" in addition to z_call . + * Note - derived from work on: + * https://codecraft.co/2014/11/25/variadic-macros-tricks/ + */ + +#define Z_GET_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N + +#define _for_0(z_call, ...) +#define _for_1(z_call, x) z_call(x) +#define _for_2(z_call, x, ...) z_call(x) _for_1(z_call, ##__VA_ARGS__) +#define _for_3(z_call, x, ...) z_call(x) _for_2(z_call, ##__VA_ARGS__) +#define _for_4(z_call, x, ...) z_call(x) _for_3(z_call, ##__VA_ARGS__) +#define _for_5(z_call, x, ...) z_call(x) _for_4(z_call, ##__VA_ARGS__) +#define _for_6(z_call, x, ...) z_call(x) _for_5(z_call, ##__VA_ARGS__) +#define _for_7(z_call, x, ...) z_call(x) _for_6(z_call, ##__VA_ARGS__) +#define _for_8(z_call, x, ...) z_call(x) _for_7(z_call, ##__VA_ARGS__) +#define _for_9(z_call, x, ...) z_call(x) _for_8(z_call, ##__VA_ARGS__) +#define _for_10(z_call, x, ...) z_call(x) _for_9(z_call, ##__VA_ARGS__) + +#define FOR_EACH(x, ...) \ + Z_GET_ARG(__VA_ARGS__, \ + _for_10, _for_9, _for_8, _for_7, _for_6, _for_5, \ + _for_4, _for_3, _for_2, _for_1, _for_0)(x, ##__VA_ARGS__) + +/* FOR_EACH_FIXED_ARG is used for calling the same function + * With one fixed argument and changing 2nd argument. + */ + +#define z_rep_0(_fn, f, ...) +#define z_rep_1(_fn, f, x) {_fn(x, f); z_rep_0(_fn, f)} +#define z_rep_2(_fn, f, x, ...) {_fn(x, f); z_rep_1(_fn, f, ##__VA_ARGS__)} +#define z_rep_3(_fn, f, x, ...) {_fn(x, f); z_rep_2(_fn, f, ##__VA_ARGS__)} +#define z_rep_4(_fn, f, x, ...) {_fn(x, f); z_rep_3(_fn, f, ##__VA_ARGS__)} +#define z_rep_5(_fn, f, x, ...) {_fn(x, f); z_rep_4(_fn, f, ##__VA_ARGS__)} +#define z_rep_6(_fn, f, x, ...) {_fn(x, f); z_rep_5(_fn, f, ##__VA_ARGS__)} +#define z_rep_7(_fn, f, x, ...) {_fn(x, f); z_rep_6(_fn, f, ##__VA_ARGS__)} +#define z_rep_8(_fn, f, x, ...) {_fn(x, f); z_rep_7(_fn, f, ##__VA_ARGS__)} +#define z_rep_9(_fn, f, x, ...) {_fn(x, f); z_rep_8(_fn, f, ##__VA_ARGS__)} +#define z_rep_10(_fn, f, x, ...) {_fn(x, f); z_rep_9(_fn, f, ##__VA_ARGS__)} +#define z_rep_11(_fn, f, x, ...) {_fn(x, f); z_rep_10(_fn, f, ##__VA_ARGS__)} +#define z_rep_12(_fn, f, x, ...) {_fn(x, f); z_rep_11(_fn, f, ##__VA_ARGS__)} +#define z_rep_13(_fn, f, x, ...) {_fn(x, f); z_rep_12(_fn, f, ##__VA_ARGS__)} +#define z_rep_14(_fn, f, x, ...) {_fn(x, f); z_rep_13(_fn, f, ##__VA_ARGS__)} +#define z_rep_15(_fn, f, x, ...) {_fn(x, f); z_rep_14(_fn, f, ##__VA_ARGS__)} +#define z_rep_16(_fn, f, x, ...) {_fn(x, f); z_rep_15(_fn, f, ##__VA_ARGS__)} +#define z_rep_17(_fn, f, x, ...) {_fn(x, f); z_rep_16(_fn, f, ##__VA_ARGS__)} +#define z_rep_18(_fn, f, x, ...) {_fn(x, f); z_rep_17(_fn, f, ##__VA_ARGS__)} +#define z_rep_19(_fn, f, x, ...) {_fn(x, f); z_rep_18(_fn, f, ##__VA_ARGS__)} +#define z_rep_20(_fn, f, x, ...) {_fn(x, f); z_rep_19(_fn, f, ##__VA_ARGS__)} + + +#define Z_GET_ARG_2(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, \ + _14, _15, _16, _17, _18, _19, _20, N, ...) N + +#define FOR_EACH_FIXED_ARG(fixed_arg, x, ...) \ + {Z_GET_ARG_2(__VA_ARGS__, \ + z_rep_20, z_rep_19, z_rep_18, z_rep_17, z_rep_16, \ + z_rep_15, z_rep_14, z_rep_13, z_rep_12, z_rep_11, \ + z_rep_10, z_rep_9, z_rep_8, z_rep_7, z_rep_6, \ + z_rep_5, z_rep_4, z_rep_3, z_rep_2, z_rep_1, z_rep_0) \ + (fixed_arg, x, ##__VA_ARGS__)} + +#endif /* ZEPHYR_INCLUDE_SYS_UTIL_H_ */ diff --git a/include/sys_clock.h b/include/sys_clock.h index 290d4ee2cda9c1..2566c56306a975 100644 --- a/include/sys_clock.h +++ b/include/sys_clock.h @@ -16,7 +16,7 @@ #ifndef ZEPHYR_INCLUDE_SYS_CLOCK_H_ #define ZEPHYR_INCLUDE_SYS_CLOCK_H_ -#include +#include #include #ifdef __cplusplus diff --git a/kernel/device.c b/kernel/device.c index 604dfd564887b4..496dd39d6a9043 100644 --- a/kernel/device.c +++ b/kernel/device.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/kernel/include/kernel_structs.h b/kernel/include/kernel_structs.h index 357996e9974b72..7837c384be20da 100644 --- a/kernel/include/kernel_structs.h +++ b/kernel/include/kernel_structs.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #endif diff --git a/kernel/poll.c b/kernel/poll.c index ed5fabd31ba6e0..a3c088cc21ad49 100644 --- a/kernel/poll.c +++ b/kernel/poll.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/lib/libc/minimal/source/stdout/prf.c b/lib/libc/minimal/source/stdout/prf.c index 526ad0f833f53a..56d2ee84fb96ff 100644 --- a/lib/libc/minimal/source/stdout/prf.c +++ b/lib/libc/minimal/source/stdout/prf.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #ifndef MAXFLD #define MAXFLD 200 diff --git a/lib/libc/newlib/libc-hooks.c b/lib/libc/newlib/libc-hooks.c index 4b40c1bff1f1b8..9e1be4187378bd 100644 --- a/lib/libc/newlib/libc-hooks.c +++ b/lib/libc/newlib/libc-hooks.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lib/os/json.c b/lib/os/json.c index f6dcb6ed8bf76f..681001487339fe 100644 --- a/lib/os/json.c +++ b/lib/os/json.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/samples/basic/button/src/main.c b/samples/basic/button/src/main.c index d443571f0a728e..474da8b8410b21 100644 --- a/samples/basic/button/src/main.c +++ b/samples/basic/button/src/main.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include /* change this to use another GPIO port */ diff --git a/samples/bluetooth/beacon/src/main.c b/samples/bluetooth/beacon/src/main.c index feb19728aea028..c7c4b13fe374b8 100644 --- a/samples/bluetooth/beacon/src/main.c +++ b/samples/bluetooth/beacon/src/main.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/bluetooth/eddystone/src/main.c b/samples/bluetooth/eddystone/src/main.c index a19ef286c06410..47b31bc4b2d63b 100644 --- a/samples/bluetooth/eddystone/src/main.c +++ b/samples/bluetooth/eddystone/src/main.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/bluetooth/hci_uart/src/main.c b/samples/bluetooth/hci_uart/src/main.c index f7adf0c8a2c326..0339b92eb5c3aa 100644 --- a/samples/bluetooth/hci_uart/src/main.c +++ b/samples/bluetooth/hci_uart/src/main.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/bluetooth/ibeacon/src/main.c b/samples/bluetooth/ibeacon/src/main.c index 008ea73881e151..963b4bd770a1ea 100644 --- a/samples/bluetooth/ibeacon/src/main.c +++ b/samples/bluetooth/ibeacon/src/main.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/bluetooth/scan_adv/src/main.c b/samples/bluetooth/scan_adv/src/main.c index 66c3bf866ab5b8..0315e3780761ad 100644 --- a/samples/bluetooth/scan_adv/src/main.c +++ b/samples/bluetooth/scan_adv/src/main.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/boards/altera_max10/pio/src/main.c b/samples/boards/altera_max10/pio/src/main.c index 4fc456ab18dc46..98b56f29b3be42 100644 --- a/samples/boards/altera_max10/pio/src/main.c +++ b/samples/boards/altera_max10/pio/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include /* GPIO driver name */ #define GPIO_DRV_NAME CONFIG_GPIO_ALTERA_NIOS2_OUTPUT_DEV_NAME diff --git a/samples/boards/arduino_101/environmental_sensing/sensor/src/main.c b/samples/boards/arduino_101/environmental_sensing/sensor/src/main.c index 6776b48e35bdd2..11dac4661be25d 100644 --- a/samples/boards/arduino_101/environmental_sensing/sensor/src/main.c +++ b/samples/boards/arduino_101/environmental_sensing/sensor/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/boards/up_squared/gpio_counter/src/main.c b/samples/boards/up_squared/gpio_counter/src/main.c index c0d1b638998b4a..fddeead8a9d1ce 100644 --- a/samples/boards/up_squared/gpio_counter/src/main.c +++ b/samples/boards/up_squared/gpio_counter/src/main.c @@ -11,7 +11,7 @@ #include #include -#include +#include /** * @file diff --git a/samples/drivers/gpio/src/main.c b/samples/drivers/gpio/src/main.c index 4646cccb9fda22..5e3b5a2d99db7f 100644 --- a/samples/drivers/gpio/src/main.c +++ b/samples/drivers/gpio/src/main.c @@ -18,7 +18,7 @@ #include #include -#include +#include #if defined(SW0_GPIO_CONTROLLER) && defined(LED0_GPIO_CONTROLLER) #define GPIO_OUT_DRV_NAME LED0_GPIO_CONTROLLER diff --git a/samples/drivers/led_apa102/src/main.c b/samples/drivers/led_apa102/src/main.c index 64ce8ccb7ba70c..336c8253bc6159 100644 --- a/samples/drivers/led_apa102/src/main.c +++ b/samples/drivers/led_apa102/src/main.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(main); #include #include #include -#include +#include /* * Number of RGB LEDs in the LED strip, adjust as needed. diff --git a/samples/drivers/led_lp3943/src/main.c b/samples/drivers/led_lp3943/src/main.c index bcb46d77171578..26bf51d1bbb04b 100644 --- a/samples/drivers/led_lp3943/src/main.c +++ b/samples/drivers/led_lp3943/src/main.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL diff --git a/samples/drivers/led_lp5562/src/main.c b/samples/drivers/led_lp5562/src/main.c index cd96d307396a63..95f53e8a612eac 100644 --- a/samples/drivers/led_lp5562/src/main.c +++ b/samples/drivers/led_lp5562/src/main.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #define LOG_LEVEL 4 diff --git a/samples/drivers/led_lpd8806/src/main.c b/samples/drivers/led_lpd8806/src/main.c index 7eaf2f0b0c683c..54104298ad8c81 100644 --- a/samples/drivers/led_lpd8806/src/main.c +++ b/samples/drivers/led_lpd8806/src/main.c @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(main); #include #include #include -#include +#include /* * Number of RGB LEDs in the LED strip, adjust as needed. diff --git a/samples/drivers/led_pca9633/src/main.c b/samples/drivers/led_pca9633/src/main.c index c46f5d75d29aa3..b9e21cacce7572 100644 --- a/samples/drivers/led_pca9633/src/main.c +++ b/samples/drivers/led_pca9633/src/main.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL diff --git a/samples/drivers/led_ws2812/src/main.c b/samples/drivers/led_ws2812/src/main.c index 231016b37c26cb..f3543df8a324bd 100644 --- a/samples/drivers/led_ws2812/src/main.c +++ b/samples/drivers/led_ws2812/src/main.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(main); #include #include #include -#include +#include /* * Number of RGB LEDs in the LED strip, adjust as needed. diff --git a/samples/net/nats/src/nats.c b/samples/net/nats/src/nats.c index fca9e192210a23..37daaacc736331 100644 --- a/samples/net/nats/src/nats.c +++ b/samples/net/nats/src/nats.c @@ -11,7 +11,7 @@ LOG_MODULE_DECLARE(net_nats_sample, LOG_LEVEL_DBG); #include #include #include -#include +#include #include #include #include diff --git a/samples/sensor/hts221/src/main.c b/samples/sensor/hts221/src/main.c index af59c3768bbc30..770572d4677245 100644 --- a/samples/sensor/hts221/src/main.c +++ b/samples/sensor/hts221/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include static void process_sample(struct device *dev) { diff --git a/samples/sensor/lsm303dlhc/src/main.c b/samples/sensor/lsm303dlhc/src/main.c index 961342e7979177..c65dbf5a1ab550 100644 --- a/samples/sensor/lsm303dlhc/src/main.c +++ b/samples/sensor/lsm303dlhc/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include static s32_t read_sensor(struct device *sensor, enum sensor_channel channel) { diff --git a/samples/sensor/lsm6dsl/src/main.c b/samples/sensor/lsm6dsl/src/main.c index eadf63b3b6264d..fd1e0936544e7b 100644 --- a/samples/sensor/lsm6dsl/src/main.c +++ b/samples/sensor/lsm6dsl/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include static inline float out_ev(struct sensor_value *val) { diff --git a/samples/sensor/th02/src/main.c b/samples/sensor/th02/src/main.c index 1db018fc71e040..e5ad9185537a24 100644 --- a/samples/sensor/th02/src/main.c +++ b/samples/sensor/th02/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #ifdef CONFIG_GROVE_LCD_RGB #include diff --git a/samples/shields/x_nucleo_iks01a1/src/main.c b/samples/shields/x_nucleo_iks01a1/src/main.c index e6441adb543b83..1d23b3b860a023 100644 --- a/samples/shields/x_nucleo_iks01a1/src/main.c +++ b/samples/shields/x_nucleo_iks01a1/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include void main(void) { diff --git a/samples/shields/x_nucleo_iks01a2/src/main.c b/samples/shields/x_nucleo_iks01a2/src/main.c index a3e34f340162f2..72098aa763bf81 100644 --- a/samples/shields/x_nucleo_iks01a2/src/main.c +++ b/samples/shields/x_nucleo_iks01a2/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include void main(void) { diff --git a/samples/subsys/usb/console/src/main.c b/samples/subsys/usb/console/src/main.c index e3f79b159bdc6f..db23e528cde691 100644 --- a/samples/subsys/usb/console/src/main.c +++ b/samples/subsys/usb/console/src/main.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include void main(void) diff --git a/samples/userspace/shared_mem/src/main.h b/samples/userspace/shared_mem/src/main.h index 471d1bb3e252b5..78ce2cf3024907 100644 --- a/samples/userspace/shared_mem/src/main.h +++ b/samples/userspace/shared_mem/src/main.h @@ -14,7 +14,7 @@ #include #include -#include +#include #if defined(CONFIG_ARC) #include diff --git a/soc/arc/quark_se_c1000_ss/soc.h b/soc/arc/quark_se_c1000_ss/soc.h index e9202712ab1c7e..547d0be349bc37 100644 --- a/soc/arc/quark_se_c1000_ss/soc.h +++ b/soc/arc/quark_se_c1000_ss/soc.h @@ -14,7 +14,7 @@ #ifndef _BOARD__H_ #define _BOARD__H_ -#include +#include /* default system clock */ @@ -97,7 +97,7 @@ #ifndef _ASMLANGUAGE -#include +#include #include #include diff --git a/soc/arc/snps_arc_iot/soc.h b/soc/arc/snps_arc_iot/soc.h index 2c784c475e0e53..0f1fdd961b97ed 100644 --- a/soc/arc/snps_arc_iot/soc.h +++ b/soc/arc/snps_arc_iot/soc.h @@ -14,7 +14,7 @@ #ifndef _SOC_H_ #define _SOC_H_ -#include +#include /* default system clock */ #define SYSCLK_DEFAULT_IOSC_HZ MHZ(16) @@ -36,7 +36,7 @@ #ifndef _ASMLANGUAGE -#include +#include #include /* diff --git a/soc/arc/snps_emsk/soc.h b/soc/arc/snps_emsk/soc.h index 638504995bb0ad..58920ce56f108a 100644 --- a/soc/arc/snps_emsk/soc.h +++ b/soc/arc/snps_emsk/soc.h @@ -14,7 +14,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include /* default system clock */ /* On the EM Starter Kit board, the peripheral bus clock frequency is 50Mhz */ @@ -39,7 +39,7 @@ #ifndef _ASMLANGUAGE -#include +#include #include #define INT_ENABLE_ARC ~(0x00000001 << 8) diff --git a/soc/arc/snps_nsim/soc.h b/soc/arc/snps_nsim/soc.h index a01ee1463b3684..cf1db4748cb732 100644 --- a/soc/arc/snps_nsim/soc.h +++ b/soc/arc/snps_nsim/soc.h @@ -14,7 +14,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include /* ARC EM Core IRQs */ #define IRQ_TIMER0 16 @@ -24,7 +24,7 @@ #ifndef _ASMLANGUAGE -#include +#include #include #define INT_ENABLE_ARC ~(0x00000001 << 8) diff --git a/soc/arm/arm/mps2/soc_registers.h b/soc/arm/arm/mps2/soc_registers.h index 4ea4a94855d8d3..947ab9868f026b 100644 --- a/soc/arm/arm/mps2/soc_registers.h +++ b/soc/arm/arm/mps2/soc_registers.h @@ -12,7 +12,7 @@ #ifndef _ARM_MPS2_REGS_H_ #define _ARM_MPS2_REGS_H_ -#include +#include #include /* Registers in the FPGA system control block */ diff --git a/soc/arm/arm/musca_a/soc.h b/soc/arm/arm/musca_a/soc.h index 9094348b47b09b..dca8de41bdd279 100644 --- a/soc/arm/arm/musca_a/soc.h +++ b/soc/arm/arm/musca_a/soc.h @@ -10,7 +10,7 @@ #ifndef _ASMLANGUAGE #include "system_cmsdk_musca.h" #include -#include +#include #endif extern void wakeup_cpu1(void); diff --git a/soc/arm/arm/musca_b1/soc.h b/soc/arm/arm/musca_b1/soc.h index fdb3669d51ba2f..9132213d2d3f53 100644 --- a/soc/arm/arm/musca_b1/soc.h +++ b/soc/arm/arm/musca_b1/soc.h @@ -10,7 +10,7 @@ #ifndef _ASMLANGUAGE #include "system_cmsdk_musca_b1.h" #include -#include +#include #endif #endif /* _SOC_H_ */ diff --git a/soc/arm/atmel_sam/common/soc_pmc.c b/soc/arm/atmel_sam/common/soc_pmc.c index 5506732a5f4456..928d33fd17174a 100644 --- a/soc/arm/atmel_sam/common/soc_pmc.c +++ b/soc/arm/atmel_sam/common/soc_pmc.c @@ -10,7 +10,7 @@ #include #include -#include +#include #if ID_PERIPH_COUNT > 74 #error "Unsupported SoC, update soc_pmc.c functions" diff --git a/soc/arm/nxp_imx/rt/soc.h b/soc/arm/nxp_imx/rt/soc.h index 185503194e8171..7a64b7e983b7f9 100644 --- a/soc/arm/nxp_imx/rt/soc.h +++ b/soc/arm/nxp_imx/rt/soc.h @@ -7,7 +7,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/soc/arm/nxp_kinetis/k6x/soc.h b/soc/arm/nxp_kinetis/k6x/soc.h index 25bba6abd862fe..37e299208a1adf 100644 --- a/soc/arm/nxp_kinetis/k6x/soc.h +++ b/soc/arm/nxp_kinetis/k6x/soc.h @@ -15,7 +15,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { @@ -35,7 +35,7 @@ extern "C" { #include #include -#include +#include #include #endif /* !_ASMLANGUAGE */ diff --git a/soc/arm/nxp_kinetis/ke1xf/soc.h b/soc/arm/nxp_kinetis/ke1xf/soc.h index 615b05774c1c1d..3bcc0869c7ef14 100644 --- a/soc/arm/nxp_kinetis/ke1xf/soc.h +++ b/soc/arm/nxp_kinetis/ke1xf/soc.h @@ -7,6 +7,6 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #endif /* _SOC__H_ */ diff --git a/soc/arm/nxp_kinetis/kl2x/soc.h b/soc/arm/nxp_kinetis/kl2x/soc.h index 8902fad745e472..f772368657eb9c 100644 --- a/soc/arm/nxp_kinetis/kl2x/soc.h +++ b/soc/arm/nxp_kinetis/kl2x/soc.h @@ -7,7 +7,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { @@ -19,7 +19,7 @@ extern "C" { #include #include -#include +#include #include #endif /* !_ASMLANGUAGE */ diff --git a/soc/arm/nxp_kinetis/kwx/soc.h b/soc/arm/nxp_kinetis/kwx/soc.h index 7a5dcdbda8d5fb..4181eb94a46a5d 100644 --- a/soc/arm/nxp_kinetis/kwx/soc.h +++ b/soc/arm/nxp_kinetis/kwx/soc.h @@ -8,7 +8,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { @@ -30,7 +30,7 @@ extern "C" { #include #include -#include +#include #include #endif /* !_ASMLANGUAGE */ diff --git a/soc/arm/nxp_lpc/lpc54xxx/soc.h b/soc/arm/nxp_lpc/lpc54xxx/soc.h index 6131a709deecae..7d5d626f406ec8 100644 --- a/soc/arm/nxp_lpc/lpc54xxx/soc.h +++ b/soc/arm/nxp_lpc/lpc54xxx/soc.h @@ -21,7 +21,7 @@ extern "C" { #ifndef _ASMLANGUAGE #include -#include +#include #include #endif /* !_ASMLANGUAGE */ diff --git a/soc/arm/nxp_lpc/lpc55xxx/soc.h b/soc/arm/nxp_lpc/lpc55xxx/soc.h index 0e3242a03a3874..02bf6b08e1531d 100644 --- a/soc/arm/nxp_lpc/lpc55xxx/soc.h +++ b/soc/arm/nxp_lpc/lpc55xxx/soc.h @@ -21,7 +21,7 @@ extern "C" { #ifndef _ASMLANGUAGE #include -#include +#include #include #endif /* !_ASMLANGUAGE */ diff --git a/soc/arm/silabs_exx32/efm32hg/soc.h b/soc/arm/silabs_exx32/efm32hg/soc.h index 21677f5e5cc71b..3c8992c2880eaf 100644 --- a/soc/arm/silabs_exx32/efm32hg/soc.h +++ b/soc/arm/silabs_exx32/efm32hg/soc.h @@ -13,7 +13,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/soc/arm/silabs_exx32/efm32pg12b/soc.h b/soc/arm/silabs_exx32/efm32pg12b/soc.h index e28d5a35a3d6ac..b63e9a14a90eb7 100644 --- a/soc/arm/silabs_exx32/efm32pg12b/soc.h +++ b/soc/arm/silabs_exx32/efm32pg12b/soc.h @@ -13,7 +13,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/soc/arm/silabs_exx32/efm32wg/soc.h b/soc/arm/silabs_exx32/efm32wg/soc.h index 3672e5a72fa793..b195c84cd173a1 100644 --- a/soc/arm/silabs_exx32/efm32wg/soc.h +++ b/soc/arm/silabs_exx32/efm32wg/soc.h @@ -13,7 +13,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/soc/arm/silabs_exx32/efr32fg1p/soc.h b/soc/arm/silabs_exx32/efr32fg1p/soc.h index 233dd8d6a458a9..4b00ac5f199673 100644 --- a/soc/arm/silabs_exx32/efr32fg1p/soc.h +++ b/soc/arm/silabs_exx32/efr32fg1p/soc.h @@ -13,7 +13,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/soc/arm/silabs_exx32/efr32mg12p/soc.h b/soc/arm/silabs_exx32/efr32mg12p/soc.h index 18aec1420e3ccf..1345ea56d6aca4 100644 --- a/soc/arm/silabs_exx32/efr32mg12p/soc.h +++ b/soc/arm/silabs_exx32/efr32mg12p/soc.h @@ -13,7 +13,7 @@ #ifndef _SOC__H_ #define _SOC__H_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/soc/arm/ti_lm3s6965/soc.h b/soc/arm/ti_lm3s6965/soc.h index c73e1d34e87d9a..7c99c69dffe89e 100644 --- a/soc/arm/ti_lm3s6965/soc.h +++ b/soc/arm/ti_lm3s6965/soc.h @@ -15,7 +15,7 @@ #ifndef _BOARD__H_ #define _BOARD__H_ -#include +#include #ifdef __cplusplus extern "C" { @@ -72,7 +72,7 @@ extern "C" { #ifndef _ASMLANGUAGE #include -#include +#include #include /* uart configuration settings */ diff --git a/soc/arm/ti_lm3s6965/sys_arch_reboot.c b/soc/arm/ti_lm3s6965/sys_arch_reboot.c index 9140eac67c8e47..1795b022fc92a2 100644 --- a/soc/arm/ti_lm3s6965/sys_arch_reboot.c +++ b/soc/arm/ti_lm3s6965/sys_arch_reboot.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include /** diff --git a/soc/arm/ti_simplelink/cc2650/soc.h b/soc/arm/ti_simplelink/cc2650/soc.h index 37d55b4ff4c580..84c47e2faa6c46 100644 --- a/soc/arm/ti_simplelink/cc2650/soc.h +++ b/soc/arm/ti_simplelink/cc2650/soc.h @@ -8,7 +8,7 @@ #ifndef _CC2650_SOC_H_ #define _CC2650_SOC_H_ -#include +#include #include "registers/ccfg.h" #include "registers/gpio.h" #include "registers/ioc.h" diff --git a/soc/riscv32/openisa_rv32m1/soc.c b/soc/riscv32/openisa_rv32m1/soc.c index c3f09b568ec69f..68d7b5aebc560a 100644 --- a/soc/riscv32/openisa_rv32m1/soc.c +++ b/soc/riscv32/openisa_rv32m1/soc.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #if defined(CONFIG_MULTI_LEVEL_INTERRUPTS) #include diff --git a/soc/x86/apollo_lake/soc.h b/soc/x86/apollo_lake/soc.h index d670f0508b6e7b..35e8764e89b4a8 100644 --- a/soc/x86/apollo_lake/soc.h +++ b/soc/x86/apollo_lake/soc.h @@ -16,7 +16,7 @@ #ifndef __SOC_H_ #define __SOC_H_ -#include +#include #ifndef _ASMLANGUAGE #include diff --git a/soc/x86/atom/soc.h b/soc/x86/atom/soc.h index 190283423cf95e..2b05a295ad0a22 100644 --- a/soc/x86/atom/soc.h +++ b/soc/x86/atom/soc.h @@ -15,7 +15,7 @@ #ifndef __SOC_H_ #define __SOC_H_ -#include +#include #ifndef _ASMLANGUAGE #include diff --git a/soc/x86/ia32/soc.h b/soc/x86/ia32/soc.h index 92ff737ba5fb84..2b64a83adb793b 100644 --- a/soc/x86/ia32/soc.h +++ b/soc/x86/ia32/soc.h @@ -15,7 +15,7 @@ #ifndef __SOC_H_ #define __SOC_H_ -#include +#include #ifndef _ASMLANGUAGE #include diff --git a/soc/x86/intel_quark/quark_se/soc.h b/soc/x86/intel_quark/quark_se/soc.h index 888de5003a10e9..de3592e9f9d76a 100644 --- a/soc/x86/intel_quark/quark_se/soc.h +++ b/soc/x86/intel_quark/quark_se/soc.h @@ -14,7 +14,7 @@ #define __SOC_H_ #include -#include +#include #include #ifdef CONFIG_IOAPIC diff --git a/soc/x86/intel_quark/quark_x1000/soc.h b/soc/x86/intel_quark/quark_x1000/soc.h index 86d52209333cf3..8204ade3146492 100644 --- a/soc/x86/intel_quark/quark_x1000/soc.h +++ b/soc/x86/intel_quark/quark_x1000/soc.h @@ -15,7 +15,7 @@ #ifndef __SOC_H_ #define __SOC_H_ -#include +#include #ifndef _ASMLANGUAGE #include diff --git a/soc/xtensa/esp32/include/_soc_inthandlers.h b/soc/xtensa/esp32/include/_soc_inthandlers.h index 841430fb9f1904..c46bfbf3d8b8a7 100644 --- a/soc/xtensa/esp32/include/_soc_inthandlers.h +++ b/soc/xtensa/esp32/include/_soc_inthandlers.h @@ -11,7 +11,7 @@ */ #include -#include +#include #include #if !defined(XCHAL_INT0_LEVEL) || XCHAL_INT0_LEVEL != 1 diff --git a/subsys/bluetooth/common/log.c b/subsys/bluetooth/common/log.c index 92ed58f5c79c2d..bd7c3472763e04 100644 --- a/subsys/bluetooth/common/log.c +++ b/subsys/bluetooth/common/log.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/common/rpa.c b/subsys/bluetooth/common/rpa.c index 6d1ada49dcc518..36ce67dfa03d2b 100644 --- a/subsys/bluetooth/common/rpa.c +++ b/subsys/bluetooth/common/rpa.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c index 0ef8cd89f52531..91153b119de4ec 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "util/util.h" #include "util/memq.h" diff --git a/subsys/bluetooth/controller/hci/hci_driver.c b/subsys/bluetooth/controller/hci/hci_driver.c index ab2eda3f415287..0b342c2856d8aa 100644 --- a/subsys/bluetooth/controller/hci/hci_driver.c +++ b/subsys/bluetooth/controller/hci/hci_driver.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/controller/ll_sw/ctrl.c b/subsys/bluetooth/controller/ll_sw/ctrl.c index 073e19393055f4..af3441d038713a 100644 --- a/subsys/bluetooth/controller/ll_sw/ctrl.c +++ b/subsys/bluetooth/controller/ll_sw/ctrl.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include "ll.h" diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c index da3db057790690..9f21e65c563814 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include "util/mem.h" diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_master.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_master.c index 39dafc15b0263a..f3305327359b45 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_master.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_master.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include "hal/ccm.h" #include "hal/radio.h" diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_slave.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_slave.c index c09054aef7cbc2..a430a418f0bad0 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_slave.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_slave.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include "hal/ccm.h" #include "hal/radio.h" diff --git a/subsys/bluetooth/host/a2dp.c b/subsys/bluetooth/host/a2dp.c index 6345622a56a999..8429d5a188e790 100644 --- a/subsys/bluetooth/host/a2dp.c +++ b/subsys/bluetooth/host/a2dp.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/att.c b/subsys/bluetooth/host/att.c index 76f73b75221959..e9ac307357bee9 100644 --- a/subsys/bluetooth/host/att.c +++ b/subsys/bluetooth/host/att.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/avdtp.c b/subsys/bluetooth/host/avdtp.c index 59b8caa8c210e9..f3eb2cbb875a4c 100644 --- a/subsys/bluetooth/host/avdtp.c +++ b/subsys/bluetooth/host/avdtp.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index cc009a34d44eb3..6ce0cb4a133fe5 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index 5a5bd4a0b28ef6..7386f25d00cc36 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 33d2f5a01284dd..45fe48b7c09589 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/subsys/bluetooth/host/hfp_hf.c b/subsys/bluetooth/host/hfp_hf.c index 1cdf8be9951232..a4e3019aa11dc2 100644 --- a/subsys/bluetooth/host/hfp_hf.c +++ b/subsys/bluetooth/host/hfp_hf.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/keys.c b/subsys/bluetooth/host/keys.c index 15f23851cf72b4..8f468ad38d0835 100644 --- a/subsys/bluetooth/host/keys.c +++ b/subsys/bluetooth/host/keys.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include diff --git a/subsys/bluetooth/host/keys_br.c b/subsys/bluetooth/host/keys_br.c index 79470390428c0a..f28d4a024f5556 100644 --- a/subsys/bluetooth/host/keys_br.c +++ b/subsys/bluetooth/host/keys_br.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c index 80a633809c3a3b..80462fef6208ad 100644 --- a/subsys/bluetooth/host/l2cap.c +++ b/subsys/bluetooth/host/l2cap.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/l2cap_br.c b/subsys/bluetooth/host/l2cap_br.c index a759ec4840d414..f71fb5a9e7c8a3 100644 --- a/subsys/bluetooth/host/l2cap_br.c +++ b/subsys/bluetooth/host/l2cap_br.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/access.c b/subsys/bluetooth/host/mesh/access.c index df14a2c494b20d..1b6eb62b8bc43a 100644 --- a/subsys/bluetooth/host/mesh/access.c +++ b/subsys/bluetooth/host/mesh/access.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/adv.c b/subsys/bluetooth/host/mesh/adv.c index 98db3e01b5169d..403c71a426a236 100644 --- a/subsys/bluetooth/host/mesh/adv.c +++ b/subsys/bluetooth/host/mesh/adv.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/beacon.c b/subsys/bluetooth/host/mesh/beacon.c index e41b3ae66dc374..fc0c6be690e269 100644 --- a/subsys/bluetooth/host/mesh/beacon.c +++ b/subsys/bluetooth/host/mesh/beacon.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/cfg_cli.c b/subsys/bluetooth/host/mesh/cfg_cli.c index 7438b35c9481f9..a6414a39429e85 100644 --- a/subsys/bluetooth/host/mesh/cfg_cli.c +++ b/subsys/bluetooth/host/mesh/cfg_cli.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/cfg_srv.c b/subsys/bluetooth/host/mesh/cfg_srv.c index cd4bcb680e41d0..893e34aa9b8e4e 100644 --- a/subsys/bluetooth/host/mesh/cfg_srv.c +++ b/subsys/bluetooth/host/mesh/cfg_srv.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/crypto.c b/subsys/bluetooth/host/mesh/crypto.c index af5fcd3b73c305..9c6af9dbd324e9 100644 --- a/subsys/bluetooth/host/mesh/crypto.c +++ b/subsys/bluetooth/host/mesh/crypto.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/health_cli.c b/subsys/bluetooth/host/mesh/health_cli.c index 31450ca6b140c2..d286231dd76a5c 100644 --- a/subsys/bluetooth/host/mesh/health_cli.c +++ b/subsys/bluetooth/host/mesh/health_cli.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/health_srv.c b/subsys/bluetooth/host/mesh/health_srv.c index a8ae22fb4dccf7..93e5888b54b215 100644 --- a/subsys/bluetooth/host/mesh/health_srv.c +++ b/subsys/bluetooth/host/mesh/health_srv.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/net.c b/subsys/bluetooth/host/mesh/net.c index a6014ac05dcc7e..7e4ea7064429c8 100644 --- a/subsys/bluetooth/host/mesh/net.c +++ b/subsys/bluetooth/host/mesh/net.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/prov.c b/subsys/bluetooth/host/mesh/prov.c index feb16c2219467d..db6e7f5e0f8fab 100644 --- a/subsys/bluetooth/host/mesh/prov.c +++ b/subsys/bluetooth/host/mesh/prov.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/settings.c b/subsys/bluetooth/host/mesh/settings.c index 2ec43de9cf1d42..1ac2b85bff8911 100644 --- a/subsys/bluetooth/host/mesh/settings.c +++ b/subsys/bluetooth/host/mesh/settings.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/mesh/transport.c b/subsys/bluetooth/host/mesh/transport.c index b1a565d4d230ca..75255222ef096d 100644 --- a/subsys/bluetooth/host/mesh/transport.c +++ b/subsys/bluetooth/host/mesh/transport.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/rfcomm.c b/subsys/bluetooth/host/rfcomm.c index cea1715c4c8ba6..fe5e58d3a4399b 100644 --- a/subsys/bluetooth/host/rfcomm.c +++ b/subsys/bluetooth/host/rfcomm.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/smp.c b/subsys/bluetooth/host/smp.c index 72b0cbe0bd65a1..1e4fec3ac8cd81 100644 --- a/subsys/bluetooth/host/smp.c +++ b/subsys/bluetooth/host/smp.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/host/smp_null.c b/subsys/bluetooth/host/smp_null.c index a054ba071aed3c..709d479d9310ae 100644 --- a/subsys/bluetooth/host/smp_null.c +++ b/subsys/bluetooth/host/smp_null.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/disk/disk_access.c b/subsys/disk/disk_access.c index 2d4e7caa82c281..5277488e80588c 100644 --- a/subsys/disk/disk_access.c +++ b/subsys/disk/disk_access.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/subsys/disk/disk_access_flash.c b/subsys/disk/disk_access_flash.c index 2b1de492a1caf4..026d1e91a78b45 100644 --- a/subsys/disk/disk_access_flash.c +++ b/subsys/disk/disk_access_flash.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/subsys/net/ip/connection.c b/subsys/net/ip/connection.c index 820b49374eb0be..6ab3cce666a09a 100644 --- a/subsys/net/ip/connection.c +++ b/subsys/net/ip/connection.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(net_conn, CONFIG_NET_CONN_LOG_LEVEL); #include -#include +#include #include #include diff --git a/subsys/net/ip/connection.h b/subsys/net/ip/connection.h index b391bfd98a6add..9e746d9e6995aa 100644 --- a/subsys/net/ip/connection.h +++ b/subsys/net/ip/connection.h @@ -15,7 +15,7 @@ #include -#include +#include #include #include diff --git a/subsys/net/ip/net_mgmt.c b/subsys/net/ip/net_mgmt.c index 38433757598644..b7fe6c65c15ef0 100644 --- a/subsys/net/ip/net_mgmt.c +++ b/subsys/net/ip/net_mgmt.c @@ -11,7 +11,7 @@ LOG_MODULE_REGISTER(net_mgmt, CONFIG_NET_MGMT_EVENT_LOG_LEVEL); #include #include -#include +#include #include #include diff --git a/subsys/net/ip/net_pkt.c b/subsys/net/ip/net_pkt.c index 79742f8924ffed..db8a7904fab079 100644 --- a/subsys/net/ip/net_pkt.c +++ b/subsys/net/ip/net_pkt.c @@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(net_pkt, CONFIG_NET_PKT_LOG_LEVEL); #include #include -#include +#include #include #include diff --git a/subsys/net/ip/trickle.c b/subsys/net/ip/trickle.c index 95647b30f05e34..61b36cef683d4e 100644 --- a/subsys/net/ip/trickle.c +++ b/subsys/net/ip/trickle.c @@ -14,7 +14,7 @@ LOG_MODULE_REGISTER(net_trickle, CONFIG_NET_TRICKLE_LOG_LEVEL); #include -#include +#include #include #include diff --git a/subsys/net/l2/ieee802154/ieee802154_radio_csma_ca.c b/subsys/net/l2/ieee802154/ieee802154_radio_csma_ca.c index 99917144f15d92..ed653e8e8654e3 100644 --- a/subsys/net/l2/ieee802154/ieee802154_radio_csma_ca.c +++ b/subsys/net/l2/ieee802154/ieee802154_radio_csma_ca.c @@ -10,7 +10,7 @@ LOG_MODULE_REGISTER(net_ieee802154_csma, CONFIG_NET_L2_IEEE802154_LOG_LEVEL); #include #include -#include +#include #include #include diff --git a/subsys/net/l2/openthread/openthread.c b/subsys/net/l2/openthread/openthread.c index fc83ff381ba511..d8b1884608b361 100644 --- a/subsys/net/l2/openthread/openthread.c +++ b/subsys/net/l2/openthread/openthread.c @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(net_l2_openthread, CONFIG_OPENTHREAD_L2_LOG_LEVEL); #include #include -#include +#include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_object.h b/subsys/net/lib/lwm2m/lwm2m_object.h index 5d01c40d77374f..eb9c156f01d21e 100644 --- a/subsys/net/lib/lwm2m/lwm2m_object.h +++ b/subsys/net/lib/lwm2m/lwm2m_object.h @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/net/lib/sockets/sockets_can.c b/subsys/net/lib/sockets/sockets_can.c index b54030c21ad909..27688e328d7341 100644 --- a/subsys/net/lib/sockets/sockets_can.c +++ b/subsys/net/lib/sockets/sockets_can.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(net_sock_can, CONFIG_NET_SOCKETS_LOG_LEVEL); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/sockets/sockets_packet.c b/subsys/net/lib/sockets/sockets_packet.c index 0e0aad0c52dd20..d6d7005fd93441 100644 --- a/subsys/net/lib/sockets/sockets_packet.c +++ b/subsys/net/lib/sockets/sockets_packet.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(net_sock_packet, CONFIG_NET_SOCKETS_LOG_LEVEL); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/sockets/sockets_tls.c b/subsys/net/lib/sockets/sockets_tls.c index 0f53e783203946..7b0248d10c39fb 100644 --- a/subsys/net/lib/sockets/sockets_tls.c +++ b/subsys/net/lib/sockets/sockets_tls.c @@ -13,7 +13,7 @@ LOG_MODULE_REGISTER(net_sock_tls, CONFIG_NET_SOCKETS_LOG_LEVEL); #include #include -#include +#include #include #include #include diff --git a/subsys/usb/usb_device.c b/subsys/usb/usb_device.c index fba20815757ae6..5ef2e0262c1bc2 100644 --- a/subsys/usb/usb_device.c +++ b/subsys/usb/usb_device.c @@ -58,7 +58,7 @@ #include #include -#include +#include #include #include #if defined(CONFIG_USB_VBUS_GPIO) diff --git a/tests/benchmarks/app_kernel/src/master.h b/tests/benchmarks/app_kernel/src/master.h index 2519de972fbe2a..6e6672e74d94d9 100644 --- a/tests/benchmarks/app_kernel/src/master.h +++ b/tests/benchmarks/app_kernel/src/master.h @@ -19,7 +19,7 @@ #include -#include +#include /* uncomment the define below to use floating point arithmetic */ diff --git a/tests/bluetooth/tester/src/bttester.h b/tests/bluetooth/tester/src/bttester.h index 629cee524f1831..b604e3aae7ec18 100644 --- a/tests/bluetooth/tester/src/bttester.h +++ b/tests/bluetooth/tester/src/bttester.h @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #define BTP_MTU 1024 #define BTP_DATA_MAX_SIZE (BTP_MTU - sizeof(struct btp_hdr)) diff --git a/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h b/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h index d56f87b88312db..c283c4622cca9a 100644 --- a/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h +++ b/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #if defined(CONFIG_BOARD_QUARK_SE_C1000_DEVBOARD) diff --git a/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c b/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c index 8b161ee5c6d44c..e37417efe59fd5 100644 --- a/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c +++ b/tests/drivers/i2c/i2c_slave_api/common/i2c_virtual.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/drivers/i2c/i2c_slave_api/src/main.c b/tests/drivers/i2c/i2c_slave_api/src/main.c index 942d9815aeb747..9f99b15be46167 100644 --- a/tests/drivers/i2c/i2c_slave_api/src/main.c +++ b/tests/drivers/i2c/i2c_slave_api/src/main.c @@ -14,7 +14,7 @@ LOG_MODULE_REGISTER(main); #include #include #include -#include +#include #include #include diff --git a/tests/kernel/fifo/fifo_timeout/src/main.c b/tests/kernel/fifo/fifo_timeout/src/main.c index 5c3012790b1dee..196b8141006ad0 100644 --- a/tests/kernel/fifo/fifo_timeout/src/main.c +++ b/tests/kernel/fifo/fifo_timeout/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include /* * @file diff --git a/tests/kernel/mem_pool/mem_pool/src/main.c b/tests/kernel/mem_pool/mem_pool/src/main.c index a680552b060939..9f7e447c30fbf7 100644 --- a/tests/kernel/mem_pool/mem_pool/src/main.c +++ b/tests/kernel/mem_pool/mem_pool/src/main.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #define ONE_SECOND (CONFIG_SYS_CLOCK_TICKS_PER_SEC) #define TENTH_SECOND (CONFIG_SYS_CLOCK_TICKS_PER_SEC / 10) diff --git a/tests/kernel/mem_protect/userspace/src/main.c b/tests/kernel/mem_protect/userspace/src/main.c index cdab3f5242b4f0..ffa08603364d9c 100644 --- a/tests/kernel/mem_protect/userspace/src/main.c +++ b/tests/kernel/mem_protect/userspace/src/main.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include "test_syscall.h" diff --git a/tests/kernel/sleep/src/main.c b/tests/kernel/sleep/src/main.c index e9db2a9e82e8c7..e953d7e42ab315 100644 --- a/tests/kernel/sleep/src/main.c +++ b/tests/kernel/sleep/src/main.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/kernel/workq/work_queue/src/main.c b/tests/kernel/workq/work_queue/src/main.c index fb94af5ca1cab9..77e44e85b59b1d 100644 --- a/tests/kernel/workq/work_queue/src/main.c +++ b/tests/kernel/workq/work_queue/src/main.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #define NUM_TEST_ITEMS 6 /* Each work item takes 100ms */ diff --git a/tests/misc/util/src/main.c b/tests/misc/util/src/main.c index 7d55e3bc4fd3bd..62ea8d0e38994a 100644 --- a/tests/misc/util/src/main.c +++ b/tests/misc/util/src/main.c @@ -15,7 +15,7 @@ */ #include -#include +#include #define TEST_DEFINE_1 1 #define TEST_DEFINE_0 0 diff --git a/tests/net/lib/mqtt_packet/src/mqtt_packet.c b/tests/net/lib/mqtt_packet/src/mqtt_packet.c index d9470f081a6f78..de245137756bdd 100644 --- a/tests/net/lib/mqtt_packet/src/mqtt_packet.c +++ b/tests/net/lib/mqtt_packet/src/mqtt_packet.c @@ -6,7 +6,7 @@ #include #include -#include /* for ARRAY_SIZE */ +#include /* for ARRAY_SIZE */ #include #define CLIENTID "zephyr"