Skip to content

Commit a2fd7d7

Browse files
committed
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 zephyrproject-rtos#16539 Signed-off-by: Anas Nashif <[email protected]>
1 parent d222553 commit a2fd7d7

File tree

295 files changed

+1103
-1088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+1103
-1088
lines changed

arch/arc/core/cache.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include <kernel.h>
1717
#include <arch/cpu.h>
18-
#include <misc/util.h>
18+
#include <sys/util.h>
1919
#include <toolchain.h>
2020
#include <cache.h>
2121
#include <linker/linker-defs.h>

arch/arc/include/kernel_arch_data.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
#include <kernel.h>
3535
#include <kernel_internal.h>
3636
#include <zephyr/types.h>
37-
#include <misc/util.h>
37+
#include <sys/util.h>
3838
#include <sys/dlist.h>
3939
#endif
4040

arch/arm/core/cortex_m/scb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <kernel.h>
1818
#include <arch/cpu.h>
19-
#include <misc/util.h>
19+
#include <sys/util.h>
2020
#include <arch/arm/cortex_m/cmsis.h>
2121

2222
/**

arch/arm/core/cortex_m/vector_table.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C" {
2929

3030
#include <toolchain.h>
3131
#include <linker/sections.h>
32-
#include <misc/util.h>
32+
#include <sys/util.h>
3333

3434
GTEXT(__start)
3535
GTEXT(_vector_table)

arch/nios2/include/kernel_arch_data.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
#include <kernel.h>
3535
#include <kernel_internal.h>
3636
#include <zephyr/types.h>
37-
#include <misc/util.h>
37+
#include <sys/util.h>
3838
#include <sys/dlist.h>
3939
#endif
4040

arch/riscv32/include/kernel_arch_data.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#ifndef _ASMLANGUAGE
2828
#include <kernel.h>
2929
#include <zephyr/types.h>
30-
#include <misc/util.h>
30+
#include <sys/util.h>
3131
#include <sys/dlist.h>
3232
#include <kernel_internal.h>
3333

arch/x86/core/ia32/cache.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <kernel.h>
1414
#include <arch/cpu.h>
15-
#include <misc/util.h>
15+
#include <sys/util.h>
1616
#include <toolchain.h>
1717
#include <cache.h>
1818
#include <cache_private.h>

arch/x86/include/kernel_arch_data.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <asm_inline.h>
3232
#include <exception.h>
3333
#include <kernel_arch_thread.h>
34-
#include <misc/util.h>
34+
#include <sys/util.h>
3535

3636
#ifndef _ASMLANGUAGE
3737
#include <kernel.h>
@@ -110,7 +110,7 @@
110110

111111
#ifndef _ASMLANGUAGE
112112

113-
#include <misc/util.h>
113+
#include <sys/util.h>
114114

115115
#ifdef _THREAD_WRAPPER_REQUIRED
116116
extern void z_x86_thread_entry_wrapper(k_thread_entry_t entry,

arch/xtensa/core/xtensa_intgen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def emit_int_handler(ints):
9494

9595
# Re-include the core-isa header and be sure our definitions match, for sanity
9696
cprint("#include <xtensa/config/core-isa.h>")
97-
cprint("#include <misc/util.h>")
97+
cprint("#include <sys/util.h>")
9898
cprint("#include <sw_isr_table.h>")
9999
cprint("")
100100
for l in ints_by_lvl:

arch/xtensa/include/kernel_arch_data.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
#include <kernel_internal.h>
3535
#include <zephyr/types.h>
3636
#include <sys/dlist.h>
37-
#include <misc/util.h>
37+
#include <sys/util.h>
3838

3939
/* Bitmask definitions for the struct k_thread->flags bit field */
4040

boards/posix/native_posix/hw_models_top.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "posix_soc_if.h"
2222
#include "posix_arch_internal.h"
2323
#include "sdl_events.h"
24-
#include <misc/util.h>
24+
#include <sys/util.h>
2525

2626

2727
static u64_t simu_time; /* The actual time as known by the HW models */

boards/posix/native_posix/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <soc.h>
3030
#include "hw_models_top.h"
3131
#include <stdlib.h>
32-
#include "misc/util.h"
32+
#include <sys/util.h>
3333
#include "cmdline.h"
3434

3535
void posix_exit(int exit_code)

boards/posix/native_posix/timer_model.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "board_soc.h"
2828
#include "zephyr/types.h"
2929
#include "posix_trace.h"
30-
#include "misc/util.h"
30+
#include <sys/util.h>
3131
#include "cmdline.h"
3232
#include "soc.h"
3333

boards/posix/nrf52_bsim/board_soc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define _POSIX_NRF52_BOARD_SOC_H
2121

2222
#include <toolchain.h>
23-
#include <misc/util.h>
23+
#include <sys/util.h>
2424

2525
#include <stdint.h>
2626
#include <stdbool.h>

drivers/adc/adc_intel_quark_se_c1000_ss.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <soc.h>
2222
#include <drivers/adc.h>
2323
#include <arch/cpu.h>
24-
#include <misc/util.h>
24+
#include <sys/util.h>
2525

2626
#define ADC_CONTEXT_USES_KERNEL_TIMER
2727
#include "adc_context.h"

drivers/adc/adc_sam_afec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <errno.h>
1616
#include <sys/__assert.h>
17-
#include <misc/util.h>
17+
#include <sys/util.h>
1818
#include <device.h>
1919
#include <init.h>
2020
#include <soc.h>

drivers/audio/tlv320dac310x.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <errno.h>
88

9-
#include <misc/util.h>
9+
#include <sys/util.h>
1010

1111
#include <device.h>
1212
#include <drivers/i2c.h>

drivers/bluetooth/hci/h4.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <init.h>
1616
#include <drivers/uart.h>
17-
#include <misc/util.h>
17+
#include <sys/util.h>
1818
#include <sys/byteorder.h>
1919
#include <string.h>
2020

drivers/bluetooth/hci/h5.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <init.h>
1515
#include <drivers/uart.h>
16-
#include <misc/util.h>
16+
#include <sys/util.h>
1717
#include <sys/byteorder.h>
1818
#include <misc/stack.h>
1919
#include <sys/printk.h>

drivers/bluetooth/hci/ipm_stm32wb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
#include <init.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212

1313
#include <bluetooth/hci.h>
1414
#include <bluetooth/hci_driver.h>

drivers/bluetooth/hci/spi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <init.h>
1111
#include <drivers/spi.h>
1212
#include <sys/byteorder.h>
13-
#include <misc/util.h>
13+
#include <sys/util.h>
1414

1515
#include <bluetooth/hci.h>
1616
#include <bluetooth/hci_driver.h>

drivers/bluetooth/hci/userchan.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <zephyr.h>
1010
#include <device.h>
1111
#include <init.h>
12-
#include <misc/util.h>
12+
#include <sys/util.h>
1313
#include <sys/byteorder.h>
1414

1515
#include <errno.h>

drivers/can/can_stm32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <clock_control/stm32_clock_control.h>
88
#include <drivers/clock_control.h>
9-
#include <misc/util.h>
9+
#include <sys/util.h>
1010
#include <string.h>
1111
#include <kernel.h>
1212
#include <soc.h>

drivers/clock_control/beetle_clock_control.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <soc.h>
1616
#include <drivers/clock_control.h>
17-
#include <misc/util.h>
17+
#include <sys/util.h>
1818
#include <clock_control/arm_clock_control.h>
1919

2020
#define MAINCLK_BASE_FREQ 24000000

drivers/clock_control/clock_stm32_ll_common.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <soc.h>
1010
#include <drivers/clock_control.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212
#include <clock_control/stm32_clock_control.h>
1313
#include "clock_stm32_ll_common.h"
1414

drivers/clock_control/clock_stm32_ll_mp1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <soc.h>
88
#include <drivers/clock_control.h>
9-
#include <misc/util.h>
9+
#include <sys/util.h>
1010
#include <clock_control/stm32_clock_control.h>
1111

1212
/**

drivers/clock_control/clock_stm32f0_f3.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <soc.h>
1010
#include <drivers/clock_control.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212
#include <clock_control/stm32_clock_control.h>
1313
#include "clock_stm32_ll_common.h"
1414

drivers/clock_control/clock_stm32f1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <soc.h>
1010
#include <drivers/clock_control.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212
#include <clock_control/stm32_clock_control.h>
1313
#include "clock_stm32_ll_common.h"
1414

drivers/clock_control/clock_stm32f2_f4_f7.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <soc.h>
1010
#include <drivers/clock_control.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212
#include <clock_control/stm32_clock_control.h>
1313
#include "clock_stm32_ll_common.h"
1414

drivers/clock_control/clock_stm32l0_l1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <soc.h>
1010
#include <drivers/clock_control.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212
#include <clock_control/stm32_clock_control.h>
1313
#include "clock_stm32_ll_common.h"
1414

drivers/clock_control/clock_stm32l4_wb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <soc.h>
1010
#include <drivers/clock_control.h>
11-
#include <misc/util.h>
11+
#include <sys/util.h>
1212
#include <clock_control/stm32_clock_control.h>
1313
#include "clock_stm32_ll_common.h"
1414

drivers/counter/counter_ll_stm32_rtc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <clock_control/stm32_clock_control.h>
1515
#include <drivers/clock_control.h>
16-
#include <misc/util.h>
16+
#include <sys/util.h>
1717
#include <kernel.h>
1818
#include <soc.h>
1919
#include <drivers/counter.h>

drivers/counter/counter_qmsi_aonpt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <drivers/counter.h>
1313
#include <power/power.h>
1414
#include <soc.h>
15-
#include <misc/util.h>
15+
#include <sys/util.h>
1616

1717
#include "qm_aon_counters.h"
1818
#include "qm_isr.h"

drivers/counter/counter_rtc_qmsi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <kernel.h>
1414
#include <power/power.h>
1515
#include <soc.h>
16-
#include <misc/util.h>
16+
#include <sys/util.h>
1717

1818
#include "qm_isr.h"
1919
#include "qm_rtc.h"

drivers/crypto/crypto_ataes132a_priv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <drivers/i2c.h>
1212
#include <kernel.h>
13-
#include <misc/util.h>
13+
#include <sys/util.h>
1414

1515
/* Configuration Read Only Registers */
1616
#define ATAES_SERIALNUM_REG 0xF000

drivers/display/grove_lcd_rgb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <drivers/i2c.h>
1313
#include <display/grove_lcd.h>
14-
#include <misc/util.h>
14+
#include <sys/util.h>
1515

1616
#define LOG_LEVEL CONFIG_DISPLAY_LOG_LEVEL
1717
#include <logging/log.h>

drivers/dma/dma_stm32f4x.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <stdio.h>
1414
#include <soc.h>
1515
#include <string.h>
16-
#include <misc/util.h>
16+
#include <sys/util.h>
1717

1818
#define LOG_LEVEL CONFIG_DMA_LOG_LEVEL
1919
#include <logging/log.h>

drivers/entropy/entropy_stm32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <random/rand32.h>
1111
#include <init.h>
1212
#include <sys/__assert.h>
13-
#include <misc/util.h>
13+
#include <sys/util.h>
1414
#include <errno.h>
1515
#include <soc.h>
1616
#include <sys/printk.h>

drivers/entropy/fake_entropy_native_posix.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "device.h"
1515
#include <drivers/entropy.h>
1616
#include "init.h"
17-
#include "misc/util.h"
17+
#include <sys/util.h>
1818
#include <stdlib.h>
1919
#include <string.h>
2020
#include "posix_trace.h"

drivers/ethernet/eth_dw_priv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <pci/pci_mgr.h>
1313
#endif /* CONFIG_PCI */
1414

15-
#include <misc/util.h>
15+
#include <sys/util.h>
1616

1717
#ifdef __cplusplus
1818
extern "C" {

drivers/ethernet/eth_mcux.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
2121

2222
#include <device.h>
23-
#include <misc/util.h>
23+
#include <sys/util.h>
2424
#include <kernel.h>
2525
#include <net/net_pkt.h>
2626
#include <net/net_if.h>

drivers/ethernet/eth_sam_gmac.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
2727
#include <kernel.h>
2828
#include <device.h>
2929
#include <sys/__assert.h>
30-
#include <misc/util.h>
30+
#include <sys/util.h>
3131
#include <errno.h>
3232
#include <stdbool.h>
3333
#include <net/net_pkt.h>

drivers/ethernet/eth_stm32_hal.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
1212
#include <kernel.h>
1313
#include <device.h>
1414
#include <sys/__assert.h>
15-
#include <misc/util.h>
15+
#include <sys/util.h>
1616
#include <errno.h>
1717
#include <stdbool.h>
1818
#include <net/net_pkt.h>

0 commit comments

Comments
 (0)