Remove duplicate includes across multiple files

This commit cleans up redundant header file includes throughout the codebase.
 The changes include:

 - Removing duplicate #include directives that were present in the same file
 - Consolidating includes that were split across multiple lines unnecessarily
 - Removing unused includes that were no longer needed
 - Fixing some formatting issues with includes

 The changes improve code organization and maintainability by:
 - Reducing unnecessary dependencies
 - Making include dependencies more explicit
 - Following consistent include patterns
 - Removing dead code

 No functional changes are made - this is purely a code cleanup commit.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2025-01-08 23:30:35 +08:00 committed by Xiang Xiao
parent bb4eb12fa3
commit cfd0cc0d1a
152 changed files with 7 additions and 256 deletions

View file

@ -36,7 +36,6 @@
#include <errno.h>
#include <assert.h>
#include <debug.h>
#include <unistd.h>
#include <arch/board/board.h>
#include <nuttx/irq.h>

View file

@ -34,7 +34,6 @@
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <assert.h>
#include <errno.h>
#include <arpa/inet.h>

View file

@ -29,7 +29,6 @@
#include <nuttx/config.h>
#include <assert.h>
#include <debug.h>
#include <sys/types.h>
#include <stdio.h>

View file

@ -27,7 +27,6 @@
****************************************************************************/
#include <nuttx/config.h>
#include <debug.h>
#include <sys/types.h>
#include <stdio.h>

View file

@ -35,7 +35,6 @@
#include <errno.h>
#include <assert.h>
#include <debug.h>
#include <unistd.h>
#include <arch/board/board.h>
#include <nuttx/irq.h>

View file

@ -33,7 +33,6 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <arch/armv7-m/nvicpri.h>
#include "nvic.h"

View file

@ -33,7 +33,6 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <arch/armv7-m/nvicpri.h>
#include "nvic.h"

View file

@ -41,7 +41,6 @@
#include "imx9_clockconfig.h"
#include "imx9_iomuxc.h"
#include "hardware/imx9_clock.h"
#include "hardware/imx9_pinmux.h"
#include <arch/board/board.h> /* Include last: has dependencies */

View file

@ -24,13 +24,11 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <nuttx/config.h>
#include <stdint.h>
#include <assert.h>
#include <errno.h>

View file

@ -24,13 +24,11 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
#include <nuttx/config.h>
#include <stdint.h>
#include <assert.h>
#include <errno.h>

View file

@ -49,7 +49,6 @@
#include "imxrt_lpi2c.h"
#include "imxrt_edma.h"
#include "imxrt_gpio.h"
#include "imxrt_lpi2c.h"
#include "hardware/imxrt_dmamux.h"
#include "hardware/imxrt_pinmux.h"

View file

@ -34,7 +34,6 @@
#include <arch/board/board.h>
#include <nuttx/arch.h>
#include <nuttx/arch.h>
#include "arm_internal.h"
#include "kinetis_config.h"

View file

@ -40,7 +40,6 @@
#include "hardware/kl_uart.h"
#include "hardware/kl_sim.h"
#include "hardware/kl_port.h"
#include "hardware/kl_uart.h"
#include "hardware/kl_pinmux.h"
/****************************************************************************

View file

@ -36,7 +36,6 @@
#include <errno.h>
#include <assert.h>
#include <debug.h>
#include <unistd.h>
#include <arch/board/board.h>

View file

@ -59,7 +59,6 @@
#include "arm_internal.h"
#include "lc823450_sddrv_type.h"
#include "lc823450_sddrv_if.h"
#include "lc823450_dma.h"
#include "lc823450_gpio.h"
#include "lc823450_syscontrol.h"
#include "lc823450_timer.h"

View file

@ -65,7 +65,6 @@
#include "chip.h"
#include "arm_internal.h"
#include "chip.h"
#include "hardware/lpc17_40_syscon.h"
#include "lpc17_40_gpio.h"
#include "lpc17_40_i2c.h"

View file

@ -23,12 +23,6 @@
#ifndef __ARCH_ARM_SRC_MAX326XX_HARDWARE_MAX326_GCR_H
#define __ARCH_ARM_SRC_MAX326XX_HARDWARE_MAX326_GCR_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Included Files
****************************************************************************/

View file

@ -50,8 +50,6 @@
#include "max326_lowputc.h"
#include "max326_serial.h"
#include <arch/board/board.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

View file

@ -25,7 +25,6 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/init.h>
#include <nuttx/cache.h>
#include <nuttx/init.h>

View file

@ -45,7 +45,6 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/config.h>
#include <nuttx/progmem.h>
#include "chip.h"

View file

@ -30,7 +30,6 @@
#include <nuttx/config.h>
#include <stdbool.h>
#include <nuttx/config.h>
#include <nuttx/usb/usbdev.h>
#include <stdint.h>

View file

@ -28,9 +28,8 @@
****************************************************************************/
#include <nuttx/config.h>
#include <stdbool.h>
#include <nuttx/config.h>
#include <stdbool.h>
#include <nuttx/usb/usbdev.h>
#include <stdint.h>

View file

@ -42,7 +42,6 @@
#include "phyplus_tim.h"
#include "timer.h"
#include "mcu_phy_bumbee.h"
#include "phyplus_gpio.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -63,7 +63,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

View file

@ -28,7 +28,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <nuttx/kmalloc.h>

View file

@ -63,7 +63,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

View file

@ -28,7 +28,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <nuttx/kmalloc.h>

View file

@ -47,7 +47,6 @@
#include "arm_internal.h"
#include "s32k1xx_edma.h"
#include "s32k1xx_pin.h"
#include "hardware/s32k1xx_dmamux.h"
#include "hardware/s32k1xx_pinmux.h"
#include "s32k1xx_flexio_i2c.h"

View file

@ -32,7 +32,6 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/arch.h>
#include "arm_internal.h"
#include "s32k1xx_pin.h"

View file

@ -28,16 +28,13 @@
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/wqueue.h>
#include <time.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/wqueue.h>
#include <arch/board/board.h>
#include "arm_internal.h"

View file

@ -38,7 +38,6 @@
#include <errno.h>
#include <assert.h>
#include <debug.h>
#include <unistd.h>
#include <arch/board/board.h>
#include <nuttx/irq.h>

View file

@ -41,7 +41,6 @@
#include "chip.h"
#include "mpu.h"
#include "arm_internal.h"
#include "arm_internal.h"
#include "stm32wl5_mpuinit.h"
#include "stm32wl5_ipcc.h"

View file

@ -38,7 +38,6 @@
#include "nvic.h"
#include "ram_vectors.h"
#include "arm_internal.h"
#include "arm_internal.h"
#include "stm32wl5.h"
/****************************************************************************

View file

@ -30,7 +30,6 @@
#include <arch/board/board.h>
#include "arm_internal.h"
#include "arm_internal.h"
#include "chip.h"

View file

@ -33,7 +33,6 @@
#include <arch/board/board.h>
#include "arm_internal.h"
#include "arm_internal.h"
#include "chip.h"

View file

@ -57,7 +57,6 @@
#endif
#include "stm32wl5_rcc.h"
#include "arm_internal.h"
#include "arm_internal.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -33,7 +33,6 @@
#include <nuttx/init.h>
#include <arch/board/board.h>
#include "arm_internal.h"
#include "arm_internal.h"
#include "nvic.h"

View file

@ -40,7 +40,6 @@
#include "chip.h"
#include "arm_internal.h"
#include "arm_internal.h"
#include "stm32wl5.h"
#include "stm32wl5_gpio.h"

View file

@ -35,7 +35,6 @@
#include "nvic.h"
#include "clock/clock.h"
#include "arm_internal.h"
#include "arm_internal.h"
#include "chip.h"
#include "stm32wl5.h"

View file

@ -26,14 +26,12 @@
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <assert.h>
#include <debug.h>
#include <execinfo.h>
#include <nuttx/compiler.h>
#include <nuttx/board.h>
#include <nuttx/arch.h>
#include <nuttx/serial/serial.h>
#include <arch/board/board.h>

View file

@ -26,13 +26,10 @@
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <debug.h>
#include <assert.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>
#include "arm_internal.h"

View file

@ -46,7 +46,6 @@
#include "arm64_internal.h"
#include "arm64_fatal.h"
#include "arm64_mmu.h"
#include "arm64_fatal.h"
#include "arm64_arch_timer.h"
#ifdef CONFIG_ARCH_FPU

View file

@ -26,12 +26,10 @@
#include <stdlib.h>
#include <debug.h>
#include <debug.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <sys/param.h>
#include <nuttx/efuse/efuse.h>
#include <nuttx/irq.h>
#include <nuttx/kmalloc.h>
#include <nuttx/efuse/efuse.h>

View file

@ -44,7 +44,6 @@
#include <nuttx/spinlock.h>
#include <nuttx/can/can.h>
#include <nuttx/signal.h>
#include <nuttx/arch.h>
#include <nuttx/kthread.h>
#ifdef CONFIG_ESPRESSIF_TEMP_UORB
#include <nuttx/sensors/sensor.h>

View file

@ -26,7 +26,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <nuttx/kmalloc.h>

View file

@ -31,7 +31,6 @@
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <syscall.h>
#include <arch/irq.h>
#include <nuttx/addrenv.h>

View file

@ -55,8 +55,6 @@
#include "esp32c3_gpio.h"
#include <nuttx/spi/ice40.h>
/****************************************************************************
* Private Function Prototypes
****************************************************************************/

View file

@ -39,7 +39,6 @@
#include "esp32c3.h"
#include "esp32c3_irq.h"
#include "esp32c3_attr.h"
#include "esp32c3_wireless.h"
#include "espidf_wifi.h"
/****************************************************************************

View file

@ -39,8 +39,6 @@
#include "esp_private/phy.h"
#include "espressif/esp_hr_timer.h"
#include "esp_private/phy.h"
#include "periph_ctrl.h"
#include "esp_phy_init.h"
#include "phy_init_data.h"

View file

@ -41,7 +41,6 @@
#include "hardware/hpm_gpio.h"
#include "hpm_gpio.h"
#include "riscv_internal.h"
#include "hpm_gpio.h"
#include "hpm_ioc.h"
/***************************************************************************

View file

@ -34,7 +34,6 @@
#include <nuttx/arch.h>
#include <arch/board/board.h>
#include <nuttx/nuttx.h>
#include <nuttx/kmalloc.h>
#include <nuttx/queue.h>

View file

@ -64,7 +64,6 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <stdlib.h>

View file

@ -36,7 +36,6 @@
#include <nuttx/addrenv.h>
#include <nuttx/arch.h>
#include <nuttx/sched.h>
#include <nuttx/addrenv.h>
#include "x86_64_internal.h"

View file

@ -44,7 +44,6 @@
#include <nuttx/spinlock.h>
#include <nuttx/can/can.h>
#include <nuttx/signal.h>
#include <nuttx/arch.h>
#include <nuttx/kthread.h>
#ifdef CONFIG_ESPRESSIF_TEMP_UORB
#include <nuttx/sensors/sensor.h>

View file

@ -26,7 +26,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <nuttx/kmalloc.h>

View file

@ -37,7 +37,6 @@
#include "sched/sched.h"
#include "chip.h"
#include "signal/signal.h"
#include "sched/sched.h"
#include "xtensa.h"
/****************************************************************************

View file

@ -32,7 +32,6 @@
#include <debug.h>
#include <string.h>
#include <sys/param.h>
#include <nuttx/config.h>
#include <nuttx/spinlock.h>
#include <nuttx/init.h>

View file

@ -31,7 +31,6 @@
#include <debug.h>
#include <string.h>
#include <sys/param.h>
#include <nuttx/config.h>
#include <nuttx/spinlock.h>
#include "xtensa.h"

View file

@ -31,7 +31,6 @@
#include <debug.h>
#include <string.h>
#include <sys/param.h>
#include <nuttx/config.h>
#include <nuttx/spinlock.h>
#include <nuttx/init.h>
#include <assert.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -44,8 +44,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -55,8 +55,6 @@
# include <imxrt_lpspi.h>
#endif
#include "imxrt1020-evk.h"
#include <arch/board/board.h> /* Must always be included last */
/****************************************************************************

View file

@ -40,9 +40,6 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mtd/mtd.h>
#ifdef CONFIG_BCH
#include <nuttx/drivers/drivers.h>
#endif
#include "imxrt1064-evk.h"

View file

@ -32,7 +32,6 @@
#include <syslog.h>
#include <nuttx/fs/fs.h>
#include <nuttx/i2c/i2c_master.h>
#include <nuttx/video/fb.h>
#include <imxrt_lpi2c.h>
#include <imxrt_lpspi.h>
#include <nuttx/input/buttons.h>

View file

@ -51,7 +51,6 @@
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>

View file

@ -51,7 +51,6 @@
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>

View file

@ -50,7 +50,6 @@
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>

View file

@ -51,7 +51,6 @@
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>

View file

@ -38,8 +38,6 @@
#include "lpc17_40_gpio.h"
#include "arm_internal.h"
#include <arch/board/board.h>
#include "lx_cpu.h"
/****************************************************************************

View file

@ -50,10 +50,6 @@
# include <nuttx/usb/usbmonitor.h>
#endif
#ifdef CONFIG_CDCECM_COMPOSITE
# include <nuttx/board.h>
#endif
#ifdef CONFIG_LPC17_40_ROMFS
# include "lpc17_40_romfs.h"
#endif

View file

@ -32,7 +32,6 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>
#include "arm_internal.h"

View file

@ -33,8 +33,6 @@
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include "lpc54_gpio.h"
#include "lpcxpresso-lpc54628.h"

View file

@ -34,8 +34,6 @@
#include <nuttx/irq.h>
#include <nuttx/spinlock.h>
#include <nuttx/irq.h>
#include "max326_gpio.h"
#include "max32660-evsys.h"

View file

@ -31,7 +31,6 @@
#include <time.h>
#include <debug.h>
#include <nuttx/config.h>
#include <nuttx/mmcsd.h>
#include <nuttx/spi/spi.h>

View file

@ -41,7 +41,6 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/drivers/drivers.h>
#include "nrf52_progmem.h"

View file

@ -41,7 +41,6 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/drivers/drivers.h>
#include "nrf53_progmem.h"

View file

@ -41,7 +41,6 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/drivers/drivers.h>
#include "nrf91_progmem.h"

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -30,8 +30,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -43,8 +43,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -43,8 +43,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -47,8 +47,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -47,8 +47,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -43,8 +43,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/irq.h>
#include <arch/board/board.h>

View file

@ -25,7 +25,6 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/config.h>
#include <errno.h>
#include <debug.h>

View file

@ -37,7 +37,6 @@
#include "stm32f777zit6-meadow.h"
#ifdef CONFIG_STM32F7_QUADSPI
# include <nuttx/mtd/mtd.h>
# include "stm32_qspi.h"
# ifdef CONFIG_FS_FAT

View file

@ -25,7 +25,6 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/config.h>
#include <errno.h>
#include <debug.h>

View file

@ -41,9 +41,6 @@
#include <nuttx/fs/ioctl.h>
#include <nuttx/kmalloc.h>
#include <nuttx/mtd/mtd.h>
#ifdef CONFIG_BCH
#include <nuttx/drivers/drivers.h>
#endif
#include <stm32.h>
#include "nucleo-h743zi.h"

View file

@ -31,7 +31,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/config.h>
#include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h>
#include <nuttx/spi/spi.h>

View file

@ -29,7 +29,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <debug.h>
#include <stdbool.h>
#include <nuttx/board.h>
#include <arch/board/board.h>

Some files were not shown because too many files have changed in this diff Show more