You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/05/21 12:52:14 UTC

[nuttx] branch master updated: Indent the define statement by two spaces

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 7990f90915 Indent the define statement by two spaces
7990f90915 is described below

commit 7990f90915b64551eca34da1e7a86a46d8d3cf76
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat May 20 06:32:34 2023 +0800

    Indent the define statement by two spaces
    
    follow the code style convention
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/arm/arm_initialstate.c                |   4 +-
 arch/arm/src/armv6-m/arm_hardfault.c               |   8 +-
 arch/arm/src/armv6-m/arm_svcall.c                  |  26 +-
 arch/arm/src/armv7-m/arm_busfault.c                |   4 +-
 arch/arm/src/armv7-m/arm_hardfault.c               |   8 +-
 arch/arm/src/armv7-m/arm_memfault.c                |   4 +-
 arch/arm/src/armv7-m/arm_svcall.c                  |  26 +-
 arch/arm/src/armv7-m/arm_usagefault.c              |   4 +-
 arch/arm/src/armv8-m/arm_busfault.c                |   4 +-
 arch/arm/src/armv8-m/arm_hardfault.c               |   8 +-
 arch/arm/src/armv8-m/arm_memfault.c                |   4 +-
 arch/arm/src/armv8-m/arm_svcall.c                  |  26 +-
 arch/arm/src/armv8-m/arm_usagefault.c              |   4 +-
 arch/arm/src/c5471/c5471_ethernet.c                |   6 +-
 arch/arm/src/c5471/c5471_serial.c                  |  14 +-
 arch/arm/src/common/arm_internal.h                 |  12 +-
 arch/arm/src/dm320/dm320_serial.c                  |  12 +-
 arch/arm/src/dm320/dm320_timer.h                   |   8 +-
 arch/arm/src/dm320/dm320_usbdev.c                  |  12 +-
 arch/arm/src/efm32/efm32_usbdev.c                  |   4 +-
 arch/arm/src/efm32/efm32_usbhost.c                 |   4 +-
 arch/arm/src/efm32/hardware/efm32gg_memorymap.h    |   2 +-
 arch/arm/src/gd32f4/gd32f4xx_enet.c                |  14 +-
 arch/arm/src/gd32f4/gd32f4xx_i2c.c                 |  16 +-
 arch/arm/src/gd32f4/gd32f4xx_serial.c              |  32 +-
 arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h        |   4 +-
 arch/arm/src/imx1/imx_serial.c                     | 178 ++---
 arch/arm/src/imx6/hardware/imx_enet.h              |  12 +-
 arch/arm/src/imx6/imx_serial.c                     |  10 +-
 arch/arm/src/imxrt/hardware/imxrt_enet.h           |  12 +-
 arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h |   2 +-
 .../src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h   |   2 +-
 arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h |   4 +-
 .../src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h   |   2 +-
 arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h |   4 +-
 arch/arm/src/imxrt/imxrt_allocateheap.c            |   4 +-
 arch/arm/src/imxrt/imxrt_enc.c                     |  24 +-
 arch/arm/src/imxrt/imxrt_flexcan.c                 |   4 +-
 arch/arm/src/imxrt/imxrt_flexpwm.c                 |   4 +-
 arch/arm/src/imxrt/imxrt_serial.c                  | 316 ++++----
 arch/arm/src/imxrt/imxrt_usbdev.c                  |   4 +-
 arch/arm/src/kinetis/hardware/kinetis_adc.h        |   8 +-
 arch/arm/src/kinetis/hardware/kinetis_enet.h       |  12 +-
 arch/arm/src/kinetis/hardware/kinetis_flexbus.h    |   2 -
 .../src/kinetis/hardware/kinetis_k40memorymap.h    |   4 +-
 .../src/kinetis/hardware/kinetis_k64memorymap.h    | 196 ++---
 .../src/kinetis/hardware/kinetis_k66memorymap.h    | 236 +++---
 arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h     |  66 +-
 arch/arm/src/kinetis/hardware/kinetis_sim.h        |   2 +-
 arch/arm/src/kinetis/kinetis_clockconfig.c         |  22 +-
 arch/arm/src/kinetis/kinetis_config.h              |   2 +-
 arch/arm/src/kinetis/kinetis_serial.c              | 156 ++--
 arch/arm/src/kl/hardware/kl_memorymap.h            | 104 +--
 arch/arm/src/kl/hardware/kl_tpm.h                  |  54 +-
 arch/arm/src/lc823450/lc823450_syscontrol.h        |   4 +-
 .../lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h |  18 +-
 .../lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h    |  16 +-
 arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h  |  44 +-
 arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h  |   4 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_can.c           |  12 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c      |  10 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c       |   2 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c        |   4 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c       |   4 +-
 arch/arm/src/lpc214x/lpc214x_usbdev.c              |   4 +-
 arch/arm/src/lpc2378/lpc23xx_uart.h                |  28 +-
 arch/arm/src/lpc31xx/lpc31_memorymap.h             |   2 +-
 arch/arm/src/lpc31xx/lpc31_usbdev.c                |   4 +-
 arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h        |   8 +-
 arch/arm/src/lpc43xx/hardware/lpc43_sct.h          |  32 +-
 arch/arm/src/lpc43xx/lpc43_ethernet.c              |   6 +-
 arch/arm/src/lpc43xx/lpc43_sdmmc.c                 |   4 +-
 arch/arm/src/lpc43xx/lpc43_serial.c                |   4 +-
 arch/arm/src/lpc43xx/lpc43_timer.c                 |   4 +-
 arch/arm/src/lpc43xx/lpc43_usb0dev.c               |   4 +-
 arch/arm/src/lpc54xx/hardware/lpc54_dma.h          |  22 +-
 arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h     |  14 +-
 arch/arm/src/lpc54xx/lpc54_ethernet.c              |   4 +-
 arch/arm/src/lpc54xx/lpc54_sdmmc.c                 |   4 +-
 arch/arm/src/lpc54xx/lpc54_usb0_ohci.c             |   4 +-
 arch/arm/src/phy62xx/phy62xx_hardfault.c           |   8 +-
 arch/arm/src/rp2040/hardware/rp2040_memorymap.h    |   8 +-
 arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h       |  12 +-
 arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h        |   8 +-
 arch/arm/src/s32k1xx/s32k1xx_lpspi.c               |  86 +--
 arch/arm/src/s32k1xx/s32k1xx_serial.c              |   2 +-
 arch/arm/src/s32k3xx/s32k3xx_qspi.c                |   2 +-
 arch/arm/src/s32k3xx/s32k3xx_serial.c              | 662 ++++++++--------
 arch/arm/src/sam34/hardware/sam4l_bpm.h            |   8 +-
 arch/arm/src/sam34/hardware/sam4l_picouart.h       |   8 +-
 arch/arm/src/sam34/hardware/sam_afec.h             |  12 +-
 arch/arm/src/sam34/sam4s_nand.h                    |   2 +-
 arch/arm/src/sam34/sam_emac.c                      |   4 +-
 arch/arm/src/sam34/sam_rtc.c                       |  12 +-
 arch/arm/src/sam34/sam_rtt.c                       |   4 +-
 arch/arm/src/sam34/sam_spi.c                       |   4 +-
 arch/arm/src/sam34/sam_tc.c                        |   4 +-
 arch/arm/src/sam34/sam_twi.c                       |   6 +-
 arch/arm/src/sam34/sam_udp.c                       |   2 +-
 arch/arm/src/sam34/sam_wdt.c                       |   4 +-
 arch/arm/src/sama5/hardware/sam_gmac.h             |   8 +-
 arch/arm/src/sama5/hardware/sam_sdmmc.h            |   4 +-
 arch/arm/src/sama5/hardware/sam_trng.h             |   2 +-
 arch/arm/src/sama5/sam_allocateheap.c              |   2 +-
 arch/arm/src/sama5/sam_emaca.c                     |   4 +-
 arch/arm/src/sama5/sam_flexcom_spi.c               |   2 +-
 arch/arm/src/sama5/sam_gmac.c                      |   4 +-
 arch/arm/src/sama5/sam_hsmci.c                     |   2 +-
 arch/arm/src/sama5/sam_ohci.c                      |   4 +-
 arch/arm/src/sama5/sam_pwm.c                       |   2 +-
 arch/arm/src/sama5/sam_spi.c                       |   4 +-
 arch/arm/src/sama5/sam_ssc.c                       |   2 +-
 arch/arm/src/sama5/sam_twi.c                       |   6 +-
 arch/arm/src/sama5/sam_udphs.c                     |   2 +-
 arch/arm/src/sama5/sam_wdt.c                       |   4 +-
 arch/arm/src/samd2l2/sam_spi.c                     |   4 +-
 arch/arm/src/samd2l2/sam_usb.c                     |   2 +-
 arch/arm/src/samd5e5/hardware/sam_gmac.h           |   8 +-
 arch/arm/src/samd5e5/sam_gmac.c                    |   4 +-
 arch/arm/src/samd5e5/sam_spi.c                     |   4 +-
 arch/arm/src/samd5e5/sam_usb.c                     |   4 +-
 arch/arm/src/samv7/hardware/sam_matrix.h           |   2 +-
 arch/arm/src/samv7/hardware/sam_trng.h             |   2 +-
 arch/arm/src/samv7/hardware/sam_usbhs.h            |   6 +-
 arch/arm/src/samv7/sam_hsmci.c                     |   2 +-
 arch/arm/src/samv7/sam_qspi.c                      |   6 +-
 arch/arm/src/samv7/sam_rswdt.c                     |   4 +-
 arch/arm/src/samv7/sam_serial.c                    |  72 +-
 arch/arm/src/samv7/sam_spi.c                       |   4 +-
 arch/arm/src/samv7/sam_spi_slave.c                 |   4 +-
 arch/arm/src/samv7/sam_ssc.c                       |   2 +-
 arch/arm/src/samv7/sam_twihs.c                     |   6 +-
 arch/arm/src/samv7/sam_usbdevhs.c                  |   2 +-
 arch/arm/src/samv7/sam_wdt.c                       |   4 +-
 arch/arm/src/stm32/hardware/stm32_eth.h            |   6 +-
 arch/arm/src/stm32/hardware/stm32_lcd.h            |  10 +-
 arch/arm/src/stm32/hardware/stm32_pwr.h            |   2 +-
 arch/arm/src/stm32/stm32_dac.c                     |  86 +--
 arch/arm/src/stm32/stm32_eth.c                     |  28 +-
 arch/arm/src/stm32/stm32_hciuart.c                 | 106 ++-
 arch/arm/src/stm32/stm32_i2s.c                     |   2 +-
 arch/arm/src/stm32/stm32_iwdg.c                    |   4 +-
 arch/arm/src/stm32/stm32_otgfsdev.c                |  20 +-
 arch/arm/src/stm32/stm32_otgfshost.c               |   4 +-
 arch/arm/src/stm32/stm32_otghsdev.c                |   4 +-
 arch/arm/src/stm32/stm32_otghshost.c               |   4 +-
 arch/arm/src/stm32/stm32_rcc.c                     |   8 +-
 arch/arm/src/stm32/stm32_serial.c                  | 344 ++++-----
 arch/arm/src/stm32/stm32_usbdev.c                  |   8 +-
 arch/arm/src/stm32/stm32_usbfs.c                   |   8 +-
 arch/arm/src/stm32/stm32_wwdg.c                    |   4 +-
 arch/arm/src/stm32/stm32f10xxx_rcc.c               |  10 +-
 arch/arm/src/stm32/stm32f37xxx_rcc.c               |   8 +-
 arch/arm/src/stm32/stm32f40xxx_i2c.c               |  52 +-
 arch/arm/src/stm32/stm32f40xxx_rtcc.c              |  14 +-
 arch/arm/src/stm32/stm32l15xxx_rtcc.c              |   4 +-
 arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h  |  24 +-
 arch/arm/src/stm32f0l0g0/stm32_serial_v1.c         | 194 ++---
 arch/arm/src/stm32f0l0g0/stm32_usbdev.c            |   6 +-
 arch/arm/src/stm32f7/hardware/stm32_sai.h          |  12 +-
 arch/arm/src/stm32f7/stm32_adc.c                   |   8 +-
 arch/arm/src/stm32f7/stm32_ethernet.c              |   6 +-
 arch/arm/src/stm32f7/stm32_lse.c                   |  16 +-
 arch/arm/src/stm32f7/stm32_otghost.c               |   4 +-
 arch/arm/src/stm32f7/stm32_qspi.c                  |   6 +-
 arch/arm/src/stm32f7/stm32_rtc.c                   |   2 +-
 arch/arm/src/stm32f7/stm32_rtc.h                   |   4 +-
 arch/arm/src/stm32f7/stm32_serial.c                |   2 +-
 arch/arm/src/stm32f7/stm32_tim.c                   |   2 +-
 arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h    |  12 +-
 arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h   |  25 +-
 arch/arm/src/stm32h7/stm32_ethernet.c              |   6 +-
 arch/arm/src/stm32h7/stm32_iwdg.c                  |   4 +-
 arch/arm/src/stm32h7/stm32_lse.c                   |  16 +-
 arch/arm/src/stm32h7/stm32_otgdev.c                |   4 +-
 arch/arm/src/stm32h7/stm32_otghost.c               |   4 +-
 arch/arm/src/stm32h7/stm32_qspi.c                  |   6 +-
 arch/arm/src/stm32h7/stm32_rtc.c                   |   2 +-
 arch/arm/src/stm32h7/stm32_rtc.h                   |   4 +-
 arch/arm/src/stm32h7/stm32_serial.c                |   2 +-
 arch/arm/src/stm32h7/stm32_wwdg.c                  |   4 +-
 arch/arm/src/stm32l4/hardware/stm32l4_sai.h        |  12 +-
 arch/arm/src/stm32l4/stm32l4_iwdg.c                |   4 +-
 arch/arm/src/stm32l4/stm32l4_lptim.c               |  24 +-
 arch/arm/src/stm32l4/stm32l4_lse.c                 |  16 +-
 arch/arm/src/stm32l4/stm32l4_otgfsdev.c            |  12 +-
 arch/arm/src/stm32l4/stm32l4_otgfshost.c           |   4 +-
 arch/arm/src/stm32l4/stm32l4_qspi.c                |   6 +-
 arch/arm/src/stm32l4/stm32l4_rtc.h                 |   8 +-
 arch/arm/src/stm32l4/stm32l4_serial.c              | 204 ++---
 arch/arm/src/stm32l4/stm32l4_usbdev.c              |   8 +-
 arch/arm/src/stm32l5/stm32l5_lse.c                 |   8 +-
 arch/arm/src/stm32l5/stm32l5_serial.c              | 212 +++---
 arch/arm/src/stm32u5/stm32_lse.c                   |   8 +-
 arch/arm/src/stm32u5/stm32_serial.c                | 212 +++---
 arch/arm/src/stm32wb/stm32wb_rcc_lse.c             |  16 +-
 arch/arm/src/stm32wb/stm32wb_rtc.h                 |   4 +-
 arch/arm/src/stm32wb/stm32wb_serial.c              |   8 +-
 arch/arm/src/stm32wl5/stm32wl5_lse.c               |   8 +-
 arch/arm/src/stm32wl5/stm32wl5_serial.c            |  94 +--
 arch/arm/src/tiva/common/tiva_sock_can.c           |   4 +-
 arch/arm/src/tiva/tiva_gpio.h                      |   2 +-
 arch/arm/src/tiva/tm4c/tm4c_ethernet.c             |   6 +-
 arch/arm/src/tlsr82/tc32/tc32_initialstate.c       |   4 +-
 arch/arm/src/xmc4/xmc4_spi.c                       |   4 +-
 arch/arm64/src/common/arm64_initialize.c           |   2 +-
 arch/arm64/src/common/arm64_internal.h             |  10 +-
 arch/avr/include/avr/irq.h                         |   2 +-
 arch/avr/src/at32uc3/at32uc3_adc.h                 |  20 +-
 arch/avr/src/common/avr_internal.h                 |  10 +-
 arch/ceva/include/xc5/irq.h                        |   4 +-
 arch/ceva/include/xm6/irq.h                        |   4 +-
 arch/ceva/src/common/ceva_internal.h               |   8 +-
 arch/ceva/src/common/ceva_svcall.c                 |  20 +-
 arch/ceva/src/xc5/xc5_hardfault.c                  |   4 +-
 arch/ceva/src/xm6/xm6_hardfault.c                  |   4 +-
 arch/hc/include/hc12/types.h                       |   2 +-
 arch/hc/include/hcs12/types.h                      |   2 +-
 arch/hc/include/m9s12/irq.h                        |  84 +--
 arch/hc/src/common/hc_internal.h                   |   8 +-
 arch/hc/src/m9s12/m9s12_ethernet.c                 |   2 +-
 arch/hc/src/m9s12/m9s12_gpioirq.c                  |  12 +-
 arch/hc/src/m9s12/m9s12_initialstate.c             |   6 +-
 arch/mips/include/mips32/cp0.h                     |  48 +-
 arch/mips/src/common/mips_internal.h               |   8 +-
 arch/mips/src/pic32mx/pic32mx_ethernet.c           |   8 +-
 arch/misoc/src/common/misoc_net.c                  |   2 +-
 arch/misoc/src/common/misoc_serial.c               |   2 +-
 arch/or1k/src/common/or1k_internal.h               |   8 +-
 arch/renesas/include/rx65n/irq.h                   |  32 +-
 arch/renesas/src/common/renesas_internal.h         |  10 +-
 arch/renesas/src/rx65n/rx65n_eth.c                 |   6 +-
 arch/renesas/src/rx65n/rx65n_riic.c                |   4 +-
 arch/renesas/src/rx65n/rx65n_rtc.c                 |   4 +-
 arch/renesas/src/rx65n/rx65n_rtc_lowerhalf.c       |   6 +-
 arch/renesas/src/rx65n/rx65n_usbdev.c              |  12 +-
 arch/risc-v/src/bl602/bl602_netdev.c               |   8 +-
 arch/risc-v/src/common/riscv_internal.h            |   4 +-
 arch/risc-v/src/common/riscv_pmp.c                 |  14 +-
 arch/risc-v/src/esp32c3/esp32c3_serial.c           |   2 +-
 arch/risc-v/src/esp32c6/esp32c6_lowputc.c          |   4 +-
 arch/risc-v/src/esp32c6/esp32c6_serial.c           |   2 +-
 arch/risc-v/src/espressif/esp_serial.c             |   2 +-
 arch/sim/src/sim/sim_ajoystick.c                   |   2 +-
 arch/sim/src/sim/sim_deviceimage.c                 |   6 +-
 arch/sparc/src/bm3803/bm3803_wdg.c                 |   4 +-
 arch/sparc/src/common/sparc_internal.h             |  10 +-
 arch/x86/src/common/x86_internal.h                 |   8 +-
 arch/x86_64/include/intel64/arch.h                 |  70 +-
 arch/x86_64/src/common/x86_64_initialize.c         |   2 +-
 arch/x86_64/src/common/x86_64_internal.h           |  10 +-
 arch/xtensa/include/xtensa/core.h                  | 112 +--
 arch/xtensa/include/xtensa/core_macros.h           |   2 +-
 arch/xtensa/include/xtensa/xtensa_corebits.h       |   6 +-
 arch/xtensa/src/common/xtensa.h                    |   8 +-
 arch/xtensa/src/esp32s2/esp32s2_lowputc.c          |   6 +-
 arch/xtensa/src/esp32s2/esp32s2_serial.c           |   2 +-
 arch/xtensa/src/esp32s3/esp32s3_serial.c           |   2 +-
 arch/z16/src/common/z16_internal.h                 |   4 +-
 arch/z16/src/z16f/chip.h                           |  66 +-
 arch/z16/src/z16f/z16f_espi.c                      |   8 +-
 arch/z16/src/z16f/z16f_serial.c                    |  16 +-
 arch/z80/src/common/z80_internal.h                 |  14 +-
 arch/z80/src/ez80/ez80_serial.c                    |  38 +-
 arch/z80/src/z180/z180_scc.c                       |   4 +-
 arch/z80/src/z8/chip.h                             |   4 +-
 arch/z80/src/z8/z8_serial.c                        |  28 +-
 binfmt/elf.c                                       |   8 +-
 binfmt/libelf/libelf_bind.c                        |   4 +-
 binfmt/libelf/libelf_init.c                        |   4 +-
 binfmt/libnxflat/libnxflat_bind.c                  |   4 +-
 binfmt/libnxflat/libnxflat_init.c                  |   4 +-
 binfmt/nxflat.c                                    |   6 +-
 .../arm/cxd56xx/spresense/include/board_lcdpins.h  |  96 +--
 boards/arm/imxrt/teensy-4.x/src/imxrt_bringup.c    |   4 +-
 boards/arm/imxrt/teensy-4.x/src/imxrt_flexcan.c    |   8 +-
 boards/arm/kinetis/freedom-k64f/src/k64_i2c.c      |   6 +-
 boards/arm/lpc31xx/ea3131/src/lpc31_mem.c          |   8 +-
 boards/arm/lpc31xx/ea3152/src/lpc31_mem.c          |   8 +-
 .../arm/lpc31xx/olimex-lpc-h3131/src/lpc31_mem.c   |   8 +-
 .../arm/rp2040/common/src/rp2040_common_bringup.c  |  58 +-
 .../arm/s32k1xx/s32k148evb/src/s32k1xx_bringup.c   |  16 +-
 boards/arm/sam34/sam3u-ek/src/sam3u-ek.h           |   2 +-
 boards/arm/sam34/sam4e-ek/src/sam4e-ek.h           |   2 +-
 .../sam4s-xplained-pro/src/sam4s-xplained-pro.h    |   8 +-
 boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c |   4 +-
 boards/arm/stm32/nucleo-f429zi/include/board.h     |   8 +-
 boards/arm/stm32/nucleo-f429zi/src/nucleo-144.h    |   2 +-
 boards/arm/stm32/nucleo-f429zi/src/stm32_spi.c     |  78 +-
 boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c     |   4 +-
 boards/arm/stm32/stm3220g-eval/src/stm32_lcd.c     |  12 +-
 boards/arm/stm32/stm3240g-eval/src/stm32_lcd.c     |  12 +-
 .../stm32/stm32f103-minimum/src/stm32_bringup.c    |   4 +-
 .../stm32/stm32f103-minimum/src/stm32_lcd_st7567.c |   2 +-
 .../stm32/stm32f103-minimum/src/stm32_pcd8544.c    |   2 +-
 boards/arm/stm32/stm32f429i-disco/include/board.h  |  12 +-
 boards/arm/stm32/stm32f429i-disco/src/stm32_lcd.c  |  12 +-
 boards/arm/stm32/stm32f4discovery/src/stm32_spi.c  |  16 +-
 boards/arm/stm32f7/nucleo-144/src/nucleo-144.h     |   2 +-
 boards/arm/stm32f7/nucleo-144/src/stm32_spi.c      |  78 +-
 .../arm/stm32f7/stm32f746g-disco/src/stm32_adc.c   |   4 +-
 .../arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h  |   2 +-
 .../stm32h7/nucleo-h743zi2/src/nucleo-h743zi2.h    |   2 +-
 .../arm/stm32l4/nucleo-l476rg/src/stm32_pcd8544.c  |   2 +-
 boards/arm/stm32l4/nucleo-l496zg/include/board.h   |   4 +-
 boards/arm/stm32l4/nucleo-l496zg/src/nucleo-144.h  |   2 +-
 boards/arm/stm32l4/nucleo-l496zg/src/stm32_spi.c   |  78 +-
 .../arm/stm32wb/flipperzero/src/stm32_lcd_st7565.c |   2 +-
 .../esp32s2/esp32s2-kaluga-1/src/esp32s2_buttons.c |   8 +-
 drivers/lcd/skeleton.c                             |  12 +-
 drivers/mmcsd/mmcsd_sdio.c                         |   4 +-
 drivers/mtd/mx25lx.c                               |   8 +-
 drivers/mtd/mx35.c                                 |   8 +-
 drivers/mtd/sst26.c                                |   8 +-
 drivers/net/ftmac100.c                             |  36 +-
 drivers/net/skeleton.c                             |   2 +-
 drivers/net/slip.c                                 |   2 +-
 drivers/net/telnet.c                               |   2 +-
 drivers/usbdev/composite.h                         |   2 +-
 drivers/usbdev/usbmsc.h                            |   2 +-
 drivers/virtio/virtio-mmio-blk.c                   |   2 +-
 drivers/virtio/virtio-mmio-net.c                   |   2 +-
 drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c  |  12 +-
 fs/fat/fs_fat32.h                                  | 830 ++++++++++-----------
 fs/procfs/fs_procfsuptime.c                        |   6 +-
 graphics/nxglib/fb/nxglib_copyrectangle.c          |   6 +-
 graphics/nxglib/fb/nxglib_fillrectangle.c          |   6 +-
 graphics/nxglib/fb/nxglib_getrectangle.c           |   6 +-
 graphics/nxglib/fb/nxglib_moverectangle.c          |   6 +-
 graphics/nxglib/fb/nxglib_setpixel.c               |  30 +-
 graphics/nxglib/lcd/nxglib_setpixel.c              |  26 +-
 graphics/nxglib/nxglib.h                           |   4 +-
 graphics/nxglib/pwfb/pwfb_copyrectangle.c          |   6 +-
 graphics/nxglib/pwfb/pwfb_fillrectangle.c          |   6 +-
 graphics/nxglib/pwfb/pwfb_getrectangle.c           |   6 +-
 graphics/nxglib/pwfb/pwfb_moverectangle.c          |   6 +-
 graphics/nxglib/pwfb/pwfb_setpixel.c               |  30 +-
 include/debug.h                                    |   8 +-
 include/execinfo.h                                 |   8 +-
 include/limits.h                                   |   4 +-
 include/lzf.h                                      |   4 +-
 include/netinet/icmp6.h                            |  16 +-
 include/nuttx/board.h                              |   6 +-
 include/nuttx/clock.h                              |   4 +-
 include/nuttx/lcd/ili9325.h                        |   2 +-
 include/nuttx/lib/modlib.h                         |   4 +-
 include/nuttx/mqueue.h                             |  10 +-
 include/nuttx/mtd/onfi.h                           |   2 +-
 include/nuttx/net/igmp.h                           |   4 +-
 include/nuttx/net/mld.h                            |   4 +-
 include/nuttx/net/netdev.h                         |  10 +-
 include/nuttx/nx/nxfonts.h                         |  90 +--
 include/nuttx/nx/nxglib.h                          |   4 +-
 include/nuttx/nx/nxterm.h                          |   4 +-
 include/nuttx/nx/nxtk.h                            |   4 +-
 include/nuttx/power/bq2429x.h                      |   8 +-
 include/nuttx/semaphore.h                          |  17 +-
 include/nuttx/sensors/ds18b20.h                    |   4 +-
 include/nuttx/timers/cs2100-cp.h                   |   2 +-
 include/nuttx/usb/audio.h                          |   4 +-
 include/nuttx/usb/cdcacm.h                         |   4 +-
 include/nuttx/usb/hid.h                            |   4 +-
 include/nuttx/usb/hid_parser.h                     |   4 +-
 include/nuttx/usb/usbdev_trace.h                   |   4 +-
 include/nuttx/usb/usbhost_trace.h                  |   4 +-
 include/nuttx/video/fb.h                           |   4 +-
 include/pwd.h                                      |   4 +-
 include/semaphore.h                                |  25 +-
 include/time.h                                     |   8 +-
 libs/libc/dlfcn/lib_dlopen.c                       |   4 +-
 libs/libc/libc.h                                   |   2 +-
 libs/libc/machine/arm/arm_asm.h                    |  20 +-
 libs/libc/modlib/modlib_init.c                     |   4 +-
 libs/libc/stdio/lib_perror.c                       |  12 +-
 libs/libm/newlib/include/complex.h                 |   4 +-
 libs/libm/newlib/include/machine/ieeefp.h          |  18 +-
 libs/libm/newlib/include/math.h                    |  10 +-
 libs/libnx/nxfonts/nxfonts.h                       |   4 +-
 libs/libnx/nxtk/nxtk.h                             |   4 +-
 mm/mm_heap/mm.h                                    |   4 +-
 mm/mm_heap/mm_foreach.c                            |   2 +-
 mm/mm_heap/mm_initialize.c                         |   2 +-
 mm/mm_heap/mm_mallinfo.c                           |   2 +-
 mm/tlsf/mm_tlsf.c                                  |   8 +-
 net/arp/arp.h                                      |   2 +-
 net/can/can.h                                      |   8 +-
 net/devif/devif_poll.c                             |   2 +-
 sched/module/mod_insmod.c                          |   4 +-
 sched/mqueue/mqueue.h                              |   4 +-
 wireless/ieee802154/mac802154_netdev.c             |   2 +-
 390 files changed, 3970 insertions(+), 3973 deletions(-)

diff --git a/arch/arm/src/arm/arm_initialstate.c b/arch/arm/src/arm/arm_initialstate.c
index ca52cba491..e6ea138130 100644
--- a/arch/arm/src/arm/arm_initialstate.c
+++ b/arch/arm/src/arm/arm_initialstate.c
@@ -141,9 +141,9 @@ void up_initial_state(struct tcb_s *tcb)
 
   /* Enable or disable interrupts, based on user configuration */
 
-# ifdef CONFIG_SUPPRESS_INTERRUPTS
+#ifdef CONFIG_SUPPRESS_INTERRUPTS
   cpsr                  |= PSR_I_BIT;
-# endif
+#endif
 
 #ifdef CONFIG_ARM_THUMB
   cpsr                  |= PSR_T_BIT;
diff --git a/arch/arm/src/armv6-m/arm_hardfault.c b/arch/arm/src/armv6-m/arm_hardfault.c
index 4dea1b87b1..6b02754e06 100644
--- a/arch/arm/src/armv6-m/arm_hardfault.c
+++ b/arch/arm/src/armv6-m/arm_hardfault.c
@@ -39,15 +39,15 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_HARDFAULT_ALERT
-# define hfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define hfalert(x...)
+#  define hfalert(x...)
 #endif
 
 #ifdef CONFIG_DEBUG_HARDFAULT_INFO
-# define hfinfo(format, ...)   _info(format, ##__VA_ARGS__)
+#  define hfinfo(format, ...)  _info(format, ##__VA_ARGS__)
 #else
-# define hfinfo(x...)
+#  define hfinfo(x...)
 #endif
 
 #define INSN_SVC0        0xdf00 /* insn: svc 0 */
diff --git a/arch/arm/src/armv6-m/arm_svcall.c b/arch/arm/src/armv6-m/arm_svcall.c
index a11ff403ad..02a609fc55 100644
--- a/arch/arm/src/armv6-m/arm_svcall.c
+++ b/arch/arm/src/armv6-m/arm_svcall.c
@@ -127,9 +127,9 @@ int arm_svcall(int irq, void *context, void *arg)
    */
 
 #ifdef CONFIG_DEBUG_SYSCALL_INFO
-# ifndef CONFIG_DEBUG_SVCALL
+#  ifndef CONFIG_DEBUG_SVCALL
   if (cmd > SYS_switch_context)
-# endif
+#  endif
     {
       svcinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
       svcinfo("  R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
@@ -138,13 +138,13 @@ int arm_svcall(int irq, void *context, void *arg)
       svcinfo("  R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
               regs[REG_R8],  regs[REG_R9],  regs[REG_R10], regs[REG_R11],
               regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
-# ifdef CONFIG_BUILD_PROTECTED
+#  ifdef CONFIG_BUILD_PROTECTED
       svcinfo(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n",
               regs[REG_XPSR], regs[REG_PRIMASK], regs[REG_EXC_RETURN]);
-# else
+#  else
       svcinfo(" PSR: %08x PRIMASK: %08x\n",
               regs[REG_XPSR], regs[REG_PRIMASK]);
-# endif
+#  endif
     }
 #endif
 
@@ -429,11 +429,11 @@ int arm_svcall(int irq, void *context, void *arg)
    */
 
 #ifdef CONFIG_DEBUG_SYSCALL_INFO
-# ifndef CONFIG_DEBUG_SVCALL
+#  ifndef CONFIG_DEBUG_SVCALL
   if (cmd > SYS_switch_context)
-# else
+#  else
   if (regs != CURRENT_REGS)
-# endif
+#  endif
     {
       svcinfo("SVCall Return:\n");
       svcinfo("  R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
@@ -446,21 +446,21 @@ int arm_svcall(int irq, void *context, void *arg)
               CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
               CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
               CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
-#ifdef CONFIG_BUILD_PROTECTED
+#  ifdef CONFIG_BUILD_PROTECTED
       svcinfo(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n",
               CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
               CURRENT_REGS[REG_EXC_RETURN]);
-#else
+#  else
       svcinfo(" PSR: %08x PRIMASK: %08x\n",
               CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
-#endif
+#  endif
     }
-# ifdef CONFIG_DEBUG_SVCALL
+#  ifdef CONFIG_DEBUG_SVCALL
   else
     {
       svcinfo("SVCall Return: %d\n", regs[REG_R0]);
     }
-# endif
+#  endif
 #endif
 
   return OK;
diff --git a/arch/arm/src/armv7-m/arm_busfault.c b/arch/arm/src/armv7-m/arm_busfault.c
index 9fa43c4ea1..3e12ec8efc 100644
--- a/arch/arm/src/armv7-m/arm_busfault.c
+++ b/arch/arm/src/armv7-m/arm_busfault.c
@@ -39,9 +39,9 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_BUSFAULT
-# define bfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define bfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define bfalert(x...)
+#  define bfalert(x...)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/armv7-m/arm_hardfault.c b/arch/arm/src/armv7-m/arm_hardfault.c
index d1c440370c..d45c979662 100644
--- a/arch/arm/src/armv7-m/arm_hardfault.c
+++ b/arch/arm/src/armv7-m/arm_hardfault.c
@@ -45,15 +45,15 @@
  */
 
 #ifdef CONFIG_DEBUG_HARDFAULT_ALERT
-# define hfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define hfalert(x...)
+#  define hfalert(x...)
 #endif
 
 #ifdef CONFIG_DEBUG_HARDFAULT_INFO
-# define hfinfo(format, ...)   _info(format, ##__VA_ARGS__)
+#  define hfinfo(format, ...)  _info(format, ##__VA_ARGS__)
 #else
-# define hfinfo(x...)
+#  define hfinfo(x...)
 #endif
 
 #define INSN_SVC0        0xdf00 /* insn: svc 0 */
diff --git a/arch/arm/src/armv7-m/arm_memfault.c b/arch/arm/src/armv7-m/arm_memfault.c
index 8fdecd7f3e..afde6fad92 100644
--- a/arch/arm/src/armv7-m/arm_memfault.c
+++ b/arch/arm/src/armv7-m/arm_memfault.c
@@ -38,9 +38,9 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_MEMFAULT
-# define mfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define mfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define mfalert(x...)
+#  define mfalert(x...)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/armv7-m/arm_svcall.c b/arch/arm/src/armv7-m/arm_svcall.c
index 97a882e8dc..d9f5c0aa00 100644
--- a/arch/arm/src/armv7-m/arm_svcall.c
+++ b/arch/arm/src/armv7-m/arm_svcall.c
@@ -135,9 +135,9 @@ int arm_svcall(int irq, void *context, void *arg)
    */
 
 #ifdef CONFIG_DEBUG_SYSCALL_INFO
-# ifndef CONFIG_DEBUG_SVCALL
+#  ifndef CONFIG_DEBUG_SVCALL
   if (cmd > SYS_switch_context)
-# endif
+#  endif
     {
       svcinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
       svcinfo("  R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
@@ -146,12 +146,12 @@ int arm_svcall(int irq, void *context, void *arg)
       svcinfo("  R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
               regs[REG_R8],  regs[REG_R9],  regs[REG_R10], regs[REG_R11],
               regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
-# ifdef REG_EXC_RETURN
+#  ifdef REG_EXC_RETURN
       svcinfo(" PSR: %08x EXC_RETURN: %08x\n",
               regs[REG_XPSR], regs[REG_EXC_RETURN]);
-# else
+#  else
       svcinfo(" PSR: %08x\n", regs[REG_XPSR]);
-# endif
+#  endif
     }
 #endif
 
@@ -437,11 +437,11 @@ int arm_svcall(int irq, void *context, void *arg)
    */
 
 #ifdef CONFIG_DEBUG_SYSCALL_INFO
-# ifndef CONFIG_DEBUG_SVCALL
+#  ifndef CONFIG_DEBUG_SVCALL
   if (cmd > SYS_switch_context)
-# else
+#  else
   if (regs != CURRENT_REGS)
-# endif
+#  endif
     {
       svcinfo("SVCall Return:\n");
       svcinfo("  R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
@@ -454,19 +454,19 @@ int arm_svcall(int irq, void *context, void *arg)
               CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
               CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
               CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
-# ifdef REG_EXC_RETURN
+#  ifdef REG_EXC_RETURN
       svcinfo(" PSR: %08x EXC_RETURN: %08x\n",
               CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_EXC_RETURN]);
-# else
+#  else
       svcinfo(" PSR: %08x\n", CURRENT_REGS[REG_XPSR]);
-# endif
+#  endif
     }
-# ifdef CONFIG_DEBUG_SVCALL
+#  ifdef CONFIG_DEBUG_SVCALL
   else
     {
       svcinfo("SVCall Return: %d\n", regs[REG_R0]);
     }
-# endif
+#  endif
 #endif
 
   return OK;
diff --git a/arch/arm/src/armv7-m/arm_usagefault.c b/arch/arm/src/armv7-m/arm_usagefault.c
index ddb3998ec4..39cc46b114 100644
--- a/arch/arm/src/armv7-m/arm_usagefault.c
+++ b/arch/arm/src/armv7-m/arm_usagefault.c
@@ -39,9 +39,9 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_USAGEFAULT
-# define ufalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define ufalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define ufalert(x...)
+#  define ufalert(x...)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/armv8-m/arm_busfault.c b/arch/arm/src/armv8-m/arm_busfault.c
index 559cba5fb4..2060cae591 100644
--- a/arch/arm/src/armv8-m/arm_busfault.c
+++ b/arch/arm/src/armv8-m/arm_busfault.c
@@ -39,9 +39,9 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_BUSFAULT
-# define bfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define bfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define bfalert(x...)
+#  define bfalert(x...)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/armv8-m/arm_hardfault.c b/arch/arm/src/armv8-m/arm_hardfault.c
index 44ac314f7b..5a9542dca7 100644
--- a/arch/arm/src/armv8-m/arm_hardfault.c
+++ b/arch/arm/src/armv8-m/arm_hardfault.c
@@ -45,15 +45,15 @@
  */
 
 #ifdef CONFIG_DEBUG_HARDFAULT_ALERT
-# define hfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define hfalert(x...)
+#  define hfalert(x...)
 #endif
 
 #ifdef CONFIG_DEBUG_HARDFAULT_INFO
-# define hfinfo(format, ...)   _info(format, ##__VA_ARGS__)
+#  define hfinfo(format, ...)  _info(format, ##__VA_ARGS__)
 #else
-# define hfinfo(x...)
+#  define hfinfo(x...)
 #endif
 
 #define INSN_SVC0        0xdf00 /* insn: svc 0 */
diff --git a/arch/arm/src/armv8-m/arm_memfault.c b/arch/arm/src/armv8-m/arm_memfault.c
index 506e70ed29..e9bdbc580e 100644
--- a/arch/arm/src/armv8-m/arm_memfault.c
+++ b/arch/arm/src/armv8-m/arm_memfault.c
@@ -38,9 +38,9 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_MEMFAULT
-# define mfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define mfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define mfalert(x...)
+#  define mfalert(x...)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/armv8-m/arm_svcall.c b/arch/arm/src/armv8-m/arm_svcall.c
index c98a831e88..70fc9643bd 100644
--- a/arch/arm/src/armv8-m/arm_svcall.c
+++ b/arch/arm/src/armv8-m/arm_svcall.c
@@ -134,9 +134,9 @@ int arm_svcall(int irq, void *context, void *arg)
    */
 
 #ifdef CONFIG_DEBUG_SYSCALL_INFO
-# ifndef CONFIG_DEBUG_SVCALL
+#  ifndef CONFIG_DEBUG_SVCALL
   if (cmd > SYS_switch_context)
-# endif
+#  endif
     {
       svcinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
       svcinfo("  R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
@@ -145,12 +145,12 @@ int arm_svcall(int irq, void *context, void *arg)
       svcinfo("  R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
               regs[REG_R8],  regs[REG_R9],  regs[REG_R10], regs[REG_R11],
               regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
-# ifdef REG_EXC_RETURN
+#  ifdef REG_EXC_RETURN
       svcinfo(" PSR: %08x EXC_RETURN: %08x\n",
               regs[REG_XPSR], regs[REG_EXC_RETURN]);
-# else
+#  else
       svcinfo(" PSR: %08x\n", regs[REG_XPSR]);
-# endif
+#  endif
     }
 #endif
 
@@ -437,11 +437,11 @@ int arm_svcall(int irq, void *context, void *arg)
    */
 
 #ifdef CONFIG_DEBUG_SYSCALL_INFO
-# ifndef CONFIG_DEBUG_SVCALL
+#  ifndef CONFIG_DEBUG_SVCALL
   if (cmd > SYS_switch_context)
-# else
+#  else
   if (regs != CURRENT_REGS)
-# endif
+#  endif
     {
       svcinfo("SVCall Return:\n");
       svcinfo("  R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
@@ -454,19 +454,19 @@ int arm_svcall(int irq, void *context, void *arg)
               CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
               CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
               CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
-# ifdef REG_EXC_RETURN
+#  ifdef REG_EXC_RETURN
       svcinfo(" PSR: %08x EXC_RETURN: %08x\n",
               CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_EXC_RETURN]);
-# else
+#  else
       svcinfo(" PSR: %08x\n", CURRENT_REGS[REG_XPSR]);
-# endif
+#  endif
     }
-# ifdef CONFIG_DEBUG_SVCALL
+#  ifdef CONFIG_DEBUG_SVCALL
   else
     {
       svcinfo("SVCall Return: %d\n", regs[REG_R0]);
     }
-# endif
+#  endif
 #endif
 
   return OK;
diff --git a/arch/arm/src/armv8-m/arm_usagefault.c b/arch/arm/src/armv8-m/arm_usagefault.c
index 41b6808e33..edbe6353cb 100644
--- a/arch/arm/src/armv8-m/arm_usagefault.c
+++ b/arch/arm/src/armv8-m/arm_usagefault.c
@@ -39,9 +39,9 @@
  ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_USAGEFAULT
-# define ufalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define ufalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define ufalert(x...)
+#  define ufalert(x...)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c
index f052cb3e49..fa00b31d98 100644
--- a/arch/arm/src/c5471/c5471_ethernet.c
+++ b/arch/arm/src/c5471/c5471_ethernet.c
@@ -80,7 +80,7 @@
  */
 
 #ifndef CONFIG_C5471_NET_NINTERFACES
-# define CONFIG_C5471_NET_NINTERFACES 1
+#  define CONFIG_C5471_NET_NINTERFACES 1
 #endif
 
 /* CONFIG_C5471_NET_STATS will enabled collection of driver statistics.
@@ -99,7 +99,7 @@
 # undef CONFIG_C5471_AUTONEGOTIATION
 # undef CONFIG_C5471_BASET100
 #else
-# define CONFIG_C5471_AUTONEGOTIATION 1
+#  define CONFIG_C5471_AUTONEGOTIATION 1
 # undef CONFIG_C5471_BASET100
 # undef CONFIG_C5471_BASET10
 #endif
@@ -435,7 +435,7 @@ static inline void c5471_dumpbuffer(const char *msg, const uint8_t *buffer,
   ninfodumpbuffer(msg, buffer, nbytes);
 }
 #else
-# define c5471_dumpbuffer(msg, buffer,nbytes)
+#  define c5471_dumpbuffer(msg, buffer,nbytes)
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/c5471/c5471_serial.c b/arch/arm/src/c5471/c5471_serial.c
index 394b5bea0e..7d1888be1d 100644
--- a/arch/arm/src/c5471/c5471_serial.c
+++ b/arch/arm/src/c5471/c5471_serial.c
@@ -48,7 +48,7 @@
 #define BASE_BAUD     115200
 
 #if defined(CONFIG_UART_IRDA_HWFLOWCONTROL) || defined(CONFIG_UART_MODEM_HWFLOWCONTROL)
-# define CONFIG_UART_HWFLOWCONTROL
+#  define CONFIG_UART_HWFLOWCONTROL
 #endif
 
 /****************************************************************************
@@ -203,13 +203,13 @@ static uart_dev_t g_modemport =
 /* Now, which one with be tty0/console and which tty1? */
 
 #ifdef CONFIG_SERIAL_IRDA_CONSOLE
-# define CONSOLE_DEV     g_irdaport
-# define TTYS0_DEV       g_irdaport
-# define TTYS1_DEV       g_modemport
+#  define CONSOLE_DEV    g_irdaport
+#  define TTYS0_DEV      g_irdaport
+#  define TTYS1_DEV      g_modemport
 #else
-# define CONSOLE_DEV     g_modemport
-# define TTYS0_DEV       g_modemport
-# define TTYS1_DEV       g_irdaport
+#  define CONSOLE_DEV    g_modemport
+#  define TTYS0_DEV      g_modemport
+#  define TTYS1_DEV      g_irdaport
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/common/arm_internal.h b/arch/arm/src/common/arm_internal.h
index a1dbcfb904..3f68b49536 100644
--- a/arch/arm/src/common/arm_internal.h
+++ b/arch/arm/src/common/arm_internal.h
@@ -356,7 +356,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs);
 void arm_pginitialize(void);
 uint32_t *arm_va2pte(uintptr_t vaddr);
 #else /* CONFIG_PAGING */
-# define arm_pginitialize()
+#  define arm_pginitialize()
 #endif /* CONFIG_PAGING */
 
 /* Exception Handlers */
@@ -382,7 +382,7 @@ void arm_pginitialize(void);
 uint32_t *arm_va2pte(uintptr_t vaddr);
 void arm_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr);
 #else /* CONFIG_PAGING */
-# define arm_pginitialize()
+#  define arm_pginitialize()
 void arm_dataabort(uint32_t *regs);
 #endif /* CONFIG_PAGING */
 
@@ -442,7 +442,7 @@ void arm_l2ccinitialize(void);
 #if CONFIG_MM_REGIONS > 1
 void arm_addregion(void);
 #else
-# define arm_addregion()
+#  define arm_addregion()
 #endif
 
 /* Networking ***************************************************************/
@@ -461,7 +461,7 @@ void arm_addregion(void);
 #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
 void arm_netinitialize(void);
 #else
-# define arm_netinitialize()
+#  define arm_netinitialize()
 #endif
 
 /* USB **********************************************************************/
@@ -470,8 +470,8 @@ void arm_netinitialize(void);
 void arm_usbinitialize(void);
 void arm_usbuninitialize(void);
 #else
-# define arm_usbinitialize()
-# define arm_usbuninitialize()
+#  define arm_usbinitialize()
+#  define arm_usbuninitialize()
 #endif
 
 /* Debug ********************************************************************/
diff --git a/arch/arm/src/dm320/dm320_serial.c b/arch/arm/src/dm320/dm320_serial.c
index 01d70362a6..40da3df612 100644
--- a/arch/arm/src/dm320/dm320_serial.c
+++ b/arch/arm/src/dm320/dm320_serial.c
@@ -171,13 +171,13 @@ static uart_dev_t g_uart1port =
 /* Now, which one with be tty0/console and which tty1? */
 
 #ifdef CONFIG_SERIAL_IRDA_CONSOLE
-# define CONSOLE_DEV     g_uart1port
-# define TTYS0_DEV       g_uart1port
-# define TTYS1_DEV       g_uart0port
+#  define CONSOLE_DEV    g_uart1port
+#  define TTYS0_DEV      g_uart1port
+#  define TTYS1_DEV      g_uart0port
 #else
-# define CONSOLE_DEV     g_uart0port
-# define TTYS0_DEV       g_uart0port
-# define TTYS1_DEV       g_uart1port
+#  define CONSOLE_DEV    g_uart0port
+#  define TTYS0_DEV      g_uart0port
+#  define TTYS1_DEV      g_uart1port
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/dm320/dm320_timer.h b/arch/arm/src/dm320/dm320_timer.h
index f773a0384c..5e16388f4d 100644
--- a/arch/arm/src/dm320/dm320_timer.h
+++ b/arch/arm/src/dm320/dm320_timer.h
@@ -60,9 +60,9 @@
 #define  DM320_TMR_MODE_TEST_MASK 0x00fc /* Bits 7:2=Test */
 #define  DM320_TMR_MODE_MODE_MASK 0x0003 /* Bits 1:0=timer mode */
 
-# define DM320_TMR_MODE_STOP      0x0000 /* Stop Timer */
-# define DM320_TMR_MODE_ONESHOT   0x0001 /* Start one-shot timer */
-# define DM320_TMR_MODE_FREERUN   0x0002 /* Start free-running timer */
+#  define DM320_TMR_MODE_STOP     0x0000 /* Stop Timer */
+#  define DM320_TMR_MODE_ONESHOT  0x0001 /* Start one-shot timer */
+#  define DM320_TMR_MODE_FREERUN  0x0002 /* Start free-running timer */
 
 /* Timer 0,1,2,3 Clock Select Register Bits: */
 
@@ -76,7 +76,7 @@
 
 #define  DM320_TMR_TMTRG_MASK     0x0001 /* Bit 0=One short trigger */
 
-# define DM320_TMR_TMTRG_START    0x0001 /* 1 starts one shot timer */
+#  define DM320_TMR_TMTRG_START   0x0001 /* 1 starts one shot timer */
 
 /* Timer 0,1,2,3 Timer Counter Register Bits: */
 
diff --git a/arch/arm/src/dm320/dm320_usbdev.c b/arch/arm/src/dm320/dm320_usbdev.c
index 4dd5682629..d7dfe8b69b 100644
--- a/arch/arm/src/dm320/dm320_usbdev.c
+++ b/arch/arm/src/dm320/dm320_usbdev.c
@@ -261,12 +261,12 @@ static void dm320_putreg8(uint8_t val, uint32_t addr);
 static void dm320_putreg16(uint16_t val, uint32_t addr);
 static void dm320_putreg32(uint32_t val, uint32_t addr);
 #else
-# define dm320_getreg8(addr)      getreg8(addr)
-# define dm320_getreg16(addr)     getreg16(addr)
-# define dm320_getreg32(addr)     getreg32(addr)
-# define dm320_putreg8(val,addr)  putreg8(val,addr)
-# define dm320_putreg16(val,addr) putreg16(val,addr)
-# define dm320_putreg32(val,addr) putreg32(val,addr)
+#  define dm320_getreg8(addr)      getreg8(addr)
+#  define dm320_getreg16(addr)     getreg16(addr)
+#  define dm320_getreg32(addr)     getreg32(addr)
+#  define dm320_putreg8(val,addr)  putreg8(val,addr)
+#  define dm320_putreg16(val,addr) putreg16(val,addr)
+#  define dm320_putreg32(val,addr) putreg32(val,addr)
 #endif
 
 /* Request queue operations *************************************************/
diff --git a/arch/arm/src/efm32/efm32_usbdev.c b/arch/arm/src/efm32/efm32_usbdev.c
index ff54616dc9..4f7bb31894 100644
--- a/arch/arm/src/efm32/efm32_usbdev.c
+++ b/arch/arm/src/efm32/efm32_usbdev.c
@@ -465,8 +465,8 @@ struct efm32_usbdev_s
 static uint32_t    efm32_getreg(uint32_t addr);
 static void        efm32_putreg(uint32_t val, uint32_t addr);
 #else
-# define efm32_getreg(addr)     getreg32(addr)
-# define efm32_putreg(val,addr) putreg32(val,addr)
+#  define efm32_getreg(addr)     getreg32(addr)
+#  define efm32_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Request queue operations *************************************************/
diff --git a/arch/arm/src/efm32/efm32_usbhost.c b/arch/arm/src/efm32/efm32_usbhost.c
index 8120cfd9ce..a15e8dc6a4 100644
--- a/arch/arm/src/efm32/efm32_usbhost.c
+++ b/arch/arm/src/efm32/efm32_usbhost.c
@@ -284,8 +284,8 @@ static void efm32_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t efm32_getreg(uint32_t addr);
 static void efm32_putreg(uint32_t addr, uint32_t value);
 #else
-# define efm32_getreg(addr)     getreg32(addr)
-# define efm32_putreg(addr,val) putreg32(val,addr)
+#  define efm32_getreg(addr)     getreg32(addr)
+#  define efm32_putreg(addr,val) putreg32(val,addr)
 #endif
 
 static inline void efm32_modifyreg(uint32_t addr, uint32_t clrbits,
diff --git a/arch/arm/src/efm32/hardware/efm32gg_memorymap.h b/arch/arm/src/efm32/hardware/efm32gg_memorymap.h
index 8c60f6b24f..33931c6101 100644
--- a/arch/arm/src/efm32/hardware/efm32gg_memorymap.h
+++ b/arch/arm/src/efm32/hardware/efm32gg_memorymap.h
@@ -68,7 +68,7 @@
 #define EFM32_FLASH_MEM_BASE       0x00000000 /* FLASH base address */
 #  define EFM32_FLASH_MEM_BITS     0x00000028 /* FLASH used bits */
 #define EFM32_RAM_CODE_MEM_BASE    0x10000000 /* RAM_CODE base address */
-# define EFM32_RAM_CODE_MEM_BITS   0x00000014 /* RAM_CODE used bits */
+#  define EFM32_RAM_CODE_MEM_BITS  0x00000014 /* RAM_CODE used bits */
 #define EFM32_RAM_MEM_BASE         0x20000000 /* RAM base address */
 #  define EFM32_RAM_MEM_BITS       0x00000018 /* RAM used bits */
 #define EFM32_PER_MEM_BASE         0x40000000 /* PER base address */
diff --git a/arch/arm/src/gd32f4/gd32f4xx_enet.c b/arch/arm/src/gd32f4/gd32f4xx_enet.c
index 8d6b189347..58dd72e4c1 100644
--- a/arch/arm/src/gd32f4/gd32f4xx_enet.c
+++ b/arch/arm/src/gd32f4/gd32f4xx_enet.c
@@ -3295,7 +3295,7 @@ static inline void gd32_enet_gpio_config(struct gd32_enet_mac_s *priv)
    *  CK_PLLP clock (through a configurable prescaler) on PC9 pin."
    */
 
-# if defined(CONFIG_GD32F4_MII_CKOUT0)
+#  if defined(CONFIG_GD32F4_MII_CKOUT0)
   /* Configure CKOUT0 to drive the PHY.  Board logic must provide
    * CKOUT0 clocking info.
    */
@@ -3303,14 +3303,14 @@ static inline void gd32_enet_gpio_config(struct gd32_enet_mac_s *priv)
   gd32_gpio_config(GPIO_CKOUT0);
   gd32_rcu_ckout0_config(BOARD_CFG_CKOUT0_SOURCE, BOARD_CFG_CKOUT0_DIVIDER);
 
-# elif defined(CONFIG_GD32F4_MII_CKOUT1)
+#  elif defined(CONFIG_GD32F4_MII_CKOUT1)
   /* Configure CKOUT1 to drive the PHY.  Board logic must provide
    * CKOUT1 clocking info.
    */
 
   gd32_gpio_config(GPIO_CKOUT1);
   gd32_rcu_ckout1_config(BOARD_CFG_CKOUT1_SOURCE, BOARD_CFG_CKOUT1_DIVIDER);
-# endif
+#  endif
 
   /* MII interface pins (17):
    *
@@ -3351,7 +3351,7 @@ static inline void gd32_enet_gpio_config(struct gd32_enet_mac_s *priv)
    *  CK_PLLP clock (through a configurable prescaler) on PC9 pin."
    */
 
-# if defined(CONFIG_GD32F4_RMII_CKOUT0)
+#  if defined(CONFIG_GD32F4_RMII_CKOUT0)
   /* Configure CKOUT0 to drive the PHY.  Board logic must provide
    * CKOUT0 clocking info.
    */
@@ -3359,7 +3359,7 @@ static inline void gd32_enet_gpio_config(struct gd32_enet_mac_s *priv)
   gd32_gpio_config(GPIO_CKOUT0);
   gd32_rcu_ckout0_config(BOARD_CFG_CKOUT0_SOURCE, BOARD_CFG_CKOUT0_DIV);
 
-# elif defined(CONFIG_GD32F4_RMII_CKOUT1)
+#  elif defined(CONFIG_GD32F4_RMII_CKOUT1)
   /* Configure CKOUT1 to drive the PHY.  Board logic must provide
    * CKOUT1 clocking info.
    */
@@ -3367,7 +3367,7 @@ static inline void gd32_enet_gpio_config(struct gd32_enet_mac_s *priv)
   gd32_gpio_config(GPIO_CKOUT1);
   gd32_rcu_ckout1_config(BOARD_CFG_CKOUT1_SOURCE, BOARD_CFG_CKOUT1_DIVIDER);
 
-# endif
+#  endif
 
   /* RMII interface pins (7):
    *
@@ -3383,7 +3383,7 @@ static inline void gd32_enet_gpio_config(struct gd32_enet_mac_s *priv)
   gd32_gpio_config(GPIO_ENET_RMII_TXD0);
   gd32_gpio_config(GPIO_ENET_RMII_TXD1);
 
-#endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_ENET_PTP
diff --git a/arch/arm/src/gd32f4/gd32f4xx_i2c.c b/arch/arm/src/gd32f4/gd32f4xx_i2c.c
index 4fb004dd86..fbe8709fb7 100644
--- a/arch/arm/src/gd32f4/gd32f4xx_i2c.c
+++ b/arch/arm/src/gd32f4/gd32f4xx_i2c.c
@@ -130,14 +130,14 @@
 
 #  error "Now I2C DMA has not ready"
 
-# if defined(CONFIG_I2C_DMAPRIO)
-#   if (CONFIG_I2C_DMAPRIO & ~DMA_CHXCTL_PRIO_MASK) != 0
-#     error "Illegal value for CONFIG_I2C_DMAPRIO"
-#   endif
-#   define I2C_DMA_PRIO     CONFIG_I2C_DMAPRIO
-# else
-#   define I2C_DMA_PRIO     DMA_PRIO_HIGH_SELECT
-# endif
+#  if defined(CONFIG_I2C_DMAPRIO)
+#    if (CONFIG_I2C_DMAPRIO & ~DMA_CHXCTL_PRIO_MASK) != 0
+#      error "Illegal value for CONFIG_I2C_DMAPRIO"
+#    endif
+#    define I2C_DMA_PRIO     CONFIG_I2C_DMAPRIO
+#  else
+#    define I2C_DMA_PRIO     DMA_PRIO_HIGH_SELECT
+#  endif
 #endif
 
 /* Debug ********************************************************************/
diff --git a/arch/arm/src/gd32f4/gd32f4xx_serial.c b/arch/arm/src/gd32f4/gd32f4xx_serial.c
index 753cc0717e..4e3c301090 100644
--- a/arch/arm/src/gd32f4/gd32f4xx_serial.c
+++ b/arch/arm/src/gd32f4/gd32f4xx_serial.c
@@ -356,65 +356,65 @@ static const struct uart_ops_s g_uart_ops_no_dma =
 #ifdef CONFIG_GD32F4_USART0_SERIALDRIVER
 static char g_usart0rxbuffer[CONFIG_USART0_RXBUFSIZE];
 static char g_usart0txbuffer[CONFIG_USART0_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_USART0_RXDMA
+#  ifdef CONFIG_GD32F4_USART0_RXDMA
 static char g_usart0rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_USART1_SERIALDRIVER
 static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
 static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_USART1_RXDMA
+#  ifdef CONFIG_GD32F4_USART1_RXDMA
 static char g_usart1rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_USART2_SERIALDRIVER
 static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
 static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_USART2_RXDMA
+#  ifdef CONFIG_GD32F4_USART2_RXDMA
 static char g_usart2rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_UART3_SERIALDRIVER
 static char g_uart3rxbuffer[CONFIG_UART3_RXBUFSIZE];
 static char g_uart3txbuffer[CONFIG_UART3_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_UART3_RXDMA
+#  ifdef CONFIG_GD32F4_UART3_RXDMA
 static char g_uart3rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_UART4_SERIALDRIVER
 static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE];
 static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_UART4_RXDMA
+#  ifdef CONFIG_GD32F4_UART4_RXDMA
 static char g_uart4rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_USART5_SERIALDRIVER
 static char g_usart5rxbuffer[CONFIG_USART5_RXBUFSIZE];
 static char g_usart5txbuffer[CONFIG_USART5_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_USART5_RXDMA
+#  ifdef CONFIG_GD32F4_USART5_RXDMA
 static char g_usart5rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_UART6_SERIALDRIVER
 static char g_uart6rxbuffer[CONFIG_UART6_RXBUFSIZE];
 static char g_uart6txbuffer[CONFIG_UART6_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_UART6_RXDMA
+#  ifdef CONFIG_GD32F4_UART6_RXDMA
 static char g_uart6rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_GD32F4_UART7_SERIALDRIVER
 static char g_uart7rxbuffer[CONFIG_UART7_RXBUFSIZE];
 static char g_uart7txbuffer[CONFIG_UART7_TXBUFSIZE];
-# ifdef CONFIG_GD32F4_UART7_RXDMA
+#  ifdef CONFIG_GD32F4_UART7_RXDMA
 static char g_uart7rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 /* This describes the state of the GD32 USART0 ports. */
diff --git a/arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h b/arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h
index 12db01f252..1851c69da2 100644
--- a/arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h
+++ b/arch/arm/src/gd32f4/hardware/gd32f4xx_rcu.h
@@ -236,7 +236,7 @@
 
 #define RCU_CFG0_CKOUT0DIV_SHIFT         (24)                  /* Bits 24-26: The CK_OUT0 divider */
 #define RCU_CFG0_CKOUT0DIV_MASK          (7 << RCU_CFG0_CKOUT0DIV_SHIFT)
-# define RCU_CFG0_CKOUT0DIV(n)           ((n) << RCU_CFG0_CKOUT0DIV_SHIFT)
+#  define RCU_CFG0_CKOUT0DIV(n)          ((n) << RCU_CFG0_CKOUT0DIV_SHIFT)
 #  define RCU_CFG0_CKOUT0_DIV1           RCU_CFG0_CKOUT0DIV(0) /* CK_OUT0 is divided by 1, n=0..3 */
 #  define RCU_CFG0_CKOUT0_DIV2           RCU_CFG0_CKOUT0DIV(4) /* CK_OUT0 is divided by 2 */
 #  define RCU_CFG0_CKOUT0_DIV3           RCU_CFG0_CKOUT0DIV(5) /* CK_OUT0 is divided by 3 */
@@ -245,7 +245,7 @@
 
 #define RCU_CFG0_CKOUT1DIV_SHIFT         (27)                  /* Bits 27-29: The CK_OUT1 divider */
 #define RCU_CFG0_CKOUT1DIV_MASK          (7 << RCU_CFG0_CKOUT1DIV_SHIFT)
-# define RCU_CFG0_CKOUT1DIV(n)           ((n) << RCU_CFG0_CKOUT1DIV_SHIFT)
+#  define RCU_CFG0_CKOUT1DIV(n)          ((n) << RCU_CFG0_CKOUT1DIV_SHIFT)
 #  define RCU_CFG0_CKOUT1_DIV1           RCU_CFG0_CKOUT1DIV(0) /* CK_OUT1 is divided by 1, n=0..3 */
 #  define RCU_CFG0_CKOUT1_DIV2           RCU_CFG0_CKOUT1DIV(4) /* CK_OUT1 is divided by 2 */
 #  define RCU_CFG0_CKOUT1_DIV3           RCU_CFG0_CKOUT1DIV(5) /* CK_OUT1 is divided by 3 */
diff --git a/arch/arm/src/imx1/imx_serial.c b/arch/arm/src/imx1/imx_serial.c
index ea8d1fff0e..69ed4e3fc5 100644
--- a/arch/arm/src/imx1/imx_serial.c
+++ b/arch/arm/src/imx1/imx_serial.c
@@ -251,107 +251,107 @@ static struct uart_dev_s g_uart3port =
 /* Now, which one with be tty0/console and which tty1 and tty2? */
 
 #if defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_IMX1_UART1)
-# define CONSOLE_DEV     g_uart1port /* UART1 is /dev/console */
-# undef  CONFIG_UART2_SERIAL_CONSOLE
-# undef  CONFIG_UART3_SERIAL_CONSOLE
-# define TTYS0_DEV       g_uart1port /* UART1 is /dev/ttyS0 */
-# if defined(CONFIG_IMX1_UART2)
-#   define TTYS1_DEV     g_uart2port /* UART2 is /dev/ttyS1 */
-#   if defined(CONFIG_IMX1_UART3)
-#     define TTYS2_DEV   g_uart3port /* UART3 is /dev/ttyS2 */
-#   else
-#     undef TTYS2_DEV                /* No /dev/ttyS2 */
-#   endif
-# elif defined(CONFIG_IMX1_UART3)
-#   define TTYS1_DEV     g_uart3port /* UART3 is /dev/ttyS1 */
-#   undef  TTYS2_DEV                 /* No /dev/ttyS2 */
-# else
-#   undef  TTYS1_DEV                 /* No /dev/ttyS1 */
-#   undef  TTYS2_DEV                 /* No /dev/ttyS2 */
-# endif
+#  define CONSOLE_DEV   g_uart1port /* UART1 is /dev/console */
+#  undef  CONFIG_UART2_SERIAL_CONSOLE
+#  undef  CONFIG_UART3_SERIAL_CONSOLE
+#  define TTYS0_DEV     g_uart1port /* UART1 is /dev/ttyS0 */
+#  if defined(CONFIG_IMX1_UART2)
+#    define TTYS1_DEV   g_uart2port /* UART2 is /dev/ttyS1 */
+#    if defined(CONFIG_IMX1_UART3)
+#      define TTYS2_DEV g_uart3port /* UART3 is /dev/ttyS2 */
+#    else
+#      undef TTYS2_DEV              /* No /dev/ttyS2 */
+#    endif
+#  elif defined(CONFIG_IMX1_UART3)
+#    define TTYS1_DEV   g_uart3port /* UART3 is /dev/ttyS1 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
+#  else
+#    undef  TTYS1_DEV               /* No /dev/ttyS1 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
+#  endif
 
 #elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_IMX1_UART2)
-# define CONSOLE_DEV     g_uart2port  /* UART2 is /dev/console */
-# undef  CONFIG_UART1_SERIAL_CONSOLE
-# undef  CONFIG_UART3_SERIAL_CONSOLE
-# define TTYS0_DEV       g_uart2port  /* UART2 is /dev/ttyS0 */
-# if defined(CONFIG_IMX1_UART1)
-#   define TTYS1_DEV     g_uart1port  /* UART1 is /dev/ttyS1 */
-#   if defined(CONFIG_IMX1_UART3)
-#     define TTYS2_DEV   g_uart3port  /* UART3 is /dev/ttyS2 */
-#   else
-#     undef TTYS2_DEV                 /* No /dev/ttyS2 */
-#   endif
-# elif defined(CONFIG_IMX1_UART3)
-#   define TTYS1_DEV     g_uart3port  /* UART3 is /dev/ttyS1 */
-# else
-#   undef TTYS1_DEV                   /* No /dev/ttyS1 */
-#   undef TTYS2_DEV                   /* No /dev/ttyS2 */
-# endif
+#  define CONSOLE_DEV   g_uart2port /* UART2 is /dev/console */
+#  undef  CONFIG_UART1_SERIAL_CONSOLE
+#  undef  CONFIG_UART3_SERIAL_CONSOLE
+#  define TTYS0_DEV     g_uart2port /* UART2 is /dev/ttyS0 */
+#  if defined(CONFIG_IMX1_UART1)
+#    define TTYS1_DEV   g_uart1port /* UART1 is /dev/ttyS1 */
+#    if defined(CONFIG_IMX1_UART3)
+#      define TTYS2_DEV g_uart3port /* UART3 is /dev/ttyS2 */
+#    else
+#      undef TTYS2_DEV              /* No /dev/ttyS2 */
+#    endif
+#  elif defined(CONFIG_IMX1_UART3)
+#    define TTYS1_DEV   g_uart3port /* UART3 is /dev/ttyS1 */
+#  else
+#    undef TTYS1_DEV                /* No /dev/ttyS1 */
+#    undef TTYS2_DEV                /* No /dev/ttyS2 */
+#  endif
 
 #elif defined(CONFIG_UART3_SERIAL_CONSOLE) && defined(CONFIG_IMX1_UART3)
-# define CONSOLE_DEV     g_uart3port  /* UART3 is /dev/console */
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_UART2_SERIAL_CONSOLE
-# define TTYS0_DEV       g_uart3port  /* UART3 is /dev/ttyS0 */
-# if defined(CONFIG_IMX1_UART1)
-#   define TTYS1_DEV     g_uart1port  /* UART1 is /dev/ttyS1 */
-#   if defined(CONFIG_IMX1_UART2)
-#     define TTYS2_DEV   g_uart2port  /* UART2 is /dev/ttyS2 */
-#   else
-#     undef TTYS2_DEV                 /* No /dev/ttyS2 */
-#   endif
-# elif defined(CONFIG_IMX1_UART2)
-#   define TTYS1_DEV     g_uart2port  /* UART2 is /dev/ttyS1 */
-#   undef  TTYS2_DEV                  /* No /dev/ttyS2 */
-# else
-#   undef  TTYS1_DEV                  /* No /dev/ttyS1 */
-#   undef  TTYS2_DEV                  /* No /dev/ttyS2 */
-# endif
+#  define CONSOLE_DEV   g_uart3port /* UART3 is /dev/console */
+#  undef CONFIG_UART1_SERIAL_CONSOLE
+#  undef CONFIG_UART2_SERIAL_CONSOLE
+#  define TTYS0_DEV     g_uart3port /* UART3 is /dev/ttyS0 */
+#  if defined(CONFIG_IMX1_UART1)
+#    define TTYS1_DEV   g_uart1port /* UART1 is /dev/ttyS1 */
+#    if defined(CONFIG_IMX1_UART2)
+#      define TTYS2_DEV g_uart2port /* UART2 is /dev/ttyS2 */
+#    else
+#      undef TTYS2_DEV              /* No /dev/ttyS2 */
+#    endif
+#  elif defined(CONFIG_IMX1_UART2)
+#    define TTYS1_DEV   g_uart2port /* UART2 is /dev/ttyS1 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
+#  else
+#    undef  TTYS1_DEV               /* No /dev/ttyS1 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
+#  endif
 
 #else
-# undef CONSOLE_DEV     g_uart1port   /* No /dev/console */
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_UART2_SERIAL_CONSOLE
-# undef CONFIG_UART3_SERIAL_CONSOLE
-
-# if defined(CONFIG_IMX1_UART1)
-#  define TTYS0_DEV       g_uart1port /* UART1 is /dev/ttyS0 */
-#  if defined(CONFIG_IMX1_UART2)
-#    define TTYS1_DEV     g_uart2port /* UART2 is /dev/ttyS1 */
+#  undef CONSOLE_DEV    g_uart1port   /* No /dev/console */
+#  undef CONFIG_UART1_SERIAL_CONSOLE
+#  undef CONFIG_UART2_SERIAL_CONSOLE
+#  undef CONFIG_UART3_SERIAL_CONSOLE
+
+#  if defined(CONFIG_IMX1_UART1)
+#    define TTYS0_DEV   g_uart1port /* UART1 is /dev/ttyS0 */
+#    if defined(CONFIG_IMX1_UART2)
+#      define TTYS1_DEV g_uart2port /* UART2 is /dev/ttyS1 */
 #    if defined(CONFIG_IMX1_UART3)
-#     define TTYS2_DEV   g_uart3port  /* UART3 is /dev/ttyS2 */
+#      define TTYS2_DEV g_uart3port /* UART3 is /dev/ttyS2 */
 #    else
-#     undef TTYS2_DEV                 /* No /dev/ttyS2 */
+#      undef TTYS2_DEV              /* No /dev/ttyS2 */
 #    endif
 #  elif defined(CONFIG_IMX1_UART3)
-#    define TTYS1_DEV     g_uart3port /* UART3 is /dev/ttyS1 */
-#    undef TTYS2_DEV                  /* No /dev/ttyS2 */
+#    define TTYS1_DEV   g_uart3port /* UART3 is /dev/ttyS1 */
+#    undef TTYS2_DEV                /* No /dev/ttyS2 */
 #  else
-#    undef TTYS1_DEV                  /* No /dev/ttyS1 */
-#    undef TTYS2_DEV                  /* No /dev/ttyS2 */
+#    undef TTYS1_DEV                /* No /dev/ttyS1 */
+#    undef TTYS2_DEV                /* No /dev/ttyS2 */
 #  endif
 
-# elif defined(CONFIG_IMX1_UART2)
-#  define TTYS0_DEV       g_uart2port /* UART2 is /dev/ttyS0 */
-#  undef  TTYS2_DEV                   /* No /dev/ttyS2 */
-#  if defined(CONFIG_IMX1_UART3)
-#    define TTYS1_DEV     g_uart2port /* UART2 is /dev/ttyS1 */
+#  elif defined(CONFIG_IMX1_UART2)
+#    define TTYS0_DEV   g_uart2port /* UART2 is /dev/ttyS0 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
+#    if defined(CONFIG_IMX1_UART3)
+#      define TTYS1_DEV g_uart2port /* UART2 is /dev/ttyS1 */
+#    else
+#      undef TTYS1_DEV              /* No /dev/ttyS1 */
+#    endif
+
+#  elif defined(CONFIG_IMX1_UART3)
+#    define TTYS0_DEV   g_uart3port /* UART3 is /dev/ttyS0 */
+#    undef  TTYS1_DEV               /* No /dev/ttyS1 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
+
 #  else
-#    undef TTYS1_DEV                  /* No /dev/ttyS1 */
+#    error "No UARTs enabled"
+#    undef  TTYS0_DEV               /* No /dev/ttyS0 */
+#    undef  TTYS1_DEV               /* No /dev/ttyS1 */
+#    undef  TTYS2_DEV               /* No /dev/ttyS2 */
 #  endif
-
-# elif defined(CONFIG_IMX1_UART3)
-#  define TTYS0_DEV       g_uart3port /* UART3 is /dev/ttyS0 */
-#  undef  TTYS1_DEV                   /* No /dev/ttyS1 */
-#  undef  TTYS2_DEV                   /* No /dev/ttyS2 */
-
-# else
-#  error "No UARTs enabled"
-#  undef  TTYS0_DEV                   /* No /dev/ttyS0 */
-#  undef  TTYS1_DEV                   /* No /dev/ttyS1 */
-#  undef  TTYS2_DEV                   /* No /dev/ttyS2 */
-# endif
 #endif
 
 /****************************************************************************
@@ -1140,12 +1140,12 @@ void arm_serialinit(void)
 
 #ifdef TTYS0_DEV
   uart_register("/dev/ttyS0", &TTYS0_DEV);
-# ifdef TTYS1_DEV
+#  ifdef TTYS1_DEV
   uart_register("/dev/ttyS1", &TTYS1_DEV);
-#  ifdef TTYS2_DEV
+#    ifdef TTYS2_DEV
   uart_register("/dev/ttyS2", &TTYS2_DEV);
+#    endif
 #  endif
-# endif
 #endif
 }
 
diff --git a/arch/arm/src/imx6/hardware/imx_enet.h b/arch/arm/src/imx6/hardware/imx_enet.h
index 1f38f1a666..23fc0aa771 100644
--- a/arch/arm/src/imx6/hardware/imx_enet.h
+++ b/arch/arm/src/imx6/hardware/imx_enet.h
@@ -515,13 +515,13 @@
  */
 
 #ifdef IMX_ENET_HAS_DBSWAP
-# ifndef CONFIG_ENDIAN_BIG
-#  define IMX_USE_DBSWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define IMX_USE_DBSWAP
+#  endif
 #else
-# ifndef CONFIG_ENDIAN_BIG
-#  define IMX_BUFFERS_SWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define IMX_BUFFERS_SWAP
+#  endif
 #endif
 
 #ifndef IMX_BUFFERS_SWAP
diff --git a/arch/arm/src/imx6/imx_serial.c b/arch/arm/src/imx6/imx_serial.c
index 5ddfce8c52..6b7a3ec809 100644
--- a/arch/arm/src/imx6/imx_serial.c
+++ b/arch/arm/src/imx6/imx_serial.c
@@ -1090,18 +1090,18 @@ void arm_serialinit(void)
 
 #ifdef TTYS0_DEV
   uart_register("/dev/ttyS0", &TTYS0_DEV);
-# ifdef TTYS1_DEV
+#  ifdef TTYS1_DEV
   uart_register("/dev/ttyS1", &TTYS1_DEV);
-#  ifdef TTYS2_DEV
+#    ifdef TTYS2_DEV
   uart_register("/dev/ttyS2", &TTYS2_DEV);
-#    ifdef TTYS3_DEV
+#      ifdef TTYS3_DEV
   uart_register("/dev/ttyS3", &TTYS2_DEV);
-#      ifdef TTYS4_DEV
+#        ifdef TTYS4_DEV
   uart_register("/dev/ttyS4", &TTYS2_DEV);
+#        endif
 #      endif
 #    endif
 #  endif
-# endif
 #endif
 }
 
diff --git a/arch/arm/src/imxrt/hardware/imxrt_enet.h b/arch/arm/src/imxrt/hardware/imxrt_enet.h
index ca423ae1b6..486a30f144 100644
--- a/arch/arm/src/imxrt/hardware/imxrt_enet.h
+++ b/arch/arm/src/imxrt/hardware/imxrt_enet.h
@@ -509,13 +509,13 @@
  */
 
 #ifdef IMXRT_ENET_HAS_DBSWAP
-# ifndef CONFIG_ENDIAN_BIG
-#  define IMXRT_USE_DBSWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define IMXRT_USE_DBSWAP
+#   endif
 #else
-# ifndef CONFIG_ENDIAN_BIG
-#  define IMXRT_BUFFERS_SWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define IMXRT_BUFFERS_SWAP
+#  endif
 #endif
 
 #ifndef IMXRT_BUFFERS_SWAP
diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h b/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h
index 4eed2f4e0f..b2630e0236 100644
--- a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h
+++ b/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_ccm.h
@@ -200,7 +200,7 @@
                                                            /* Bits 13-15: Reserved */
 #define CCM_CBCDR_SEMC_PODF_SHIFT                (16)      /* Bits 16-18: Post divider for SEMC clock */
 #define CCM_CBCDR_SEMC_PODF_MASK                 (0x7 << CCM_CBCDR_SEMC_PODF_SHIFT)
-# define CCM_CBCDR_SEMC_PODF(n)                  ((uint32_t)(n) << CCM_CBCDR_SEMC_PODF_SHIFT)
+#  define CCM_CBCDR_SEMC_PODF(n)                 ((uint32_t)(n) << CCM_CBCDR_SEMC_PODF_SHIFT)
                                                            /* Bits 19-24: Reserved */
 #define CCM_CBCDR_PERIPH_CLK_SEL_SHIFT           (25)      /* Bit 25:     Selector for peripheral main clock */
 #define CCM_CBCDR_PERIPH_CLK_SEL_MASK            (1 << CCM_CBCDR_PERIPH_CLK_SEL_SHIFT)
diff --git a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h b/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h
index 094f9513dc..08e1565707 100644
--- a/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h
+++ b/arch/arm/src/imxrt/hardware/rt102x/imxrt102x_iomuxc.h
@@ -1012,7 +1012,7 @@
 #define GPR_GPR2_L2_MEM_FORCE_DEEPSLEEP                         (1 << 14)
 #define GPR_GPR2_MQS_CLK_DIV_SHIFT                              (16)
 #define GPR_GPR2_MQS_CLK_DIV_MASK                               (255 << GPR_GPR2_MQS_CLK_DIV_SHIFT)
-# define GPR_GPR2_MQS_CLK_DIV(n)                                ((n - 1) << GPR_GPR2_MQS_CLK_DIV_SHIFT)
+#  define GPR_GPR2_MQS_CLK_DIV(n)                               ((n - 1) << GPR_GPR2_MQS_CLK_DIV_SHIFT)
 #define GPR_GPR2_MQS_SW_RST_EN                                  (1 << 24)
 #define GPR_GPR2_MQS_EN                                         (1 << 25)
 #define GPR_GPR2_MQS_OVERSAMPLE32                               (0 << 26)
diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h b/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h
index 94ec88384b..183a761678 100644
--- a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h
+++ b/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_ccm.h
@@ -209,7 +209,7 @@
                                                            /* Bits 13-15: Reserved */
 #define CCM_CBCDR_SEMC_PODF_SHIFT                (16)      /* Bits 16-18: Post divider for SEMC clock */
 #define CCM_CBCDR_SEMC_PODF_MASK                 (0x3 << CCM_CBCDR_SEMC_PODF_SHIFT)
-# define CCM_CBCDR_SEMC_PODF(n)                  ((uint32_t)(n) << CCM_CBCDR_SEMC_PODF_SHIFT)
+#  define CCM_CBCDR_SEMC_PODF(n)                 ((uint32_t)(n) << CCM_CBCDR_SEMC_PODF_SHIFT)
                                                            /* Bits 19-24: Reserved */
 #define CCM_CBCDR_PERIPH_CLK_SEL_SHIFT           (25)      /* Bit 25:     Selector for peripheral main clock */
 #define CCM_CBCDR_PERIPH_CLK_SEL_MASK            (1 << CCM_CBCDR_PERIPH_CLK_SEL_SHIFT)
@@ -262,7 +262,7 @@
                                                            /* Bits 20-22: Reserved */
 #define CCM_CBCMR_LCDIF_PODF_SHIFT               (23)      /* Bits 23-25: Post-divider for LCDIF clock */
 #define CCM_CBCMR_LCDIF_PODF_MASK                (0x7 << CCM_CBCMR_LCDIF_PODF_SHIFT)
-# define CCM_CBCMR_LCDIF_PODF(n)                 ((uint32_t)(n) << CCM_CBCMR_LCDIF_PODF_SHIFT)
+#  define CCM_CBCMR_LCDIF_PODF(n)                ((uint32_t)(n) << CCM_CBCMR_LCDIF_PODF_SHIFT)
 #define CCM_CBCMR_LPSPI_PODF_SHIFT               (26)      /* Bits 26-28: Divider for LPSPI */
 #define CCM_CBCMR_LPSPI_PODF_MASK                (0x7 << CCM_CBCMR_LPSPI_PODF_SHIFT)
 #  define CCM_CBCMR_LPSPI_PODF(n)                ((uint32_t)(n) << CCM_CBCMR_LPSPI_PODF_SHIFT)
diff --git a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h b/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h
index 0c32cd4093..46a31b670c 100644
--- a/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h
+++ b/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_iomuxc.h
@@ -1288,7 +1288,7 @@
 #define GPR_GPR2_L2_MEM_FORCE_DEEPSLEEP                         (1 << 14)
 #define GPR_GPR2_MQS_CLK_DIV_SHIFT                              (16)
 #define GPR_GPR2_MQS_CLK_DIV_MASK                               (255 << GPR_GPR2_MQS_CLK_DIV_SHIFT)
-# define GPR_GPR2_MQS_CLK_DIV(n)                                ((n - 1) << GPR_GPR2_MQS_CLK_DIV_SHIFT)
+#  define GPR_GPR2_MQS_CLK_DIV(n)                               ((n - 1) << GPR_GPR2_MQS_CLK_DIV_SHIFT)
 #define GPR_GPR2_MQS_SW_RST_EN                                  (1 << 24)
 #define GPR_GPR2_MQS_EN                                         (1 << 25)
 #define GPR_GPR2_MQS_OVERSAMPLE32                               (0 << 26)
diff --git a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h b/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h
index bd3fe42ce6..402ccd62c0 100644
--- a/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h
+++ b/arch/arm/src/imxrt/hardware/rt106x/imxrt106x_ccm.h
@@ -205,7 +205,7 @@
                                                            /* Bits 13-15: Reserved */
 #define CCM_CBCDR_SEMC_PODF_SHIFT                (16)      /* Bits 16-18: Post divider for SEMC clock */
 #define CCM_CBCDR_SEMC_PODF_MASK                 (0x3 << CCM_CBCDR_SEMC_PODF_SHIFT)
-# define CCM_CBCDR_SEMC_PODF(n)                  ((uint32_t)(n) << CCM_CBCDR_SEMC_PODF_SHIFT)
+#  define CCM_CBCDR_SEMC_PODF(n)                 ((uint32_t)(n) << CCM_CBCDR_SEMC_PODF_SHIFT)
                                                            /* Bits 19-24: Reserved */
 #define CCM_CBCDR_PERIPH_CLK_SEL_SHIFT           (25)      /* Bit 25:     Selector for peripheral main clock */
 #define CCM_CBCDR_PERIPH_CLK_SEL_MASK            (1 << CCM_CBCDR_PERIPH_CLK_SEL_SHIFT)
@@ -268,7 +268,7 @@
                                                            /* Bits 20-22: Reserved */
 #define CCM_CBCMR_LCDIF_PODF_SHIFT               (23)      /* Bits 23-25: Post-divider for LCDIF clock */
 #define CCM_CBCMR_LCDIF_PODF_MASK                (0x7 << CCM_CBCMR_LCDIF_PODF_SHIFT)
-# define CCM_CBCMR_LCDIF_PODF(n)                 ((uint32_t)(n) << CCM_CBCMR_LCDIF_PODF_SHIFT)
+#  define CCM_CBCMR_LCDIF_PODF(n)                ((uint32_t)(n) << CCM_CBCMR_LCDIF_PODF_SHIFT)
 #define CCM_CBCMR_LPSPI_PODF_SHIFT               (26)      /* Bits 26-28: Divider for LPSPI */
 #define CCM_CBCMR_LPSPI_PODF_MASK                (0x7 << CCM_CBCMR_LPSPI_PODF_SHIFT)
 #  define CCM_CBCMR_LPSPI_PODF(n)                ((uint32_t)(n) << CCM_CBCMR_LPSPI_PODF_SHIFT)
diff --git a/arch/arm/src/imxrt/imxrt_allocateheap.c b/arch/arm/src/imxrt/imxrt_allocateheap.c
index 333804c863..414fc487bc 100644
--- a/arch/arm/src/imxrt/imxrt_allocateheap.c
+++ b/arch/arm/src/imxrt/imxrt_allocateheap.c
@@ -121,9 +121,9 @@
  */
 
 #if defined(IMXRT_OCRAM2_BASE)
-# define _IMXRT_OCRAM_BASE IMXRT_OCRAM2_BASE
+#  define _IMXRT_OCRAM_BASE IMXRT_OCRAM2_BASE
 #else
-# define _IMXRT_OCRAM_BASE IMXRT_OCRAM_BASE
+#  define _IMXRT_OCRAM_BASE IMXRT_OCRAM_BASE
 #endif
 
 #define CONFIG_ITCM_USED 0
diff --git a/arch/arm/src/imxrt/imxrt_enc.c b/arch/arm/src/imxrt/imxrt_enc.c
index 5640efaa49..4bca7619ba 100644
--- a/arch/arm/src/imxrt/imxrt_enc.c
+++ b/arch/arm/src/imxrt/imxrt_enc.c
@@ -77,7 +77,7 @@
 #endif
 
 #ifndef CONFIG_ENC1_HNE
-# define CONFIG_ENC1_HNE 0
+#  define CONFIG_ENC1_HNE 0
 #endif
 
 #ifndef CONFIG_ENC1_XIE
@@ -89,7 +89,7 @@
 #endif
 
 #ifndef CONFIG_ENC1_XNE
-# define CONFIG_ENC1_XNE 0
+#  define CONFIG_ENC1_XNE 0
 #endif
 
 #ifndef CONFIG_ENC1_MOD
@@ -97,7 +97,7 @@
 #endif
 
 #ifndef CONFIG_ENC1_MODULUS
-# define CONFIG_ENC1_MODULUS 0
+#  define CONFIG_ENC1_MODULUS 0
 #endif
 
 #if defined(CONFIG_DEBUG_SENSORS)
@@ -122,7 +122,7 @@
 #endif
 
 #ifndef CONFIG_ENC2_HNE
-# define CONFIG_ENC2_HNE 0
+#  define CONFIG_ENC2_HNE 0
 #endif
 
 #ifndef CONFIG_ENC2_XIE
@@ -134,7 +134,7 @@
 #endif
 
 #ifndef CONFIG_ENC2_XNE
-# define CONFIG_ENC2_XNE 0
+#  define CONFIG_ENC2_XNE 0
 #endif
 
 #ifndef CONFIG_ENC2_MOD
@@ -142,7 +142,7 @@
 #endif
 
 #ifndef CONFIG_ENC2_MODULUS
-# define CONFIG_ENC2_MODULUS 0
+#  define CONFIG_ENC2_MODULUS 0
 #endif
 
 #if defined(CONFIG_DEBUG_SENSORS)
@@ -167,7 +167,7 @@
 #endif
 
 #ifndef CONFIG_ENC3_HNE
-# define CONFIG_ENC3_HNE 0
+#  define CONFIG_ENC3_HNE 0
 #endif
 
 #ifndef CONFIG_ENC3_XIE
@@ -179,7 +179,7 @@
 #endif
 
 #ifndef CONFIG_ENC3_XNE
-# define CONFIG_ENC3_XNE 0
+#  define CONFIG_ENC3_XNE 0
 #endif
 
 #ifndef CONFIG_ENC3_MOD
@@ -187,7 +187,7 @@
 #endif
 
 #ifndef CONFIG_ENC3_MODULUS
-# define CONFIG_ENC3_MODULUS 0
+#  define CONFIG_ENC3_MODULUS 0
 #endif
 
 #if defined(CONFIG_DEBUG_SENSORS)
@@ -212,7 +212,7 @@
 #endif
 
 #ifndef CONFIG_ENC4_HNE
-# define CONFIG_ENC4_HNE 0
+#  define CONFIG_ENC4_HNE 0
 #endif
 
 #ifndef CONFIG_ENC4_XIE
@@ -224,7 +224,7 @@
 #endif
 
 #ifndef CONFIG_ENC4_XNE
-# define CONFIG_ENC4_XNE 0
+#  define CONFIG_ENC4_XNE 0
 #endif
 
 #ifndef CONFIG_ENC4_MOD
@@ -232,7 +232,7 @@
 #endif
 
 #ifndef CONFIG_ENC4_MODULUS
-# define CONFIG_ENC4_MODULUS 0
+#  define CONFIG_ENC4_MODULUS 0
 #endif
 
 #if defined(CONFIG_DEBUG_SENSORS)
diff --git a/arch/arm/src/imxrt/imxrt_flexcan.c b/arch/arm/src/imxrt/imxrt_flexcan.c
index 8221647c8b..af035867ce 100644
--- a/arch/arm/src/imxrt/imxrt_flexcan.c
+++ b/arch/arm/src/imxrt/imxrt_flexcan.c
@@ -821,10 +821,10 @@ static void imxrt_receive(struct imxrt_driver_s *priv,
   uint32_t mbi;
   uint32_t mbj;
   struct mb_s *rf;
-# ifdef CONFIG_NET_CAN_CANFD
+#ifdef CONFIG_NET_CAN_CANFD
   uint32_t *frame_data_word;
   uint32_t i;
-# endif
+#endif
   uint32_t f;
 
   while ((f = flags) != 0)
diff --git a/arch/arm/src/imxrt/imxrt_flexpwm.c b/arch/arm/src/imxrt/imxrt_flexpwm.c
index ec841d4cfb..23e635f503 100644
--- a/arch/arm/src/imxrt/imxrt_flexpwm.c
+++ b/arch/arm/src/imxrt/imxrt_flexpwm.c
@@ -52,9 +52,9 @@
 #ifdef CONFIG_IMXRT_FLEXPWM
 
 #ifdef CONFIG_PWM_NCHANNELS
-# define PWM_NCHANNELS CONFIG_PWM_NCHANNELS
+#  define PWM_NCHANNELS CONFIG_PWM_NCHANNELS
 #else
-# define PWM_NCHANNELS 1
+#  define PWM_NCHANNELS 1
 #endif
 
 #define MODULE_OFFSET 0x60
diff --git a/arch/arm/src/imxrt/imxrt_serial.c b/arch/arm/src/imxrt/imxrt_serial.c
index fcf14e51df..805f33e874 100644
--- a/arch/arm/src/imxrt/imxrt_serial.c
+++ b/arch/arm/src/imxrt/imxrt_serial.c
@@ -804,15 +804,15 @@ static struct imxrt_uart_s g_lpuart1priv =
         .size       = CONFIG_LPUART1_TXBUFSIZE,
         .buffer     = g_lpuart1txbuffer,
       },
-    #if defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
+#  if defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART1_RXDMA) && !defined(CONFIG_LPUART1_TXDMA)
+#  elif defined(CONFIG_LPUART1_RXDMA) && !defined(CONFIG_LPUART1_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
+#  elif !defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart1priv,
     },
 
@@ -822,38 +822,38 @@ static struct imxrt_uart_s g_lpuart1priv =
   .parity       = CONFIG_LPUART1_PARITY,
   .bits         = CONFIG_LPUART1_BITS,
   .stopbits2    = CONFIG_LPUART1_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART1_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART1_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART1_TX,
-#endif
+#  endif
 
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART1_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART1_TXDMA
+#  ifdef CONFIG_LPUART1_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART1_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART1_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART1_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART1_RX,
   .rxfifo        = g_lpuart1rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -892,37 +892,37 @@ static struct imxrt_uart_s g_lpuart2priv =
   .parity       = CONFIG_LPUART2_PARITY,
   .bits         = CONFIG_LPUART2_BITS,
   .stopbits2    = CONFIG_LPUART2_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART2_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART2_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART2_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART2_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART2_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART2_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART2_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART2_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART2_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART2_TXDMA
+#  ifdef CONFIG_LPUART2_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART2_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART2_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART2_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART2_RX,
   .rxfifo        = g_lpuart2rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -941,15 +941,15 @@ static struct imxrt_uart_s g_lpuart3priv =
         .size       = CONFIG_LPUART3_TXBUFSIZE,
         .buffer     = g_lpuart3txbuffer,
       },
-    #if defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
+#  if defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART3_RXDMA) && !defined(CONFIG_LPUART3_TXDMA)
+#  elif defined(CONFIG_LPUART3_RXDMA) && !defined(CONFIG_LPUART3_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
+#  elif !defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart3priv,
     },
 
@@ -959,37 +959,37 @@ static struct imxrt_uart_s g_lpuart3priv =
   .parity       = CONFIG_LPUART3_PARITY,
   .bits         = CONFIG_LPUART3_BITS,
   .stopbits2    = CONFIG_LPUART3_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART3_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART3_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART3_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART3_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART3_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART3_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART3_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART3_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART3_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART3_TXDMA
+#  ifdef CONFIG_LPUART3_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART3_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART3_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART3_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART3_RX,
   .rxfifo        = g_lpuart3rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1026,37 +1026,37 @@ static struct imxrt_uart_s g_lpuart4priv =
   .parity       = CONFIG_LPUART4_PARITY,
   .bits         = CONFIG_LPUART4_BITS,
   .stopbits2    = CONFIG_LPUART4_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART4_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART4_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART4_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART4_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART4_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART4_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART4_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART4_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART4_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART4_TXDMA
+#  ifdef CONFIG_LPUART4_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART4_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART4_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART4_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART4_RX,
   .rxfifo        = g_lpuart4rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1075,15 +1075,15 @@ static struct imxrt_uart_s g_lpuart5priv =
           .size       = CONFIG_LPUART5_TXBUFSIZE,
           .buffer     = g_lpuart5txbuffer,
         },
-      #if defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
+#  if defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
           .ops       = &g_lpuart_rxtxdma_ops,
-      #elif defined(CONFIG_LPUART5_RXDMA) && !defined(CONFIG_LPUART5_TXDMA)
+#  elif defined(CONFIG_LPUART5_RXDMA) && !defined(CONFIG_LPUART5_TXDMA)
           .ops       = &g_lpuart_rxdma_ops,
-      #elif !defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
+#  elif !defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
           .ops       = &g_lpuart_txdma_ops,
-      #else
+#  else
           .ops       = &g_lpuart_ops,
-      #endif
+#  endif
         .priv         = &g_lpuart5priv,
     },
 
@@ -1093,37 +1093,37 @@ static struct imxrt_uart_s g_lpuart5priv =
   .parity       = CONFIG_LPUART5_PARITY,
   .bits         = CONFIG_LPUART5_BITS,
   .stopbits2    = CONFIG_LPUART5_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART5_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART5_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART5_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART5_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART5_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART5_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART5_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART5_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART5_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART5_TXDMA
+#  ifdef CONFIG_LPUART5_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART5_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART5_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART5_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART5_RX,
   .rxfifo        = g_lpuart5rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1142,15 +1142,15 @@ static struct imxrt_uart_s g_lpuart6priv =
         .size       = CONFIG_LPUART6_TXBUFSIZE,
         .buffer     = g_lpuart6txbuffer,
       },
-    #if defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
+#  if defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART6_RXDMA) && !defined(CONFIG_LPUART6_TXDMA)
+#  elif defined(CONFIG_LPUART6_RXDMA) && !defined(CONFIG_LPUART6_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
+#  elif !defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart6priv,
     },
 
@@ -1160,37 +1160,37 @@ static struct imxrt_uart_s g_lpuart6priv =
   .parity       = CONFIG_LPUART6_PARITY,
   .bits         = CONFIG_LPUART6_BITS,
   .stopbits2    = CONFIG_LPUART6_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART6_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART6_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART6_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART6_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART6_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART6_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART6_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART6_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART6_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART6_TXDMA
+#  ifdef CONFIG_LPUART6_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART6_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART6_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART6_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART6_RX,
   .rxfifo        = g_lpuart6rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1209,15 +1209,15 @@ static struct imxrt_uart_s g_lpuart7priv =
         .size       = CONFIG_LPUART7_TXBUFSIZE,
         .buffer     = g_lpuart7txbuffer,
       },
-    #if defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
+#  if defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART7_RXDMA) && !defined(CONFIG_LPUART7_TXDMA)
+#  elif defined(CONFIG_LPUART7_RXDMA) && !defined(CONFIG_LPUART7_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
+#  elif !defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart7priv,
     },
 
@@ -1227,37 +1227,37 @@ static struct imxrt_uart_s g_lpuart7priv =
   .parity       = CONFIG_LPUART7_PARITY,
   .bits         = CONFIG_LPUART7_BITS,
   .stopbits2    = CONFIG_LPUART7_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART7_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART7_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART7_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART7_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART7_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART7_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART7_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART7_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART7_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART7_TXDMA
+#  ifdef CONFIG_LPUART7_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART7_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART7_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART7_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART7_RX,
   .rxfifo        = g_lpuart7rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1276,15 +1276,15 @@ static struct imxrt_uart_s g_lpuart8priv =
         .size       = CONFIG_LPUART8_TXBUFSIZE,
         .buffer     = g_lpuart8txbuffer,
       },
-    #if defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
+#  if defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART8_RXDMA) && !defined(CONFIG_LPUART8_TXDMA)
+#  elif defined(CONFIG_LPUART8_RXDMA) && !defined(CONFIG_LPUART8_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
+#  elif !defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart8priv,
     },
 
@@ -1294,37 +1294,37 @@ static struct imxrt_uart_s g_lpuart8priv =
   .parity       = CONFIG_LPUART8_PARITY,
   .bits         = CONFIG_LPUART8_BITS,
   .stopbits2    = CONFIG_LPUART8_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART8_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART8_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = GPIO_LPUART8_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART8_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART8_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)) \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)) \
    || (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART8_IFLOWCONTROL)))
   .rts_gpio     = GPIO_LPUART8_RTS,
-#endif
-#ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_IMXRT_LPUART_SINGLEWIRE
   .tx_gpio      = GPIO_LPUART8_TX,
-#endif
-#if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
+#  endif
+#  if (((defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL))) \
     && defined(CONFIG_LPUART8_INVERTIFLOWCONTROL))
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART8_TXDMA
+#  ifdef CONFIG_LPUART8_TXDMA
   .dma_txreqsrc = IMXRT_DMACHAN_LPUART8_TX,
   .txdmasem     = SEM_INITIALIZER(1),
-#endif
-#ifdef CONFIG_LPUART8_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART8_RXDMA
   .dma_rxreqsrc = IMXRT_DMACHAN_LPUART8_RX,
   .rxfifo        = g_lpuart8rxfifo,
-#endif
+#  endif
 };
 #endif
 
diff --git a/arch/arm/src/imxrt/imxrt_usbdev.c b/arch/arm/src/imxrt/imxrt_usbdev.c
index f59bce2d77..fb4ad971f4 100644
--- a/arch/arm/src/imxrt/imxrt_usbdev.c
+++ b/arch/arm/src/imxrt/imxrt_usbdev.c
@@ -408,8 +408,8 @@ struct imxrt_usbdev_s
 static uint32_t imxrt_getreg(uint32_t addr);
 static void imxrt_putreg(uint32_t val, uint32_t addr);
 #else
-# define imxrt_getreg(addr)     getreg32(addr)
-# define imxrt_putreg(val,addr) putreg32(val,addr)
+#  define imxrt_getreg(addr)     getreg32(addr)
+#  define imxrt_putreg(val,addr) putreg32(val,addr)
 #endif
 
 static inline void imxrt_clrbits(uint32_t mask, uint32_t addr);
diff --git a/arch/arm/src/kinetis/hardware/kinetis_adc.h b/arch/arm/src/kinetis/hardware/kinetis_adc.h
index 484a9c38a6..31940f8bbc 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_adc.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_adc.h
@@ -183,10 +183,10 @@
 
 #define ADC_CFG1_MODE_SHIFT       (2)       /* Bits 2-3: Conversion mode selection */
 #define ADC_CFG1_MODE_MASK        (3 << ADC_CFG1_MODE_SHIFT)
-# define ADC_CFG1_MODE_89BIT      (0 << ADC_CFG1_MODE_SHIFT) /* DIFF=0 8-bit; DIFF=1 9-bit */
-# define ADC_CFG1_MODE_1213BIT    (1 << ADC_CFG1_MODE_SHIFT) /* DIFF=0 12-bit; DIFF=1 13-bit */
-# define ADC_CFG1_MODE_1011BIT    (2 << ADC_CFG1_MODE_SHIFT) /* DIFF=0 10-bit; DIFF=1 11-bit */
-# define ADC_CFG1_MODE_1616BIT    (3 << ADC_CFG1_MODE_SHIFT) /*  DIFF=0 16-bit; DIFF=1 16-bit */
+#  define ADC_CFG1_MODE_89BIT     (0 << ADC_CFG1_MODE_SHIFT) /* DIFF=0 8-bit; DIFF=1 9-bit */
+#  define ADC_CFG1_MODE_1213BIT   (1 << ADC_CFG1_MODE_SHIFT) /* DIFF=0 12-bit; DIFF=1 13-bit */
+#  define ADC_CFG1_MODE_1011BIT   (2 << ADC_CFG1_MODE_SHIFT) /* DIFF=0 10-bit; DIFF=1 11-bit */
+#  define ADC_CFG1_MODE_1616BIT   (3 << ADC_CFG1_MODE_SHIFT) /*  DIFF=0 16-bit; DIFF=1 16-bit */
 
 #define ADC_CFG1_ADLSMP           (1 << 4)  /* Bit 4:  Sample time configuration */
 #define ADC_CFG1_ADIV_SHIFT       (5)       /* Bits 5-6: Clock divide select */
diff --git a/arch/arm/src/kinetis/hardware/kinetis_enet.h b/arch/arm/src/kinetis/hardware/kinetis_enet.h
index fdff9fa392..627dcc53a0 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_enet.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_enet.h
@@ -489,13 +489,13 @@
  */
 
 #ifdef KINETIS_ENET_HAS_DBSWAP
-# ifndef CONFIG_ENDIAN_BIG
-#  define KINETIS_USE_DBSWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define KINETIS_USE_DBSWAP
+#  endif
 #else
-# ifndef CONFIG_ENDIAN_BIG
-#  define KINETIS_BUFFERS_SWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define KINETIS_BUFFERS_SWAP
+#  endif
 #endif
 
 #ifndef KINETIS_BUFFERS_SWAP
diff --git a/arch/arm/src/kinetis/hardware/kinetis_flexbus.h b/arch/arm/src/kinetis/hardware/kinetis_flexbus.h
index f926f2995d..6720b02e84 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_flexbus.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_flexbus.h
@@ -68,8 +68,6 @@
 
 /* Register Addresses *******************************************************/
 
-# define    0x4000c000 /* FlexBus */
-
 #define KINETIS_FB_CS_BASE(n)      (KINETIS_FLEXBUSC_BASE+KINETIS_FB_CS_OFFSET(n))
 #define KINETIS_FB_CSAR(n)         (KINETIS_FB_CS_BASE(n)+KINETIS_FB_CSAR_OFFSET)
 #define KINETIS_FB_CSMR(n)         (KINETIS_FB_CS_BASE(n)+KINETIS_FB_CSMR_OFFSET)
diff --git a/arch/arm/src/kinetis/hardware/kinetis_k40memorymap.h b/arch/arm/src/kinetis/hardware/kinetis_k40memorymap.h
index ea1181bf43..7e3f3282b6 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_k40memorymap.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_k40memorymap.h
@@ -46,10 +46,10 @@
 #define KINETIS_FLASH_BASE     0x00000000  /* -0x0fffffff Program flash and read-
                                             *             only data (Includes exception
                                             *             vectors in first 1024 bytes) */
-# if !defined(KINETIS_FLEXMEM_SIZE)
+#if !defined(KINETIS_FLEXMEM_SIZE)
 #  define KINETIS_FLEXNVM_BASE 0x10000000  /* -0x13ffffff FlexNVM */
 #  define KINETIS_FLEXRAM_BASE 0x14000000  /* -0x17ffffff FlexRAM */
-# endif
+#endif
 #define KINETIS_SRAML_BASE     0x18000000  /* -0x1fffffff SRAM_L: Lower SRAM
                                             *             (ICODE/DCODE) */
 #define KINETIS_SRAMU_BASE     0x20000000  /* -0x200fffff SRAM_U: Upper SRAM bitband
diff --git a/arch/arm/src/kinetis/hardware/kinetis_k64memorymap.h b/arch/arm/src/kinetis/hardware/kinetis_k64memorymap.h
index b6d6ff3a91..78fae57db9 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_k64memorymap.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_k64memorymap.h
@@ -48,135 +48,135 @@
       defined(CONFIG_ARCH_CHIP_MK64FX512VLQ12) || defined(CONFIG_ARCH_CHIP_MK64FX512VMD12) || \
       defined(CONFIG_ARCH_CHIP_MK64FN1M0VLQ12) || defined(CONFIG_ARCH_CHIP_MK64FN1M0VMD12)
 
-# define KINETIS_FLASH_BASE     0x00000000 /* -0x0fffffff Program flash and read-
+#  define KINETIS_FLASH_BASE    0x00000000 /* -0x0fffffff Program flash and read-
                                             *             only data (Includes exception
                                             *             vectors in first 1024 bytes) */
-# if !defined(KINETIS_FLEXMEM_SIZE)
-#  define KINETIS_FLEXNVM_BASE  0x10000000 /* -0x13ffffff FlexNVM */
-#  define KINETIS_FLEXRAM_BASE  0x14000000 /* -0x17ffffff FlexRAM */
-# endif
-# define KINETIS_SRAML_BASE     0x18000000 /* -0x1fffffff SRAM_L: Lower SRAM
+#  if !defined(KINETIS_FLEXMEM_SIZE)
+#    define KINETIS_FLEXNVM_BASE 0x10000000 /* -0x13ffffff FlexNVM */
+#    define KINETIS_FLEXRAM_BASE 0x14000000 /* -0x17ffffff FlexRAM */
+#  endif
+#  define KINETIS_SRAML_BASE    0x18000000 /* -0x1fffffff SRAM_L: Lower SRAM
                                             *             (ICODE/DCODE) */
-# define KINETIS_SRAMU_BASE     0x20000000 /* -0x200fffff SRAM_U: Upper SRAM bitband
+#  define KINETIS_SRAMU_BASE    0x20000000 /* -0x200fffff SRAM_U: Upper SRAM bitband
                                             *             region */
 
                              /* 0x20100000  * -0x21ffffff Reserved */
-# define KINETIS_SALIAS_BASE    0x22000000 /* -0x23ffffff Aliased to SRAM_U bitband */
+#  define KINETIS_SALIAS_BASE   0x22000000 /* -0x23ffffff Aliased to SRAM_U bitband */
 
                              /* 0x24000000  * -0x3fffffff Reserved */
-# define KINETIS_BRIDGE0_BASE   0x40000000 /* -0x4007ffff Bitband region for peripheral
+#  define KINETIS_BRIDGE0_BASE  0x40000000 /* -0x4007ffff Bitband region for peripheral
                                             *             bridge 0 (AIPS-Lite0) */
-# define KINETIS_BRIDGE1_BASE   0x40080000 /* -0x400fffff Bitband region for peripheral
+#  define KINETIS_BRIDGE1_BASE  0x40080000 /* -0x400fffff Bitband region for peripheral
                                             *             bridge 1 (AIPS-Lite1) */
-# define KINETIS_GPIOBB_BASE    0x400ff000 /* -0x400fffff Bitband region for general
+#  define KINETIS_GPIOBB_BASE   0x400ff000 /* -0x400fffff Bitband region for general
                                             *             purpose input/output (GPIO) */
 
                              /* 0x40100000  * -0x41ffffff Reserved */
-# define KINETIS_PALIAS_BASE    0x42000000 /* -0x43ffffff Aliased to peripheral bridge
+#  define KINETIS_PALIAS_BASE   0x42000000 /* -0x43ffffff Aliased to peripheral bridge
                                             *             (AIPS-Lite) and general purpose
                                             *             input/output (GPIO) bitband */
 
                              /* 0x44000000  * -0x5fffffff Reserved */
-# define KINETIS_FLEXBUS_BASE   0x60000000 /* -0x7fffffff FlexBus */
-# define KINETIS_PERIPH_BASE    0xe0000000 /* -0xe00fffff Private peripherals */
+#  define KINETIS_FLEXBUS_BASE  0x60000000 /* -0x7fffffff FlexBus */
+#  define KINETIS_PERIPH_BASE   0xe0000000 /* -0xe00fffff Private peripherals */
 
                              /* 0xe0100000  * -0xffffffff Reserved */
 
 /* Peripheral Bridge 0 Memory Map *******************************************/
 
-# define KINETIS_AIPS0_BASE     0x40000000 /* Peripheral bridge 0 (AIPS-Lite 0) */
-# define KINETIS_XBAR_BASE      0x40004000 /* Crossbar switch */
-# define KINETIS_DMAC_BASE      0x40008000 /* DMA controller */
-# define KINETIS_DMADESC_BASE   0x40009000 /* DMA controller transfer control descriptors */
-# define KINETIS_FLEXBUSC_BASE  0x4000c000 /* FlexBus controller */
-# define KINETIS_MPU_BASE       0x4000d000 /* MPU */
-# define KINETIS_FMC_BASE       0x4001f000 /* Flash memory controller */
-# define KINETIS_FTFE_BASE      0x40020000 /* Flash memory */
-# define KINETIS_DMAMUX0_BASE   0x40021000 /* DMA channel multiplexer 0 */
-# define KINETIS_CAN0_BASE      0x40024000 /* FlexCAN 0 */
-# define KINETIS_SPI0_BASE      0x4002c000 /* DSPI 0 */
-# define KINETIS_SPI1_BASE      0x4002d000 /* DSPI 1 */
-# define KINETIS_I2S0_BASE      0x4002f000 /* I2S 0 */
-# define KINETIS_CRC_BASE       0x40032000 /* CRC */
-# define KINETIS_USBDCD_BASE    0x40035000 /* USB DCD */
-# define KINETIS_PDB0_BASE      0x40036000 /* Programmable delay block */
-# define KINETIS_PIT_BASE       0x40037000 /* Periodic interrupt timers (PIT) */
-# define KINETIS_FTM0_BASE      0x40038000 /* FlexTimer (FTM) 0 */
-# define KINETIS_FTM1_BASE      0x40039000 /* FlexTimer (FTM) 1 */
-# define KINETIS_ADC0_BASE      0x4003b000 /* Analog-to-digital converter (ADC) 0 */
-# define KINETIS_RTC_BASE       0x4003d000 /* Real time clock */
-# define KINETIS_VBATR_BASE     0x4003e000 /* VBAT register file */
-# define KINETIS_LPTMR0_BASE    0x40040000 /* Low power timer 0 */
-# define KINETIS_SYSR_BASE      0x40041000 /* System register file */
-# define KINETIS_DRYICE_BASE    0x40042000 /* DryIce */
-# define KINETIS_DRYICESS_BASE  0x40043000 /* DryIce secure storage */
-# define KINETIS_TSI0_BASE      0x40045000 /* Touch sense interface */
-# define KINETIS_SIMLP_BASE     0x40047000 /* SIM low-power logic */
-# define KINETIS_SIM_BASE       0x40048000 /* System integration module (SIM) */
-# define KINETIS_PORT_BASE(n)   (0x40049000 + ((n) << 12))
-# define KINETIS_PORTA_BASE     0x40049000 /* Port A multiplexing control */
-# define KINETIS_PORTB_BASE     0x4004a000 /* Port B multiplexing control */
-# define KINETIS_PORTC_BASE     0x4004b000 /* Port C multiplexing control */
-# define KINETIS_PORTD_BASE     0x4004c000 /* Port D multiplexing control */
-# define KINETIS_PORTE_BASE     0x4004d000 /* Port E multiplexing control */
-# define KINETIS_WDOG_BASE      0x40052000 /* Software watchdog */
-# define KINETIS_EWM_BASE       0x40061000 /* External watchdog */
-# define KINETIS_CMT_BASE       0x40062000 /* Carrier modulator timer (CMT) */
-# define KINETIS_MCG_BASE       0x40064000 /* Multi-purpose Clock Generator (MCG) */
-# define KINETIS_OSC_BASE       0x40065000 /* System oscillator (XOSC) */
-# define KINETIS_I2C0_BASE      0x40066000 /* I2C 0 */
-# define KINETIS_I2C1_BASE      0x40067000 /* I2C 1 */
-# define KINETIS_I2C2_BASE      0x400E6000 /* I2C 2 */
-# define KINETIS_UART0_BASE     0x4006a000 /* UART0 */
-# define KINETIS_UART1_BASE     0x4006b000 /* UART1 */
-# define KINETIS_UART2_BASE     0x4006c000 /* UART2 */
-# define KINETIS_UART3_BASE     0x4006d000 /* UART3 */
-# define KINETIS_USB0_BASE      0x40072000 /* USB OTG FS/LS */
-# define KINETIS_CMP_BASE       0x40073000 /* Analog comparator (CMP) / 6-bit digital-to-analog converter (DAC) */
-# define KINETIS_VREF_BASE      0x40074000 /* Voltage reference (VREF) */
-# define KINETIS_LLWU_BASE      0x4007c000 /* Low-leakage wakeup unit (LLWU) */
-# define KINETIS_PMC_BASE       0x4007d000 /* Power management controller (PMC) */
-# define KINETIS_SMC_BASE       0x4007e000 /* System Mode controller (SMC) */
+#  define KINETIS_AIPS0_BASE    0x40000000 /* Peripheral bridge 0 (AIPS-Lite 0) */
+#  define KINETIS_XBAR_BASE     0x40004000 /* Crossbar switch */
+#  define KINETIS_DMAC_BASE     0x40008000 /* DMA controller */
+#  define KINETIS_DMADESC_BASE  0x40009000 /* DMA controller transfer control descriptors */
+#  define KINETIS_FLEXBUSC_BASE 0x4000c000 /* FlexBus controller */
+#  define KINETIS_MPU_BASE      0x4000d000 /* MPU */
+#  define KINETIS_FMC_BASE      0x4001f000 /* Flash memory controller */
+#  define KINETIS_FTFE_BASE     0x40020000 /* Flash memory */
+#  define KINETIS_DMAMUX0_BASE  0x40021000 /* DMA channel multiplexer 0 */
+#  define KINETIS_CAN0_BASE     0x40024000 /* FlexCAN 0 */
+#  define KINETIS_SPI0_BASE     0x4002c000 /* DSPI 0 */
+#  define KINETIS_SPI1_BASE     0x4002d000 /* DSPI 1 */
+#  define KINETIS_I2S0_BASE     0x4002f000 /* I2S 0 */
+#  define KINETIS_CRC_BASE      0x40032000 /* CRC */
+#  define KINETIS_USBDCD_BASE   0x40035000 /* USB DCD */
+#  define KINETIS_PDB0_BASE     0x40036000 /* Programmable delay block */
+#  define KINETIS_PIT_BASE      0x40037000 /* Periodic interrupt timers (PIT) */
+#  define KINETIS_FTM0_BASE     0x40038000 /* FlexTimer (FTM) 0 */
+#  define KINETIS_FTM1_BASE     0x40039000 /* FlexTimer (FTM) 1 */
+#  define KINETIS_ADC0_BASE     0x4003b000 /* Analog-to-digital converter (ADC) 0 */
+#  define KINETIS_RTC_BASE      0x4003d000 /* Real time clock */
+#  define KINETIS_VBATR_BASE    0x4003e000 /* VBAT register file */
+#  define KINETIS_LPTMR0_BASE   0x40040000 /* Low power timer 0 */
+#  define KINETIS_SYSR_BASE     0x40041000 /* System register file */
+#  define KINETIS_DRYICE_BASE   0x40042000 /* DryIce */
+#  define KINETIS_DRYICESS_BASE 0x40043000 /* DryIce secure storage */
+#  define KINETIS_TSI0_BASE     0x40045000 /* Touch sense interface */
+#  define KINETIS_SIMLP_BASE    0x40047000 /* SIM low-power logic */
+#  define KINETIS_SIM_BASE      0x40048000 /* System integration module (SIM) */
+#  define KINETIS_PORT_BASE(n)  (0x40049000 + ((n) << 12))
+#  define KINETIS_PORTA_BASE    0x40049000 /* Port A multiplexing control */
+#  define KINETIS_PORTB_BASE    0x4004a000 /* Port B multiplexing control */
+#  define KINETIS_PORTC_BASE    0x4004b000 /* Port C multiplexing control */
+#  define KINETIS_PORTD_BASE    0x4004c000 /* Port D multiplexing control */
+#  define KINETIS_PORTE_BASE    0x4004d000 /* Port E multiplexing control */
+#  define KINETIS_WDOG_BASE     0x40052000 /* Software watchdog */
+#  define KINETIS_EWM_BASE      0x40061000 /* External watchdog */
+#  define KINETIS_CMT_BASE      0x40062000 /* Carrier modulator timer (CMT) */
+#  define KINETIS_MCG_BASE      0x40064000 /* Multi-purpose Clock Generator (MCG) */
+#  define KINETIS_OSC_BASE      0x40065000 /* System oscillator (XOSC) */
+#  define KINETIS_I2C0_BASE     0x40066000 /* I2C 0 */
+#  define KINETIS_I2C1_BASE     0x40067000 /* I2C 1 */
+#  define KINETIS_I2C2_BASE     0x400E6000 /* I2C 2 */
+#  define KINETIS_UART0_BASE    0x4006a000 /* UART0 */
+#  define KINETIS_UART1_BASE    0x4006b000 /* UART1 */
+#  define KINETIS_UART2_BASE    0x4006c000 /* UART2 */
+#  define KINETIS_UART3_BASE    0x4006d000 /* UART3 */
+#  define KINETIS_USB0_BASE     0x40072000 /* USB OTG FS/LS */
+#  define KINETIS_CMP_BASE      0x40073000 /* Analog comparator (CMP) / 6-bit digital-to-analog converter (DAC) */
+#  define KINETIS_VREF_BASE     0x40074000 /* Voltage reference (VREF) */
+#  define KINETIS_LLWU_BASE     0x4007c000 /* Low-leakage wakeup unit (LLWU) */
+#  define KINETIS_PMC_BASE      0x4007d000 /* Power management controller (PMC) */
+#  define KINETIS_SMC_BASE      0x4007e000 /* System Mode controller (SMC) */
 
 /* Peripheral Bridge 1 Memory Map *******************************************/
 
-# define KINETIS_AIPS1_BASE     0x40080000 /* Peripheral bridge 1 (AIPS-Lite 1) */
-# define KINETIS_RNGB_BASE      0x400a0000 /* Random number generator (RNGB) */
-# define KINETIS_CAN1_BASE      0x400a4000 /* FlexCAN 1 */
-# define KINETIS_SPI2_BASE      0x400ac000 /* DSPI 2 */
-# define KINETIS_SDHC_BASE      0x400b1000 /* SDHC */
-# define KINETIS_FTM2_BASE      0x4003a000 /* FlexTimer 2 */
-# define KINETIS_FTM3_BASE      0x400b9000 /* FlexTimer 3 */
-# define KINETIS_ADC1_BASE      0x400bb000 /* Analog-to-digital converter (ADC) 1 */
-# define KINETIS_EMAC_BASE      0x400c0000 /* Ethernet MAC and IEEE 1588 timers */
-# define KINETIS_DAC0_BASE      0x400cc000 /* 12-bit digital-to-analog converter (DAC) 0 */
-# define KINETIS_DAC1_BASE      0x400cd000 /* 12-bit digital-to-analog converter (DAC) 1 */
-# define KINETIS_UART4_BASE     0x400ea000 /* UART4 */
-# define KINETIS_UART5_BASE     0x400eb000 /* UART5 */
-# define KINETIS_XBARSS_BASE    0x400ff000 /* Not an AIPS-Lite slot. The 32-bit general
+#  define KINETIS_AIPS1_BASE    0x40080000 /* Peripheral bridge 1 (AIPS-Lite 1) */
+#  define KINETIS_RNGB_BASE     0x400a0000 /* Random number generator (RNGB) */
+#  define KINETIS_CAN1_BASE     0x400a4000 /* FlexCAN 1 */
+#  define KINETIS_SPI2_BASE     0x400ac000 /* DSPI 2 */
+#  define KINETIS_SDHC_BASE     0x400b1000 /* SDHC */
+#  define KINETIS_FTM2_BASE     0x4003a000 /* FlexTimer 2 */
+#  define KINETIS_FTM3_BASE     0x400b9000 /* FlexTimer 3 */
+#  define KINETIS_ADC1_BASE     0x400bb000 /* Analog-to-digital converter (ADC) 1 */
+#  define KINETIS_EMAC_BASE     0x400c0000 /* Ethernet MAC and IEEE 1588 timers */
+#  define KINETIS_DAC0_BASE     0x400cc000 /* 12-bit digital-to-analog converter (DAC) 0 */
+#  define KINETIS_DAC1_BASE     0x400cd000 /* 12-bit digital-to-analog converter (DAC) 1 */
+#  define KINETIS_UART4_BASE    0x400ea000 /* UART4 */
+#  define KINETIS_UART5_BASE    0x400eb000 /* UART5 */
+#  define KINETIS_XBARSS_BASE   0x400ff000 /* Not an AIPS-Lite slot. The 32-bit general
                                             * purpose input/output module that shares the
                                             * crossbar switch slave port with the AIPS-Lite
                                             * is accessed at this address. */
-# define KINETIS_GPIO_BASE(n)   (0x400ff000 + ((n) << 6))
-# define KINETIS_GPIOA_BASE     0x400ff000 /* GPIO PORTA registers */
-# define KINETIS_GPIOB_BASE     0x400ff040 /* GPIO PORTB registers */
-# define KINETIS_GPIOC_BASE     0x400ff080 /* GPIO PORTC registers */
-# define KINETIS_GPIOD_BASE     0x400ff0c0 /* GPIO PORTD registers */
-# define KINETIS_GPIOE_BASE     0x400ff100 /* GPIO PORTE registers */
+#  define KINETIS_GPIO_BASE(n)  (0x400ff000 + ((n) << 6))
+#  define KINETIS_GPIOA_BASE    0x400ff000 /* GPIO PORTA registers */
+#  define KINETIS_GPIOB_BASE    0x400ff040 /* GPIO PORTB registers */
+#  define KINETIS_GPIOC_BASE    0x400ff080 /* GPIO PORTC registers */
+#  define KINETIS_GPIOD_BASE    0x400ff0c0 /* GPIO PORTD registers */
+#  define KINETIS_GPIOE_BASE    0x400ff100 /* GPIO PORTE registers */
 
 /* Private Peripheral Bus (PPB) Memory Map **********************************/
 
-# define KINETIS_ITM_BASE       0xe0000000 /* Instrumentation Trace Macrocell (ITM) */
-# define KINETIS_DWT_BASE       0xe0001000 /* Data Watchpoint and Trace (DWT) */
-# define KINETIS_FPB_BASE       0xe0002000 /* Flash Patch and Breakpoint (FPB) */
-# define KINETIS_SCS_BASE       0xe000e000 /* System Control Space (SCS) (for NVIC) */
-# define KINETIS_TPIU_BASE      0xe0040000 /* Trace Port Interface Unit (TPIU) */
-# define KINETIS_ETM_BASE       0xe0041000 /* Embedded Trace Macrocell (ETM) */
-# define KINETIS_ETB_BASE       0xe0042000 /* Embedded Trace Buffer (ETB) */
-# define KINETIS_TFUN_BASE      0xe0043000 /* Embedded Trace Funnel */
-# define KINETIS_MCM_BASE       0xe0080000 /* Miscellaneous Control Module (including ETB Almost Full) */
-# define KINETIS_MMCAU_BASE     0xe0081000 /* Memory Mapped Cryptographic Acceleration Unit (MMCAU) */
-# define KINETIS_ROMTAB_BASE    0xe00ff000 /* ROM Table - allows auto-detection of debug components */
+#  define KINETIS_ITM_BASE      0xe0000000 /* Instrumentation Trace Macrocell (ITM) */
+#  define KINETIS_DWT_BASE      0xe0001000 /* Data Watchpoint and Trace (DWT) */
+#  define KINETIS_FPB_BASE      0xe0002000 /* Flash Patch and Breakpoint (FPB) */
+#  define KINETIS_SCS_BASE      0xe000e000 /* System Control Space (SCS) (for NVIC) */
+#  define KINETIS_TPIU_BASE     0xe0040000 /* Trace Port Interface Unit (TPIU) */
+#  define KINETIS_ETM_BASE      0xe0041000 /* Embedded Trace Macrocell (ETM) */
+#  define KINETIS_ETB_BASE      0xe0042000 /* Embedded Trace Buffer (ETB) */
+#  define KINETIS_TFUN_BASE     0xe0043000 /* Embedded Trace Funnel */
+#  define KINETIS_MCM_BASE      0xe0080000 /* Miscellaneous Control Module (including ETB Almost Full) */
+#  define KINETIS_MMCAU_BASE    0xe0081000 /* Memory Mapped Cryptographic Acceleration Unit (MMCAU) */
+#  define KINETIS_ROMTAB_BASE   0xe00ff000 /* ROM Table - allows auto-detection of debug components */
 
 #else
   /* The memory map for other parts is defined in other documents and may or
diff --git a/arch/arm/src/kinetis/hardware/kinetis_k66memorymap.h b/arch/arm/src/kinetis/hardware/kinetis_k66memorymap.h
index a67d6b0aaa..24d064cc7b 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_k66memorymap.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_k66memorymap.h
@@ -46,164 +46,164 @@
 #if defined(CONFIG_ARCH_CHIP_MK66FN2M0VMD18) || defined(CONFIG_ARCH_CHIP_MK66FX1M0VMD18) || \
       defined(CONFIG_ARCH_CHIP_MK66FN2M0VLQ18) || defined(CONFIG_ARCH_CHIP_MK66FX1M0VLQ18)
 
-# define KINETIS_FLASH_BASE         0x00000000 /* -0x07ffffff Program flash and read-
+#  define KINETIS_FLASH_BASE        0x00000000 /* -0x07ffffff Program flash and read-
                                                 *             only data (Includes exception
                                                 *             vectors in first 1024 bytes) */
 
-# define KINETIS_SDRAMALIAS_BASE    0x08000000 /* -0x0fffffff SDRAM (Aliased area). mapped
+#  define KINETIS_SDRAMALIAS_BASE   0x08000000 /* -0x0fffffff SDRAM (Aliased area). mapped
                                                 *             to same space of 0x88000000 -
                                                 *             0x8FFF_FFFF. See bit31 of
                                                 *             SDRAMC */
-# if defined(KINETIS_FLEXMEM_SIZE)
-#  define KINETIS_FLEXNVM_BASE      0x10000000 /* -0x13ffffff FlexNVM */
-#  define KINETIS_FLEXRAM_BASE      0x14000000 /* -0x17ffffff FlexRAM */
-# else
-#  define KINETIS_PRGACCLRAM_BASE   0x14000000 /* -0x17ffffff For devices with program flash
+#  if defined(KINETIS_FLEXMEM_SIZE)
+#    define KINETIS_FLEXNVM_BASE    0x10000000 /* -0x13ffffff FlexNVM */
+#    define KINETIS_FLEXRAM_BASE    0x14000000 /* -0x17ffffff FlexRAM */
+#  else
+#    define KINETIS_PRGACCLRAM_BASE 0x14000000 /* -0x17ffffff For devices with program flash
                                                 *             only: Programming acceleration
                                                 *             RAM */
-# endif
-# define KINETIS_FBALIAS_BASE      0x18000000  /* -0x1bffffff FlexBus (Aliased Area). mapped
+#  endif
+#  define KINETIS_FBALIAS_BASE      0x18000000 /* -0x1bffffff FlexBus (Aliased Area). mapped
                                                 *             to same space of 0x9800_0000 -
                                                 *             0x9BFF_FFFF. See bit31 of
                                                 *             FlexBus chip select */
-# define KINETIS_SRAML_BASE         0x1c000000 /* -0x1fffffff SRAM_L: Lower SRAM
+#  define KINETIS_SRAML_BASE        0x1c000000 /* -0x1fffffff SRAM_L: Lower SRAM
                                                 *             (ICODE/DCODE) */
-# define KINETIS_SRAMU_BASE         0x20000000 /* -0x200fffff SRAM_U: Upper SRAM bitband
+#  define KINETIS_SRAMU_BASE        0x20000000 /* -0x200fffff SRAM_U: Upper SRAM bitband
                                                 *             region */
 
                              /*     0x20100000  * -0x21ffffff Reserved */
-# define KINETIS_SALIAS_BASE        0x22000000 /* -0x23ffffff Aliased to SRAM_U bitband */
+#  define KINETIS_SALIAS_BASE       0x22000000 /* -0x23ffffff Aliased to SRAM_U bitband */
 
                              /*     0x24000000  * -0x2fffffff Reserved */
-# define KINETIS_FDATALIAS_BASE     0x30000000 /* -0x33ffffff Flash Data Alias */
-# define KINETIS_FLEXNVMCO_BASE     0x34000000 /* -0x3fffffff FlexNVM Cortex-M4 core only */
-# define KINETIS_BRIDGE0_BASE       0x40000000 /* -0x4007ffff Bitband region for peripheral
+#  define KINETIS_FDATALIAS_BASE    0x30000000 /* -0x33ffffff Flash Data Alias */
+#  define KINETIS_FLEXNVMCO_BASE    0x34000000 /* -0x3fffffff FlexNVM Cortex-M4 core only */
+#  define KINETIS_BRIDGE0_BASE      0x40000000 /* -0x4007ffff Bitband region for peripheral
                                                 *             bridge 0 (AIPS-Lite0) */
-# define KINETIS_BRIDGE1_BASE       0x40080000 /* -0x400fffff Bitband region for peripheral
+#  define KINETIS_BRIDGE1_BASE      0x40080000 /* -0x400fffff Bitband region for peripheral
                                                 *             bridge 1 (AIPS-Lite1) */
-# define KINETIS_GPIOBB_BASE        0x400ff000 /* -0x400fffff Bitband region for general
+#  define KINETIS_GPIOBB_BASE       0x400ff000 /* -0x400fffff Bitband region for general
                                                 *             purpose input/output (GPIO) */
 
                              /*     0x40100000  * -0x41ffffff Reserved */
-# define KINETIS_PALIAS_BASE        0x42000000 /* -0x43ffffff Aliased to peripheral bridge
+#  define KINETIS_PALIAS_BASE       0x42000000 /* -0x43ffffff Aliased to peripheral bridge
                                                 *             (AIPS-Lite) and general purpose
                                                 *             input/output (GPIO) bitband */
 
                              /*     0x44000000  * -0x5fffffff Reserved */
-# define KINETIS_FLEXBUS_BASE       0x60000000 /* -0x7fffffff FlexBus (External Memory - Write-back) */
-# define KINETIS_SDRAMWB_BASE       0x70000000 /* -0x7fffffff SDRAM (External RAM - Write-back) */
-# define KINETIS_SDRAMWT_BASE       0x80000000 /* -0x8fffffff SDRAM (External RAM - Write-through) */
-# define KINETIS_FLEXBUSWT_BASE     0x90000000 /* -0x9fffffff FlexBus (External RAM - Write-through) */
-# define KINETIS_FLEXBUSEP_BASE     0xa0000000 /* -0xdfffffff FlexBus External Peripheral - Not executable)*/
-# define KINETIS_PERIPH_BASE        0xe0000000 /* -0xe00fffff Private peripherals */
+#  define KINETIS_FLEXBUS_BASE      0x60000000 /* -0x7fffffff FlexBus (External Memory - Write-back) */
+#  define KINETIS_SDRAMWB_BASE      0x70000000 /* -0x7fffffff SDRAM (External RAM - Write-back) */
+#  define KINETIS_SDRAMWT_BASE      0x80000000 /* -0x8fffffff SDRAM (External RAM - Write-through) */
+#  define KINETIS_FLEXBUSWT_BASE    0x90000000 /* -0x9fffffff FlexBus (External RAM - Write-through) */
+#  define KINETIS_FLEXBUSEP_BASE    0xa0000000 /* -0xdfffffff FlexBus External Peripheral - Not executable)*/
+#  define KINETIS_PERIPH_BASE       0xe0000000 /* -0xe00fffff Private peripherals */
 
                              /*     0xe0100000  * -0xffffffff Reserved */
 
 /* Peripheral Bridge 0 Memory Map *******************************************/
 
-# define KINETIS_AIPS0_BASE         0x40000000 /* Peripheral bridge 0 (AIPS-Lite 0) */
-# define KINETIS_XBAR_BASE          0x40004000 /* Crossbar switch */
-# define KINETIS_DMAC_BASE          0x40008000 /* DMA controller */
-# define KINETIS_DMADESC_BASE       0x40009000 /* DMA controller transfer control descriptors */
-# define KINETIS_FLEXBUSC_BASE      0x4000c000 /* FlexBus controller */
-# define KINETIS_MPU_BASE           0x4000d000 /* MPU */
-# define KINETIS_SDRAMC_BASE        0x4000f000 /* SDRAMC */
-# define KINETIS_FMC_BASE           0x4001f000 /* Flash memory controller */
-# define KINETIS_FTFE_BASE          0x40020000 /* Flash memory */
-# define KINETIS_DMAMUX0_BASE       0x40021000 /* DMA channel multiplexer 0 */
-# define KINETIS_CAN0_BASE          0x40024000 /* FlexCAN 0 */
-# define KINETIS_RNGA_BASE          0x40029000 /* Random Number Generator (RNGA) */
-# define KINETIS_SPI0_BASE          0x4002c000 /* DSPI 0 */
-# define KINETIS_SPI1_BASE          0x4002d000 /* DSPI 1 */
-# define KINETIS_I2S0_BASE          0x4002f000 /* I2S 0 */
-# define KINETIS_CRC_BASE           0x40032000 /* CRC */
-# define KINETIS_USBDCD_BASE        0x40035000 /* USB DCD */
-# define KINETIS_PDB0_BASE          0x40036000 /* Programmable delay block */
-# define KINETIS_PIT_BASE           0x40037000 /* Periodic interrupt timers (PIT) */
-# define KINETIS_FTM0_BASE          0x40038000 /* FlexTimer (FTM) 0 */
-# define KINETIS_FTM1_BASE          0x40039000 /* FlexTimer (FTM) 1 */
-# define KINETIS_FTM2_BASE          0x4003a000 /* FlexTimer (FTM) 2 */
-# define KINETIS_ADC0_BASE          0x4003b000 /* Analog-to-digital converter (ADC) 0 */
-# define KINETIS_RTC_BASE           0x4003d000 /* Real time clock */
-# define KINETIS_VBATR_BASE         0x4003e000 /* VBAT register file */
-# define KINETIS_DAC0_BASE          0x4003f000 /* DAC0 */
-# define KINETIS_LPTMR0_BASE        0x40040000 /* Low power timer 0 */
-# define KINETIS_SYSR_BASE          0x40041000 /* System register file */
-# define KINETIS_TSI0_BASE          0x40045000 /* Touch sense interface */
-# define KINETIS_SIMLP_BASE         0x40047000 /* SIM low-power logic */
-# define KINETIS_SIM_BASE           0x40048000 /* System integration module (SIM) */
-# define KINETIS_PORT_BASE(n)       (0x40049000 + ((n) << 12))
-# define KINETIS_PORTA_BASE         0x40049000 /* Port A multiplexing control */
-# define KINETIS_PORTB_BASE         0x4004a000 /* Port B multiplexing control */
-# define KINETIS_PORTC_BASE         0x4004b000 /* Port C multiplexing control */
-# define KINETIS_PORTD_BASE         0x4004c000 /* Port D multiplexing control */
-# define KINETIS_PORTE_BASE         0x4004d000 /* Port E multiplexing control */
-# define KINETIS_WDOG_BASE          0x40052000 /* Software watchdog */
-# define KINETIS_EWM_BASE           0x40061000 /* External watchdog */
-# define KINETIS_CMT_BASE           0x40062000 /* Carrier modulator timer (CMT) */
-# define KINETIS_MCG_BASE           0x40064000 /* Multi-purpose Clock Generator (MCG) */
-# define KINETIS_OSC_BASE           0x40065000 /* System oscillator (XOSC) */
-# define KINETIS_I2C0_BASE          0x40066000 /* I2C 0 */
-# define KINETIS_I2C1_BASE          0x40067000 /* I2C 1 */
-# define KINETIS_UART0_BASE         0x4006a000 /* UART0 */
-# define KINETIS_UART1_BASE         0x4006b000 /* UART1 */
-# define KINETIS_UART2_BASE         0x4006c000 /* UART2 */
-# define KINETIS_UART3_BASE         0x4006d000 /* UART3 */
-# define KINETIS_USB0_BASE          0x40072000 /* USB OTG FS/LS */
-# define KINETIS_CMP_BASE           0x40073000 /* Analog comparator (CMP) / 6-bit digital-to-analog converter (DAC) */
-# define KINETIS_VREF_BASE          0x40074000 /* Voltage reference (VREF) */
-# define KINETIS_LLWU_BASE          0x4007c000 /* Low-leakage wakeup unit (LLWU) */
-# define KINETIS_PMC_BASE           0x4007d000 /* Power management controller (PMC) */
-# define KINETIS_SMC_BASE           0x4007e000 /* System Mode controller (SMC) */
-# define KINETIS_RCM_BASE           0x4007f000 /* Reset Control Module (RCM) */
+#  define KINETIS_AIPS0_BASE        0x40000000 /* Peripheral bridge 0 (AIPS-Lite 0) */
+#  define KINETIS_XBAR_BASE         0x40004000 /* Crossbar switch */
+#  define KINETIS_DMAC_BASE         0x40008000 /* DMA controller */
+#  define KINETIS_DMADESC_BASE      0x40009000 /* DMA controller transfer control descriptors */
+#  define KINETIS_FLEXBUSC_BASE     0x4000c000 /* FlexBus controller */
+#  define KINETIS_MPU_BASE          0x4000d000 /* MPU */
+#  define KINETIS_SDRAMC_BASE       0x4000f000 /* SDRAMC */
+#  define KINETIS_FMC_BASE          0x4001f000 /* Flash memory controller */
+#  define KINETIS_FTFE_BASE         0x40020000 /* Flash memory */
+#  define KINETIS_DMAMUX0_BASE      0x40021000 /* DMA channel multiplexer 0 */
+#  define KINETIS_CAN0_BASE         0x40024000 /* FlexCAN 0 */
+#  define KINETIS_RNGA_BASE         0x40029000 /* Random Number Generator (RNGA) */
+#  define KINETIS_SPI0_BASE         0x4002c000 /* DSPI 0 */
+#  define KINETIS_SPI1_BASE         0x4002d000 /* DSPI 1 */
+#  define KINETIS_I2S0_BASE         0x4002f000 /* I2S 0 */
+#  define KINETIS_CRC_BASE          0x40032000 /* CRC */
+#  define KINETIS_USBDCD_BASE       0x40035000 /* USB DCD */
+#  define KINETIS_PDB0_BASE         0x40036000 /* Programmable delay block */
+#  define KINETIS_PIT_BASE          0x40037000 /* Periodic interrupt timers (PIT) */
+#  define KINETIS_FTM0_BASE         0x40038000 /* FlexTimer (FTM) 0 */
+#  define KINETIS_FTM1_BASE         0x40039000 /* FlexTimer (FTM) 1 */
+#  define KINETIS_FTM2_BASE         0x4003a000 /* FlexTimer (FTM) 2 */
+#  define KINETIS_ADC0_BASE         0x4003b000 /* Analog-to-digital converter (ADC) 0 */
+#  define KINETIS_RTC_BASE          0x4003d000 /* Real time clock */
+#  define KINETIS_VBATR_BASE        0x4003e000 /* VBAT register file */
+#  define KINETIS_DAC0_BASE         0x4003f000 /* DAC0 */
+#  define KINETIS_LPTMR0_BASE       0x40040000 /* Low power timer 0 */
+#  define KINETIS_SYSR_BASE         0x40041000 /* System register file */
+#  define KINETIS_TSI0_BASE         0x40045000 /* Touch sense interface */
+#  define KINETIS_SIMLP_BASE        0x40047000 /* SIM low-power logic */
+#  define KINETIS_SIM_BASE          0x40048000 /* System integration module (SIM) */
+#  define KINETIS_PORT_BASE(n)      (0x40049000 + ((n) << 12))
+#  define KINETIS_PORTA_BASE        0x40049000 /* Port A multiplexing control */
+#  define KINETIS_PORTB_BASE        0x4004a000 /* Port B multiplexing control */
+#  define KINETIS_PORTC_BASE        0x4004b000 /* Port C multiplexing control */
+#  define KINETIS_PORTD_BASE        0x4004c000 /* Port D multiplexing control */
+#  define KINETIS_PORTE_BASE        0x4004d000 /* Port E multiplexing control */
+#  define KINETIS_WDOG_BASE         0x40052000 /* Software watchdog */
+#  define KINETIS_EWM_BASE          0x40061000 /* External watchdog */
+#  define KINETIS_CMT_BASE          0x40062000 /* Carrier modulator timer (CMT) */
+#  define KINETIS_MCG_BASE          0x40064000 /* Multi-purpose Clock Generator (MCG) */
+#  define KINETIS_OSC_BASE          0x40065000 /* System oscillator (XOSC) */
+#  define KINETIS_I2C0_BASE         0x40066000 /* I2C 0 */
+#  define KINETIS_I2C1_BASE         0x40067000 /* I2C 1 */
+#  define KINETIS_UART0_BASE        0x4006a000 /* UART0 */
+#  define KINETIS_UART1_BASE        0x4006b000 /* UART1 */
+#  define KINETIS_UART2_BASE        0x4006c000 /* UART2 */
+#  define KINETIS_UART3_BASE        0x4006d000 /* UART3 */
+#  define KINETIS_USB0_BASE         0x40072000 /* USB OTG FS/LS */
+#  define KINETIS_CMP_BASE          0x40073000 /* Analog comparator (CMP) / 6-bit digital-to-analog converter (DAC) */
+#  define KINETIS_VREF_BASE         0x40074000 /* Voltage reference (VREF) */
+#  define KINETIS_LLWU_BASE         0x4007c000 /* Low-leakage wakeup unit (LLWU) */
+#  define KINETIS_PMC_BASE          0x4007d000 /* Power management controller (PMC) */
+#  define KINETIS_SMC_BASE          0x4007e000 /* System Mode controller (SMC) */
+#  define KINETIS_RCM_BASE          0x4007f000 /* Reset Control Module (RCM) */
 
 /* Peripheral Bridge 1 Memory Map *******************************************/
 
-# define KINETIS_AIPS1_BASE         0x40080000 /* Peripheral bridge 1 (AIPS-Lite 1) */
-# define KINETIS_RNGA_ALT_BASE      0x400a0000 /* Alternate address Random number generator (RNGA) */
-# define KINETIS_USBHS_BASE         0x400a1000 /* USB OTG HS/FS/LS */
-# define KINETIS_USBHSPHY_BASE      0x400a2000 /* USBHS PHY */
-# define KINETIS_USBHSDCD_BASE      0x400a3000 /* USBHS DCD */
-# define KINETIS_CAN1_BASE          0x400a4000 /* FlexCAN 1 */
-# define KINETIS_SPI2_BASE          0x400ac000 /* DSPI 2 */
-# define KINETIS_SDHC_BASE          0x400b1000 /* eSDHC */
-# define KINETIS_FTM2_ALT_BASE      0x400b8000 /* Alternate address FlexTimer 2 */
-# define KINETIS_FTM3_BASE          0x400b9000 /* FlexTimer 3 */
-# define KINETIS_ADC1_BASE          0x400bb000 /* Analog-to-digital converter (ADC) 1 */
-# define KINETIS_EMAC_BASE          0x400c0000 /* Ethernet MAC and IEEE 1588 timers */
-# define KINETIS_LPUART0_BASE       0x400c4000 /* LPUART0 */
-# define KINETIS_TPM1_BASE          0x400c9000 /* TPM1 */
-# define KINETIS_TPM2_BASE          0x400ca000 /* TPM2 */
-# define KINETIS_DAC0_ALT_BASE      0x400cc000 /* Alternate address 12-bit digital-to-analog converter (DAC) 0 */
-# define KINETIS_DAC1_BASE          0x400cd000 /* 12-bit digital-to-analog converter (DAC) 1 */
-# define KINETIS_I2C2_BASE          0x400e6000 /* I2C 2 */
-# define KINETIS_I2C3_BASE          0x400e7000 /* I2C 3 */
-# define KINETIS_UART4_BASE         0x400ea000 /* UART4 */
-# define KINETIS_XBARSS_BASE        0x400ff000 /* Not an AIPS-Lite slot. The 32-bit general
+#  define KINETIS_AIPS1_BASE        0x40080000 /* Peripheral bridge 1 (AIPS-Lite 1) */
+#  define KINETIS_RNGA_ALT_BASE     0x400a0000 /* Alternate address Random number generator (RNGA) */
+#  define KINETIS_USBHS_BASE        0x400a1000 /* USB OTG HS/FS/LS */
+#  define KINETIS_USBHSPHY_BASE     0x400a2000 /* USBHS PHY */
+#  define KINETIS_USBHSDCD_BASE     0x400a3000 /* USBHS DCD */
+#  define KINETIS_CAN1_BASE         0x400a4000 /* FlexCAN 1 */
+#  define KINETIS_SPI2_BASE         0x400ac000 /* DSPI 2 */
+#  define KINETIS_SDHC_BASE         0x400b1000 /* eSDHC */
+#  define KINETIS_FTM2_ALT_BASE     0x400b8000 /* Alternate address FlexTimer 2 */
+#  define KINETIS_FTM3_BASE         0x400b9000 /* FlexTimer 3 */
+#  define KINETIS_ADC1_BASE         0x400bb000 /* Analog-to-digital converter (ADC) 1 */
+#  define KINETIS_EMAC_BASE         0x400c0000 /* Ethernet MAC and IEEE 1588 timers */
+#  define KINETIS_LPUART0_BASE      0x400c4000 /* LPUART0 */
+#  define KINETIS_TPM1_BASE         0x400c9000 /* TPM1 */
+#  define KINETIS_TPM2_BASE         0x400ca000 /* TPM2 */
+#  define KINETIS_DAC0_ALT_BASE     0x400cc000 /* Alternate address 12-bit digital-to-analog converter (DAC) 0 */
+#  define KINETIS_DAC1_BASE         0x400cd000 /* 12-bit digital-to-analog converter (DAC) 1 */
+#  define KINETIS_I2C2_BASE         0x400e6000 /* I2C 2 */
+#  define KINETIS_I2C3_BASE         0x400e7000 /* I2C 3 */
+#  define KINETIS_UART4_BASE        0x400ea000 /* UART4 */
+#  define KINETIS_XBARSS_BASE       0x400ff000 /* Not an AIPS-Lite slot. The 32-bit general
                                                 * purpose input/output module that shares the
                                                 * crossbar switch slave port with the AIPS-Lite
                                                 * is accessed at this address. */
-# define KINETIS_GPIO_BASE(n)       (0x400ff000 + ((n) << 6))
-# define KINETIS_GPIOA_BASE         0x400ff000 /* GPIO PORTA registers */
-# define KINETIS_GPIOB_BASE         0x400ff040 /* GPIO PORTB registers */
-# define KINETIS_GPIOC_BASE         0x400ff080 /* GPIO PORTC registers */
-# define KINETIS_GPIOD_BASE         0x400ff0c0 /* GPIO PORTD registers */
-# define KINETIS_GPIOE_BASE         0x400ff100 /* GPIO PORTE registers */
+#  define KINETIS_GPIO_BASE(n)      (0x400ff000 + ((n) << 6))
+#  define KINETIS_GPIOA_BASE        0x400ff000 /* GPIO PORTA registers */
+#  define KINETIS_GPIOB_BASE        0x400ff040 /* GPIO PORTB registers */
+#  define KINETIS_GPIOC_BASE        0x400ff080 /* GPIO PORTC registers */
+#  define KINETIS_GPIOD_BASE        0x400ff0c0 /* GPIO PORTD registers */
+#  define KINETIS_GPIOE_BASE        0x400ff100 /* GPIO PORTE registers */
 
 /* Private Peripheral Bus (PPB) Memory Map **********************************/
 
-# define KINETIS_ITM_BASE           0xe0000000 /* Instrumentation Trace Macrocell (ITM) */
-# define KINETIS_DWT_BASE           0xe0001000 /* Data Watchpoint and Trace (DWT) */
-# define KINETIS_FPB_BASE           0xe0002000 /* Flash Patch and Breakpoint (FPB) */
-# define KINETIS_SCS_BASE           0xe000e000 /* System Control Space (SCS) (for NVIC) */
-# define KINETIS_TPIU_BASE          0xe0040000 /* Trace Port Interface Unit (TPIU) */
-# define KINETIS_ETM_BASE           0xe0041000 /* Embedded Trace Macrocell (ETM) */
-# define KINETIS_ETB_BASE           0xe0042000 /* Embedded Trace Buffer (ETB) */
-# define KINETIS_TFUN_BASE          0xe0043000 /* Embedded Trace Funnel */
-# define KINETIS_MCM_BASE           0xe0080000 /* Miscellaneous Control Module (including ETB Almost Full) */
-# define KINETIS_MMCAU_BASE         0xe0081000 /* Memory Mapped Cryptographic Acceleration Unit (MMCAU) */
-# define KINETIS_CACHECTL_BASE      0xe0082000 /* Cache Controller */
-# define KINETIS_ROMTAB_BASE        0xe00ff000 /* ROM Table - allows auto-detection of debug components */
+#  define KINETIS_ITM_BASE          0xe0000000 /* Instrumentation Trace Macrocell (ITM) */
+#  define KINETIS_DWT_BASE          0xe0001000 /* Data Watchpoint and Trace (DWT) */
+#  define KINETIS_FPB_BASE          0xe0002000 /* Flash Patch and Breakpoint (FPB) */
+#  define KINETIS_SCS_BASE          0xe000e000 /* System Control Space (SCS) (for NVIC) */
+#  define KINETIS_TPIU_BASE         0xe0040000 /* Trace Port Interface Unit (TPIU) */
+#  define KINETIS_ETM_BASE          0xe0041000 /* Embedded Trace Macrocell (ETM) */
+#  define KINETIS_ETB_BASE          0xe0042000 /* Embedded Trace Buffer (ETB) */
+#  define KINETIS_TFUN_BASE         0xe0043000 /* Embedded Trace Funnel */
+#  define KINETIS_MCM_BASE          0xe0080000 /* Miscellaneous Control Module (including ETB Almost Full) */
+#  define KINETIS_MMCAU_BASE        0xe0081000 /* Memory Mapped Cryptographic Acceleration Unit (MMCAU) */
+#  define KINETIS_CACHECTL_BASE     0xe0082000 /* Cache Controller */
+#  define KINETIS_ROMTAB_BASE       0xe00ff000 /* ROM Table - allows auto-detection of debug components */
 
 #else
   /* The memory map for other parts is defined in other documents and may or
diff --git a/arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h b/arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h
index 6c28fd9237..881a70ea94 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_kx6tpm.h
@@ -81,20 +81,20 @@
 
 #define TPM_SC_PS_SHIFT             0 /* Bits 0-2: Prescale Factor Selection */
 #define TPM_SC_PS_MASK              (7 << TPM_SC_PS_SHIFT)
-# define TPM_SC_PS_DIV1             (0 << TPM_SC_PS_SHIFT) /* Divide Clock by 1 */
-# define TPM_SC_PS_DIV2             (1 << TPM_SC_PS_SHIFT) /* Divide Clock by 2 */
-# define TPM_SC_PS_DIV4             (2 << TPM_SC_PS_SHIFT) /* Divide Clock by 4 */
-# define TPM_SC_PS_DIV8             (3 << TPM_SC_PS_SHIFT) /* Divide Clock by 8 */
-# define TPM_SC_PS_DIV16            (4 << TPM_SC_PS_SHIFT) /* Divide Clock by 16 */
-# define TPM_SC_PS_DIV32            (5 << TPM_SC_PS_SHIFT) /* Divide Clock by 32 */
-# define TPM_SC_PS_DIV64            (6 << TPM_SC_PS_SHIFT) /* Divide Clock by 64 */
-# define TPM_SC_PS_DIV128           (7 << TPM_SC_PS_SHIFT) /* Divide Clock by 128 */
+#  define TPM_SC_PS_DIV1            (0 << TPM_SC_PS_SHIFT) /* Divide Clock by 1 */
+#  define TPM_SC_PS_DIV2            (1 << TPM_SC_PS_SHIFT) /* Divide Clock by 2 */
+#  define TPM_SC_PS_DIV4            (2 << TPM_SC_PS_SHIFT) /* Divide Clock by 4 */
+#  define TPM_SC_PS_DIV8            (3 << TPM_SC_PS_SHIFT) /* Divide Clock by 8 */
+#  define TPM_SC_PS_DIV16           (4 << TPM_SC_PS_SHIFT) /* Divide Clock by 16 */
+#  define TPM_SC_PS_DIV32           (5 << TPM_SC_PS_SHIFT) /* Divide Clock by 32 */
+#  define TPM_SC_PS_DIV64           (6 << TPM_SC_PS_SHIFT) /* Divide Clock by 64 */
+#  define TPM_SC_PS_DIV128          (7 << TPM_SC_PS_SHIFT) /* Divide Clock by 128 */
 
 #define TPM_SC_CMOD_SHIFT           3 /* Bits 3-4: Clock Mode Selection */
 #define TPM_SC_CMOD_MASK            (3 << TPM_SC_CMOD_SHIFT)
-# define TPM_SC_CMOD_DIS            (0 << TPM_SC_CMOD_SHIFT) /* TPM counter is disabled */
-# define TPM_SC_CMOD_LPTPM_CLK      (1 << TPM_SC_CMOD_SHIFT) /* TPM increments on every counter clock */
-# define TPM_SC_CMOD_LPTPM_EXTCLK   (2 << TPM_SC_CMOD_SHIFT) /* TPM increments on rising edge of EXTCLK */
+#  define TPM_SC_CMOD_DIS           (0 << TPM_SC_CMOD_SHIFT) /* TPM counter is disabled */
+#  define TPM_SC_CMOD_LPTPM_CLK     (1 << TPM_SC_CMOD_SHIFT) /* TPM increments on every counter clock */
+#  define TPM_SC_CMOD_LPTPM_EXTCLK  (2 << TPM_SC_CMOD_SHIFT) /* TPM increments on rising edge of EXTCLK */
 
 #define TPM_SC_CPWMS                (1 << 5) /* Bit 5: Center-aligned PWM Select */
 #define TPM_SC_TOIE                 (1 << 6) /* Bit 6: Timer Overflow Interrupt Enable */
@@ -162,8 +162,8 @@
 
 #define TPM_CONF_DBGMODE_SHIFT      6 /* Bits 6-7: Debug Mode */
 #define TPM_CONF_DBGMODE_MASK       (3 << TPM_CONF_DBGMODE_SHIFT)
-# define TPM_CONF_DBGMODE_PAUSE     (0 << TPM_CONF_DBGMODE_SHIFT) /* TPM counter will pause during DEBUG mode */
-# define TPM_CONF_DBGMODE_CONT      (3 << TPM_CONF_DBGMODE_SHIFT) /* TPM counter continue working in DEBUG mode */
+#  define TPM_CONF_DBGMODE_PAUSE    (0 << TPM_CONF_DBGMODE_SHIFT) /* TPM counter will pause during DEBUG mode */
+#  define TPM_CONF_DBGMODE_CONT     (3 << TPM_CONF_DBGMODE_SHIFT) /* TPM counter continue working in DEBUG mode */
 
 #define TPM_CONF_GTBSYNC            (1 << 8)  /* Bit 8: Global Time Base Synchronization */
 #define TPM_CONF_GTBEEN             (1 << 9)  /* Bit 9: Global Time Base Enable */
@@ -179,25 +179,25 @@
 #define TPM_CONF_TRGSEL_SHIFT       24 /* Bits 24-27: Trigger Select */
 #define TPM_CONF_TRGSEL_MASK        (0xf << TPM_CONF_TRGSEL_SHIFT)
                                                                   /* Internal TPM_CONF_TRGSRC set */
-# define TPM_CONF_TRGSEL_INTC0      (0 << TPM_CONF_TRGSEL_SHIFT)  /* Internal Channel 0 pin input capture */
-# define TPM_CONF_TRGSEL_INTC1      (2 << TPM_CONF_TRGSEL_SHIFT)  /* Internal Channel 1 pin input capture */
-# define TPM_CONF_TRGSEL_INTC01     (3 << TPM_CONF_TRGSEL_SHIFT)  /* Internal Channel 0 or 1 pin input capture */
-
-# define TPM_CONF_TRGSEL_EXTRG_IN   (0 << TPM_CONF_TRGSEL_SHIFT)  /* External trigger pin input */
-# define TPM_CONF_TRGSEL_CMP0       (1 << TPM_CONF_TRGSEL_SHIFT)  /* CPM0 output */
-# define TPM_CONF_TRGSEL_CMP1       (2 << TPM_CONF_TRGSEL_SHIFT)  /* CPM1 output */
-# define TPM_CONF_TRGSEL_CMP2       (3 << TPM_CONF_TRGSEL_SHIFT)  /* CPM2 output */
-# define TPM_CONF_TRGSEL_PIT0       (4 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 0 */
-# define TPM_CONF_TRGSEL_PIT1       (5 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 1 */
-# define TPM_CONF_TRGSEL_PIT2       (6 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 2 */
-# define TPM_CONF_TRGSEL_PIT3       (7 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 3 */
-# define TPM_CONF_TRGSEL_FTM0       (8 << TPM_CONF_TRGSEL_SHIFT)  /* FTM0 initialization trigger and channel triggers */
-# define TPM_CONF_TRGSEL_FTM1       (9 << TPM_CONF_TRGSEL_SHIFT)  /* FTM1 initialization trigger and channel triggers */
-# define TPM_CONF_TRGSEL_FTM2       (10 << TPM_CONF_TRGSEL_SHIFT) /* FTM2 initialization trigger and channel triggers */
-# define TPM_CONF_TRGSEL_FTM3       (11 << TPM_CONF_TRGSEL_SHIFT) /* FTM3 initialization trigger and channel triggers */
-# define TPM_CONF_TRGSEL_RTC_ALRM   (12 << TPM_CONF_TRGSEL_SHIFT) /* RTC Alarm */
-# define TPM_CONF_TRGSEL_RTC_SECS   (13 << TPM_CONF_TRGSEL_SHIFT) /* RTC Seconds */
-# define TPM_CONF_TRGSEL_LPTMR      (14 << TPM_CONF_TRGSEL_SHIFT) /* LPTMR trigger */
-# define TPM_CONF_TRGSEL_SW         (15 << TPM_CONF_TRGSEL_SHIFT) /* Software Trigger */
+#  define TPM_CONF_TRGSEL_INTC0     (0 << TPM_CONF_TRGSEL_SHIFT)  /* Internal Channel 0 pin input capture */
+#  define TPM_CONF_TRGSEL_INTC1     (2 << TPM_CONF_TRGSEL_SHIFT)  /* Internal Channel 1 pin input capture */
+#  define TPM_CONF_TRGSEL_INTC01    (3 << TPM_CONF_TRGSEL_SHIFT)  /* Internal Channel 0 or 1 pin input capture */
+
+#  define TPM_CONF_TRGSEL_EXTRG_IN  (0 << TPM_CONF_TRGSEL_SHIFT)  /* External trigger pin input */
+#  define TPM_CONF_TRGSEL_CMP0      (1 << TPM_CONF_TRGSEL_SHIFT)  /* CPM0 output */
+#  define TPM_CONF_TRGSEL_CMP1      (2 << TPM_CONF_TRGSEL_SHIFT)  /* CPM1 output */
+#  define TPM_CONF_TRGSEL_CMP2      (3 << TPM_CONF_TRGSEL_SHIFT)  /* CPM2 output */
+#  define TPM_CONF_TRGSEL_PIT0      (4 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 0 */
+#  define TPM_CONF_TRGSEL_PIT1      (5 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 1 */
+#  define TPM_CONF_TRGSEL_PIT2      (6 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 2 */
+#  define TPM_CONF_TRGSEL_PIT3      (7 << TPM_CONF_TRGSEL_SHIFT)  /* PIT trigger 3 */
+#  define TPM_CONF_TRGSEL_FTM0      (8 << TPM_CONF_TRGSEL_SHIFT)  /* FTM0 initialization trigger and channel triggers */
+#  define TPM_CONF_TRGSEL_FTM1      (9 << TPM_CONF_TRGSEL_SHIFT)  /* FTM1 initialization trigger and channel triggers */
+#  define TPM_CONF_TRGSEL_FTM2      (10 << TPM_CONF_TRGSEL_SHIFT) /* FTM2 initialization trigger and channel triggers */
+#  define TPM_CONF_TRGSEL_FTM3      (11 << TPM_CONF_TRGSEL_SHIFT) /* FTM3 initialization trigger and channel triggers */
+#  define TPM_CONF_TRGSEL_RTC_ALRM  (12 << TPM_CONF_TRGSEL_SHIFT) /* RTC Alarm */
+#  define TPM_CONF_TRGSEL_RTC_SECS  (13 << TPM_CONF_TRGSEL_SHIFT) /* RTC Seconds */
+#  define TPM_CONF_TRGSEL_LPTMR     (14 << TPM_CONF_TRGSEL_SHIFT) /* LPTMR trigger */
+#  define TPM_CONF_TRGSEL_SW        (15 << TPM_CONF_TRGSEL_SHIFT) /* Software Trigger */
 
 #endif /* __ARCH_ARM_SRC_KINETIS_HARDWARE_KINETIS_KX6TPM_H */
diff --git a/arch/arm/src/kinetis/hardware/kinetis_sim.h b/arch/arm/src/kinetis/hardware/kinetis_sim.h
index eb8399d4b6..21367a376e 100644
--- a/arch/arm/src/kinetis/hardware/kinetis_sim.h
+++ b/arch/arm/src/kinetis/hardware/kinetis_sim.h
@@ -639,7 +639,7 @@
 #endif
                                                         /* Bits 13-14: Reserved */
 #if defined(KINETIS_SIM_SOPT7_ADC1ALTTRGEN)
-# define SIM_SOPT7_ADC1ALTTRGEN               (1 << 15) /* Bit 15: ADC1 alternate trigger enable */
+#  define SIM_SOPT7_ADC1ALTTRGEN              (1 << 15) /* Bit 15: ADC1 alternate trigger enable */
 #endif
                                                         /* Bits 16-31: Reserved */
 #if defined(KINETIS_SIM_HAS_SOPT7_ADC2TRGSEL)
diff --git a/arch/arm/src/kinetis/kinetis_clockconfig.c b/arch/arm/src/kinetis/kinetis_clockconfig.c
index 036023373f..e47d6ad4bb 100644
--- a/arch/arm/src/kinetis/kinetis_clockconfig.c
+++ b/arch/arm/src/kinetis/kinetis_clockconfig.c
@@ -68,15 +68,15 @@
 
 /* A board may provide BOARD_EXTAL_LP to not choose MCG_C2_HGO */
 
-# if defined(BOARD_EXTAL_LP)
-#   define BOARD_MGC_C2_HGO        0  /* Do not use MCG_C2_HGO */
-# else
-#   if !defined(KINETIS_MCG_HAS_C2_HGO)
-#     error BOARD_EXTAL_LP is not defined and MCG_C2_HGO is not supported on this SoC!
-#   else
-#     define BOARD_MGC_C2_HGO      MCG_C2_HGO
-#   endif
-# endif
+#  if defined(BOARD_EXTAL_LP)
+#    define BOARD_MGC_C2_HGO        0  /* Do not use MCG_C2_HGO */
+#  else
+#    if !defined(KINETIS_MCG_HAS_C2_HGO)
+#      error BOARD_EXTAL_LP is not defined and MCG_C2_HGO is not supported on this SoC!
+#    else
+#      define BOARD_MGC_C2_HGO      MCG_C2_HGO
+#    endif
+#  endif
 
 /* A board must provide BOARD_MCG_C2_FCFTRIM when SoC has the setting */
 
@@ -97,11 +97,11 @@
 /* A board must provide BOARD_MCG_C2_LOCRE0 when SoC has the setting */
 
 #  if defined(KINETIS_MCG_HAS_C2_LOCRE0) && !defined(BOARD_MCG_C2_LOCRE0)
-#      error MCG_C2_LOCRE0 is supported on this SoC and BOARD_MCG_C2_LOCRE0 is not defined!
+#    error MCG_C2_LOCRE0 is supported on this SoC and BOARD_MCG_C2_LOCRE0 is not defined!
 #  endif
 
 #  if !defined(KINETIS_MCG_HAS_C2_LOCRE0) && defined(BOARD_MCG_C2_LOCRE0)
-#      error BOARD_MCG_C2_LOCRE0 is defined but MCG_C2_LOCRE0 is not supported on this SoC!
+#    error BOARD_MCG_C2_LOCRE0 is defined but MCG_C2_LOCRE0 is not supported on this SoC!
 #  endif
 
 /* Provide the 0 default */
diff --git a/arch/arm/src/kinetis/kinetis_config.h b/arch/arm/src/kinetis/kinetis_config.h
index 239e579e3d..3a40e011ee 100644
--- a/arch/arm/src/kinetis/kinetis_config.h
+++ b/arch/arm/src/kinetis/kinetis_config.h
@@ -334,7 +334,7 @@
 #endif
 
 #ifndef CONFIG_ENETNETHIFS
-# define CONFIG_ENETNETHIFS 1
+#  define CONFIG_ENETNETHIFS 1
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/kinetis/kinetis_serial.c b/arch/arm/src/kinetis/kinetis_serial.c
index 78bcd357a3..8ae96a6f8b 100644
--- a/arch/arm/src/kinetis/kinetis_serial.c
+++ b/arch/arm/src/kinetis/kinetis_serial.c
@@ -405,55 +405,55 @@ static const struct uart_ops_s g_uart_dma_ops =
 #ifdef CONFIG_KINETIS_UART0
 static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE];
 static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE];
-# ifdef CONFIG_KINETIS_UART0_RXDMA
+#  ifdef CONFIG_KINETIS_UART0_RXDMA
 static char g_uart0rxfifo[RXDMA_BUFFER_SIZE]
   aligned_data(ARMV7M_DCACHE_LINESIZE);
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_KINETIS_UART1
 static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE];
 static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE];
-# ifdef CONFIG_KINETIS_UART1_RXDMA
+#  ifdef CONFIG_KINETIS_UART1_RXDMA
 static char g_uart1rxfifo[RXDMA_BUFFER_SIZE]
   aligned_data(ARMV7M_DCACHE_LINESIZE);
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_KINETIS_UART2
 static char g_uart2rxbuffer[CONFIG_UART2_RXBUFSIZE];
 static char g_uart2txbuffer[CONFIG_UART2_TXBUFSIZE];
-# ifdef CONFIG_KINETIS_UART2_RXDMA
+#  ifdef CONFIG_KINETIS_UART2_RXDMA
 static char g_uart2rxfifo[RXDMA_BUFFER_SIZE]
   aligned_data(ARMV7M_DCACHE_LINESIZE);
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_KINETIS_UART3
 static char g_uart3rxbuffer[CONFIG_UART3_RXBUFSIZE];
 static char g_uart3txbuffer[CONFIG_UART3_TXBUFSIZE];
-# ifdef CONFIG_KINETIS_UART3_RXDMA
+#  ifdef CONFIG_KINETIS_UART3_RXDMA
 static char g_uart3rxfifo[RXDMA_BUFFER_SIZE]
   aligned_data(ARMV7M_DCACHE_LINESIZE);
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_KINETIS_UART4
 static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE];
 static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
-# ifdef CONFIG_KINETIS_UART4_RXDMA
+#  ifdef CONFIG_KINETIS_UART4_RXDMA
 static char g_uart4rxfifo[RXDMA_BUFFER_SIZE]
   aligned_data(ARMV7M_DCACHE_LINESIZE);
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_KINETIS_UART5
 static char g_uart5rxbuffer[CONFIG_UART5_RXBUFSIZE];
 static char g_uart5txbuffer[CONFIG_UART5_TXBUFSIZE];
-# ifdef CONFIG_KINETIS_UART5_RXDMA
+#  ifdef CONFIG_KINETIS_UART5_RXDMA
 static char g_uart5rxfifo[RXDMA_BUFFER_SIZE]
   aligned_data(ARMV7M_DCACHE_LINESIZE);
-# endif
+#  endif
 #endif
 
 /* This describes the state of the Kinetis UART0 port. */
@@ -464,25 +464,25 @@ static struct up_dev_s g_uart0priv =
   .uartbase       = KINETIS_UART0_BASE,
   .clock          = BOARD_CORECLK_FREQ,
   .baud           = CONFIG_UART0_BAUD,
-#ifdef CONFIG_DEBUG_FEATURES
+#  ifdef CONFIG_DEBUG_FEATURES
   .irqe           = KINETIS_IRQ_UART0E,
-#endif
+#  endif
   .irqs           = KINETIS_IRQ_UART0S,
   .parity         = CONFIG_UART0_PARITY,
   .bits           = CONFIG_UART0_BITS,
   .stop2          = CONFIG_UART0_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART0_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART0_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = PIN_UART0_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART0_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART0_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = PIN_UART0_RTS,
-#endif
-#ifdef CONFIG_KINETIS_UART0_RXDMA
+#  endif
+#  ifdef CONFIG_KINETIS_UART0_RXDMA
   .rxdma_reqsrc   = KINETIS_DMA_REQUEST_SRC_UART0_RX,
   .rxfifo         = g_uart0rxfifo,
-#endif
+#  endif
 };
 
 static uart_dev_t g_uart0port =
@@ -497,11 +497,11 @@ static uart_dev_t g_uart0port =
       .size   = CONFIG_UART0_TXBUFSIZE,
       .buffer = g_uart0txbuffer,
     },
-#ifdef CONFIG_KINETIS_UART0_RXDMA
+#  ifdef CONFIG_KINETIS_UART0_RXDMA
   .ops        = &g_uart_dma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_uart0priv,
 };
 #endif
@@ -514,25 +514,25 @@ static struct up_dev_s g_uart1priv =
   .uartbase       = KINETIS_UART1_BASE,
   .clock          = BOARD_CORECLK_FREQ,
   .baud           = CONFIG_UART1_BAUD,
-#ifdef CONFIG_DEBUG_FEATURES
+#  ifdef CONFIG_DEBUG_FEATURES
   .irqe           = KINETIS_IRQ_UART1E,
-#endif
+#  endif
   .irqs           = KINETIS_IRQ_UART1S,
   .parity         = CONFIG_UART1_PARITY,
   .bits           = CONFIG_UART1_BITS,
   .stop2          = CONFIG_UART1_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART1_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = PIN_UART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART1_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = PIN_UART1_RTS,
-#endif
-#ifdef CONFIG_KINETIS_UART1_RXDMA
+#  endif
+#  ifdef CONFIG_KINETIS_UART1_RXDMA
   .rxdma_reqsrc   = KINETIS_DMA_REQUEST_SRC_UART1_RX,
   .rxfifo         = g_uart1rxfifo,
-#endif
+#  endif
 };
 
 static uart_dev_t g_uart1port =
@@ -547,11 +547,11 @@ static uart_dev_t g_uart1port =
       .size   = CONFIG_UART1_TXBUFSIZE,
       .buffer = g_uart1txbuffer,
     },
-#ifdef CONFIG_KINETIS_UART1_RXDMA
+#  ifdef CONFIG_KINETIS_UART1_RXDMA
   .ops        = &g_uart_dma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_uart1priv,
 };
 #endif
@@ -564,25 +564,25 @@ static struct up_dev_s g_uart2priv =
   .uartbase       = KINETIS_UART2_BASE,
   .clock          = BOARD_BUS_FREQ,
   .baud           = CONFIG_UART2_BAUD,
-#ifdef CONFIG_DEBUG_FEATURES
+#  ifdef CONFIG_DEBUG_FEATURES
   .irqe           = KINETIS_IRQ_UART2E,
-#endif
+#  endif
   .irqs           = KINETIS_IRQ_UART2S,
   .parity         = CONFIG_UART2_PARITY,
   .bits           = CONFIG_UART2_BITS,
   .stop2          = CONFIG_UART2_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART2_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART2_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = PIN_UART2_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART2_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART2_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = PIN_UART2_RTS,
-#endif
-#ifdef CONFIG_KINETIS_UART2_RXDMA
+#  endif
+#  ifdef CONFIG_KINETIS_UART2_RXDMA
   .rxdma_reqsrc   = KINETIS_DMA_REQUEST_SRC_UART2_RX,
   .rxfifo         = g_uart2rxfifo,
-#endif
+#  endif
 };
 
 static uart_dev_t g_uart2port =
@@ -597,11 +597,11 @@ static uart_dev_t g_uart2port =
       .size   = CONFIG_UART2_TXBUFSIZE,
       .buffer = g_uart2txbuffer,
     },
-#ifdef CONFIG_KINETIS_UART2_RXDMA
+#  ifdef CONFIG_KINETIS_UART2_RXDMA
   .ops        = &g_uart_dma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_uart2priv,
 };
 #endif
@@ -614,25 +614,25 @@ static struct up_dev_s g_uart3priv =
   .uartbase       = KINETIS_UART3_BASE,
   .clock          = BOARD_BUS_FREQ,
   .baud           = CONFIG_UART3_BAUD,
-#ifdef CONFIG_DEBUG_FEATURES
+#  ifdef CONFIG_DEBUG_FEATURES
   .irqe           = KINETIS_IRQ_UART3E,
-#endif
+#  endif
   .irqs           = KINETIS_IRQ_UART3S,
   .parity         = CONFIG_UART3_PARITY,
   .bits           = CONFIG_UART3_BITS,
   .stop2          = CONFIG_UART3_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART3_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART3_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = PIN_UART3_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART3_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART3_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = PIN_UART3_RTS,
-#endif
-#ifdef CONFIG_KINETIS_UART3_RXDMA
+#  endif
+#  ifdef CONFIG_KINETIS_UART3_RXDMA
   .rxdma_reqsrc   = KINETIS_DMA_REQUEST_SRC_UART3_RX,
   .rxfifo         = g_uart3rxfifo,
-#endif
+#  endif
 };
 
 static uart_dev_t g_uart3port =
@@ -647,11 +647,11 @@ static uart_dev_t g_uart3port =
       .size   = CONFIG_UART3_TXBUFSIZE,
       .buffer = g_uart3txbuffer,
     },
-#ifdef CONFIG_KINETIS_UART3_RXDMA
+#  ifdef CONFIG_KINETIS_UART3_RXDMA
   .ops        = &g_uart_dma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_uart3priv,
 };
 #endif
@@ -664,25 +664,25 @@ static struct up_dev_s g_uart4priv =
   .uartbase       = KINETIS_UART4_BASE,
   .clock          = BOARD_BUS_FREQ,
   .baud           = CONFIG_UART4_BAUD,
-#ifdef CONFIG_DEBUG_FEATURES
+#  ifdef CONFIG_DEBUG_FEATURES
   .irqe           = KINETIS_IRQ_UART4E,
-#endif
+#  endif
   .irqs           = KINETIS_IRQ_UART4S,
   .parity         = CONFIG_UART4_PARITY,
   .bits           = CONFIG_UART4_BITS,
   .stop2          = CONFIG_UART4_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART4_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART4_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = PIN_UART4_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART4_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART4_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = PIN_UART4_RTS,
-#endif
-#ifdef CONFIG_KINETIS_UART4_RXDMA
+#  endif
+#  ifdef CONFIG_KINETIS_UART4_RXDMA
   .rxdma_reqsrc   = KINETIS_DMA_REQUEST_SRC_UART4_RXTX,
   .rxfifo         = g_uart4rxfifo,
-#endif
+#  endif
 };
 
 static uart_dev_t g_uart4port =
@@ -697,11 +697,11 @@ static uart_dev_t g_uart4port =
       .size   = CONFIG_UART4_TXBUFSIZE,
       .buffer = g_uart4txbuffer,
     },
-#ifdef CONFIG_KINETIS_UART4_RXDMA
+#  ifdef CONFIG_KINETIS_UART4_RXDMA
   .ops        = &g_uart_dma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_uart4priv,
 };
 #endif
@@ -714,25 +714,25 @@ static struct up_dev_s g_uart5priv =
   .uartbase       = KINETIS_UART5_BASE,
   .clock          = BOARD_BUS_FREQ,
   .baud           = CONFIG_UART5_BAUD,
-#ifdef CONFIG_DEBUG_FEATURES
+#  ifdef CONFIG_DEBUG_FEATURES
   .irqe           = KINETIS_IRQ_UART5E,
-#endif
+#  endif
   .irqs           = KINETIS_IRQ_UART5S,
   .parity         = CONFIG_UART5_PARITY,
   .bits           = CONFIG_UART5_BITS,
   .stop2          = CONFIG_UART5_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART5_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART5_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = PIN_UART5_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART5_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART5_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = PIN_UART5_RTS,
-#endif
-#ifdef CONFIG_KINETIS_UART5_RXDMA
+#  endif
+#  ifdef CONFIG_KINETIS_UART5_RXDMA
   .rxdma_reqsrc   = KINETIS_DMA_REQUEST_SRC_UART5_RX,
   .rxfifo         = g_uart5rxfifo,
-#endif
+#  endif
 };
 
 static uart_dev_t g_uart5port =
@@ -747,11 +747,11 @@ static uart_dev_t g_uart5port =
       .size   = CONFIG_UART5_TXBUFSIZE,
       .buffer = g_uart5txbuffer,
     },
-#ifdef CONFIG_KINETIS_UART5_RXDMA
+#  ifdef CONFIG_KINETIS_UART5_RXDMA
   .ops        = &g_uart_dma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_uart5priv,
 };
 #endif
diff --git a/arch/arm/src/kl/hardware/kl_memorymap.h b/arch/arm/src/kl/hardware/kl_memorymap.h
index e5cbf5985c..afb5ba5aab 100644
--- a/arch/arm/src/kl/hardware/kl_memorymap.h
+++ b/arch/arm/src/kl/hardware/kl_memorymap.h
@@ -41,81 +41,81 @@
  * K40P144M100SF2RM
  */
 
-# define KL_FLASH_BASE     0x00000000 /* -0x0fffffff Program flash and read-
+#  define KL_FLASH_BASE    0x00000000 /* -0x0fffffff Program flash and read-
                                        *             only data (Includes exception
                                        *             vectors in first 1024 bytes) */
-# define KL_SRAML_BASE     0x18000000 /* -0x1fffffff SRAM_L: Lower SRAM
+#  define KL_SRAML_BASE    0x18000000 /* -0x1fffffff SRAM_L: Lower SRAM
                                        *             (ICODE/DCODE) */
-# define KL_SRAMU_BASE     0x20000000 /* -0x200fffff SRAM_U: Upper SRAM bitband
+#  define KL_SRAMU_BASE    0x20000000 /* -0x200fffff SRAM_U: Upper SRAM bitband
                                        *             region */
 
                         /* 0x20100000  * -0x3fffffff Reserved */
-# define KIP_AIPS_BASE     0x40000000 /* -0x4007ffff AIPS Peripherals */
+#  define KIP_AIPS_BASE    0x40000000 /* -0x4007ffff AIPS Peripherals */
 
                         /* 0x40080000  * -0x400fffff Reserved */
-# define KL_GPIO_BASE(n)   (0x400ff000 + ((n) << 6))
+#  define KL_GPIO_BASE(n)  (0x400ff000 + ((n) << 6))
 
                         /* 0x40100000  * -0x43ffffff Reserved */
-# define KL_BME_BASE       0x44000000 /* -0x5fffffff Bit Manipulation Engine (BME) access
+#  define KL_BME_BASE      0x44000000 /* -0x5fffffff Bit Manipulation Engine (BME) access
                                        *             to AIPS Peripherals for slots 0-127 */
 
                         /* 0x60000000  * -0xdfffffff Reserved */
-# define KL_PERIPH_BASE    0xe0000000 /* -0xe00fffff Private peripherals */
+#  define KL_PERIPH_BASE   0xe0000000 /* -0xe00fffff Private peripherals */
 
                         /* 0xe0100000  * -0xefffffff Reserved */
-# define KL_MTB_BASE       0xf0000000 /* -0xffffffff Micro Trace Buffer (MTB) registers */
+#  define KL_MTB_BASE      0xf0000000 /* -0xffffffff Micro Trace Buffer (MTB) registers */
 
 /* AIPS Memory Map **********************************************************/
 
-# define KL_DMAC_BASE      0x40008000 /* DMA controller */
-# define KL_AIPSGPIO_BASE  0x4000f000 /* GPIO controller (aliased to 0x400ff000) */
-# define KL_FTFL_BASE      0x40020000 /* Flash memory */
-# define KL_DMAMUX0_BASE   0x40021000 /* DMA channel multiplexer 0 */
-# define KL_PIT_BASE       0x40037000 /* Periodic interrupt timers (PIT) */
-# define KL_TPM0_BASE      0x40038000 /* Timer/PWM (TPM) 0 */
-# define KL_TPM1_BASE      0x40039000 /* Timer/PWM (TPM) 1 */
-# define KL_TPM2_BASE      0x4003a000 /* Timer/PWM (TPM) 2 */
-# define KL_ADC0_BASE      0x4003b000 /* Analog-to-digital converter (ADC) 0 */
-# define KL_RTC_BASE       0x4003d000 /* Real time clock */
-# define KL_DAC0_BASE      0x4003f000 /* Digital-to-analog convert (DAC) 0 */
-# define KL_LPTMR_BASE     0x40040000 /* Low power timer */
-# define KL_TSI_BASE       0x40045000 /* Touch sense interface */
-# define KL_SIMLP_BASE     0x40047000 /* SIM low-power logic */
-# define KL_SIM_BASE       0x40048000 /* System integration module (SIM) */
-# define KL_PORT_BASE(n)   (0x40049000 + ((n) << 12))
-# define KL_PORTA_BASE     0x40049000 /* Port A multiplexing control */
-# define KL_PORTB_BASE     0x4004a000 /* Port B multiplexing control */
-# define KL_PORTC_BASE     0x4004b000 /* Port C multiplexing control */
-# define KL_PORTD_BASE     0x4004c000 /* Port D multiplexing control */
-# define KL_PORTE_BASE     0x4004d000 /* Port E multiplexing control */
-# define KL_MCG_BASE       0x40064000 /* Multi-purpose Clock Generator (MCG) */
-# define KL_OSC_BASE       0x40065000 /* System oscillator (OSC) */
-# define KL_I2C0_BASE      0x40066000 /* I2C 0 */
-# define KL_I2C1_BASE      0x40067000 /* I2C 1 */
-# define KL_UART0_BASE     0x4006a000 /* UART0 */
-# define KL_UART1_BASE     0x4006b000 /* UART1 */
-# define KL_UART2_BASE     0x4006c000 /* UART2 */
-# define KL_USB0_BASE      0x40072000 /* USB OTG FS/LS */
-# define KL_CMP_BASE       0x40073000 /* Analog comparator (CMP) / 6-bit digital-to-analog converter (DAC) */
-# define KL_SPI0_BASE      0x40076000 /* SPI 0 */
-# define KL_SPI1_BASE      0x40077000 /* SPI 1 */
-# define KL_LLWU_BASE      0x4007c000 /* Low-leakage wakeup unit (LLWU) */
-# define KL_PMC_BASE       0x4007d000 /* Power management controller (PMC) */
-# define KL_SMC_BASE       0x4007e000 /* System Mode controller (SMC) */
-# define KL_RCM_BASE       0x4007f000 /* Reset Control Module (RCM) */
+#  define KL_DMAC_BASE     0x40008000 /* DMA controller */
+#  define KL_AIPSGPIO_BASE 0x4000f000 /* GPIO controller (aliased to 0x400ff000) */
+#  define KL_FTFL_BASE     0x40020000 /* Flash memory */
+#  define KL_DMAMUX0_BASE  0x40021000 /* DMA channel multiplexer 0 */
+#  define KL_PIT_BASE      0x40037000 /* Periodic interrupt timers (PIT) */
+#  define KL_TPM0_BASE     0x40038000 /* Timer/PWM (TPM) 0 */
+#  define KL_TPM1_BASE     0x40039000 /* Timer/PWM (TPM) 1 */
+#  define KL_TPM2_BASE     0x4003a000 /* Timer/PWM (TPM) 2 */
+#  define KL_ADC0_BASE     0x4003b000 /* Analog-to-digital converter (ADC) 0 */
+#  define KL_RTC_BASE      0x4003d000 /* Real time clock */
+#  define KL_DAC0_BASE     0x4003f000 /* Digital-to-analog convert (DAC) 0 */
+#  define KL_LPTMR_BASE    0x40040000 /* Low power timer */
+#  define KL_TSI_BASE      0x40045000 /* Touch sense interface */
+#  define KL_SIMLP_BASE    0x40047000 /* SIM low-power logic */
+#  define KL_SIM_BASE      0x40048000 /* System integration module (SIM) */
+#  define KL_PORT_BASE(n)  (0x40049000 + ((n) << 12))
+#  define KL_PORTA_BASE    0x40049000 /* Port A multiplexing control */
+#  define KL_PORTB_BASE    0x4004a000 /* Port B multiplexing control */
+#  define KL_PORTC_BASE    0x4004b000 /* Port C multiplexing control */
+#  define KL_PORTD_BASE    0x4004c000 /* Port D multiplexing control */
+#  define KL_PORTE_BASE    0x4004d000 /* Port E multiplexing control */
+#  define KL_MCG_BASE      0x40064000 /* Multi-purpose Clock Generator (MCG) */
+#  define KL_OSC_BASE      0x40065000 /* System oscillator (OSC) */
+#  define KL_I2C0_BASE     0x40066000 /* I2C 0 */
+#  define KL_I2C1_BASE     0x40067000 /* I2C 1 */
+#  define KL_UART0_BASE    0x4006a000 /* UART0 */
+#  define KL_UART1_BASE    0x4006b000 /* UART1 */
+#  define KL_UART2_BASE    0x4006c000 /* UART2 */
+#  define KL_USB0_BASE     0x40072000 /* USB OTG FS/LS */
+#  define KL_CMP_BASE      0x40073000 /* Analog comparator (CMP) / 6-bit digital-to-analog converter (DAC) */
+#  define KL_SPI0_BASE     0x40076000 /* SPI 0 */
+#  define KL_SPI1_BASE     0x40077000 /* SPI 1 */
+#  define KL_LLWU_BASE     0x4007c000 /* Low-leakage wakeup unit (LLWU) */
+#  define KL_PMC_BASE      0x4007d000 /* Power management controller (PMC) */
+#  define KL_SMC_BASE      0x4007e000 /* System Mode controller (SMC) */
+#  define KL_RCM_BASE      0x4007f000 /* Reset Control Module (RCM) */
 
                         /* 0x400ff000  * GPIO Controller */
-# define KL_GPIOn_BASE(n) (0x400ff000 + ((n) << 6))
-# define KL_GPIOA_BASE     0x400ff000 /* GPIO PORTA registers */
-# define KL_GPIOB_BASE     0x400ff040 /* GPIO PORTB registers */
-# define KL_GPIOC_BASE     0x400ff080 /* GPIO PORTC registers */
-# define KL_GPIOD_BASE     0x400ff0c0 /* GPIO PORTD registers */
-# define KL_GPIOE_BASE     0x400ff100 /* GPIO PORTE registers */
+#  define KL_GPIOn_BASE(n) (0x400ff000 + ((n) << 6))
+#  define KL_GPIOA_BASE    0x400ff000 /* GPIO PORTA registers */
+#  define KL_GPIOB_BASE    0x400ff040 /* GPIO PORTB registers */
+#  define KL_GPIOC_BASE    0x400ff080 /* GPIO PORTC registers */
+#  define KL_GPIOD_BASE    0x400ff0c0 /* GPIO PORTD registers */
+#  define KL_GPIOE_BASE    0x400ff100 /* GPIO PORTE registers */
 
 /* Private Peripheral Bus (PPB) Memory Map **********************************/
 
-# define KL_SCS_BASE       0xe000e000 /* System Control Space (SCS) (for NVIC) */
-# define KL_ROMTAB_BASE    0xe00ff000 /* ROM Table - allows auto-detection of debug components */
+#  define KL_SCS_BASE      0xe000e000 /* System Control Space (SCS) (for NVIC) */
+#  define KL_ROMTAB_BASE   0xe00ff000 /* ROM Table - allows auto-detection of debug components */
 
 /****************************************************************************
  * Public Types
diff --git a/arch/arm/src/kl/hardware/kl_tpm.h b/arch/arm/src/kl/hardware/kl_tpm.h
index 545875e59f..aeedcf2b32 100644
--- a/arch/arm/src/kl/hardware/kl_tpm.h
+++ b/arch/arm/src/kl/hardware/kl_tpm.h
@@ -114,22 +114,22 @@
 #define TPM_SC_PS_SHIFT     0 /* Bits 0-2: Prescale Factor Selection */
 
 #define TPM_SC_PS_MASK      (7 << TPM_SC_PS_SHIFT)
-# define TPM_SC_PS_DIV1     (0 << TPM_SC_PS_SHIFT) /* Divide Clock by 1 */
-# define TPM_SC_PS_DIV2     (1 << TPM_SC_PS_SHIFT) /* Divide Clock by 2 */
-# define TPM_SC_PS_DIV4     (2 << TPM_SC_PS_SHIFT) /* Divide Clock by 4 */
-# define TPM_SC_PS_DIV8     (3 << TPM_SC_PS_SHIFT) /* Divide Clock by 8 */
-# define TPM_SC_PS_DIV16    (4 << TPM_SC_PS_SHIFT) /* Divide Clock by 16 */
-# define TPM_SC_PS_DIV32    (5 << TPM_SC_PS_SHIFT) /* Divide Clock by 32 */
-# define TPM_SC_PS_DIV64    (6 << TPM_SC_PS_SHIFT) /* Divide Clock by 64 */
-# define TPM_SC_PS_DIV128   (7 << TPM_SC_PS_SHIFT) /* Divide Clock by 128 */
+#  define TPM_SC_PS_DIV1    (0 << TPM_SC_PS_SHIFT) /* Divide Clock by 1 */
+#  define TPM_SC_PS_DIV2    (1 << TPM_SC_PS_SHIFT) /* Divide Clock by 2 */
+#  define TPM_SC_PS_DIV4    (2 << TPM_SC_PS_SHIFT) /* Divide Clock by 4 */
+#  define TPM_SC_PS_DIV8    (3 << TPM_SC_PS_SHIFT) /* Divide Clock by 8 */
+#  define TPM_SC_PS_DIV16   (4 << TPM_SC_PS_SHIFT) /* Divide Clock by 16 */
+#  define TPM_SC_PS_DIV32   (5 << TPM_SC_PS_SHIFT) /* Divide Clock by 32 */
+#  define TPM_SC_PS_DIV64   (6 << TPM_SC_PS_SHIFT) /* Divide Clock by 64 */
+#  define TPM_SC_PS_DIV128  (7 << TPM_SC_PS_SHIFT) /* Divide Clock by 128 */
 
 #define TPM_SC_CMOD_SHIFT   3 /* Bits 3-4: Clock Mode Selection */
 
-#define TPM_SC_CMOD_MASK          (3 << TPM_SC_CMOD_SHIFT)
-# define TPM_SC_CMOD_DIS          (0 << TPM_SC_CMOD_SHIFT) /* TPM counter is disabled */
-# define TPM_SC_CMOD_LPTPM_CLK    (1 << TPM_SC_CMOD_SHIFT) /* TPM increments on every counter clock */
-# define TPM_SC_CMOD_LPTPM_EXTCLK (2 << TPM_SC_CMOD_SHIFT) /* TPM increments on rising edge of EXTCLK */
-# define TPM_SC_CMOD_RESERV       (3 << TPM_SC_CMOD_SHIFT) /* Reserved */
+#define TPM_SC_CMOD_MASK           (3 << TPM_SC_CMOD_SHIFT)
+#  define TPM_SC_CMOD_DIS          (0 << TPM_SC_CMOD_SHIFT) /* TPM counter is disabled */
+#  define TPM_SC_CMOD_LPTPM_CLK    (1 << TPM_SC_CMOD_SHIFT) /* TPM increments on every counter clock */
+#  define TPM_SC_CMOD_LPTPM_EXTCLK (2 << TPM_SC_CMOD_SHIFT) /* TPM increments on rising edge of EXTCLK */
+#  define TPM_SC_CMOD_RESERV       (3 << TPM_SC_CMOD_SHIFT) /* Reserved */
 
 #define TPM_SC_CPWMS              (1 << 5) /* Bit 5: Center-aligned PWM Select */
 #define TPM_SC_TOIE               (1 << 6) /* Bit 6: Timer Overflow Interrupt Enable */
@@ -158,8 +158,8 @@
 #define TPM_CONF_DOZEEN           5 /* Bit 5: Doze Enable */
 #define TPM_CONF_DBGMODE_SHIFT    6 /* Bits 6-7: Debug Mode */
 #define TPM_CONF_DBGMODE_MASK     (3 << TPM_DBGMODE_SHIFT)
-# define TPM_CONF_DBGMODE_PAUSE   (0 << TPM_DBGMODE_SHIFT) /* TPM counter will pause during DEBUG mode */
-# define TPM_CONF_DBGMODE_CONT    (3 << TPM_DBGMODE_SHIFT) /* TPM counter continue working in DEBUG mode */
+#  define TPM_CONF_DBGMODE_PAUSE  (0 << TPM_DBGMODE_SHIFT) /* TPM counter will pause during DEBUG mode */
+#  define TPM_CONF_DBGMODE_CONT   (3 << TPM_DBGMODE_SHIFT) /* TPM counter continue working in DEBUG mode */
 
                                             /* Bit 8: Reserved */
 #define TPM_CONF_GTBEEN           (1 << 9)  /* Bit 9: Global Time Base Enable */
@@ -168,31 +168,31 @@
 #define TPM_CONF_CSOO             (1 << 17) /* Bit 17: Counter Stop On Overflow */
 #define TPM_CONF_CROT             (1 << 18) /* Bit 18: Counter Reload On Trigger */
                                             /* Bits 19-23: Reserved */
-#define TPM_CONF_TRGSEL_SHIFT     24
-#define TPM_CONF_TRGSEL_MASK      (15 << TPM_CONF_TRGSEL_SHIFT)
-# define TPM_CONF_TRGSEL_EXTRG_IN (0 << TPM_CONF_TRGSEL_SHIFT) /* External trigger pin input */
-# define TPM_CONF_TRGSEL_CMP0     (1 << TPM_CONF_TRGSEL_SHIFT) /* CPM0 output */
+#define TPM_CONF_TRGSEL_SHIFT      24
+#define TPM_CONF_TRGSEL_MASK       (15 << TPM_CONF_TRGSEL_SHIFT)
+#  define TPM_CONF_TRGSEL_EXTRG_IN (0 << TPM_CONF_TRGSEL_SHIFT) /* External trigger pin input */
+#  define TPM_CONF_TRGSEL_CMP0     (1 << TPM_CONF_TRGSEL_SHIFT) /* CPM0 output */
 
                                 /* (2 << TPM_CONF_TRGSEL_SHIFT) Reserved */
 
                                 /* (3 << TPM_CONF_TRGSEL_SHIFT) Reserved */
 
-# define TPM_CONF_TRGSEL_PIT0     (4 << TPM_CONF_TRGSEL_SHIFT) /* PIT trigger 0 */
-# define TPM_CONF_TRGSEL_PIT1     (5 << TPM_CONF_TRGSEL_SHIFT) /* PIT trigger 1 */
+#  define TPM_CONF_TRGSEL_PIT0     (4 << TPM_CONF_TRGSEL_SHIFT) /* PIT trigger 0 */
+#  define TPM_CONF_TRGSEL_PIT1     (5 << TPM_CONF_TRGSEL_SHIFT) /* PIT trigger 1 */
 
                                 /* (6 << TPM_CONF_TRGSEL_SHIFT) Reserved */
 
                                 /* (7 << TPM_CONF_TRGSEL_SHIFT) Reserved */
 
-# define TPM_CONF_TRGSEL_TPM0     (8 << TPM_CONF_TRGSEL_SHIFT)  /* TPM0 Overflow */
-# define TPM_CONF_TRGSEL_TPM1     (9 << TPM_CONF_TRGSEL_SHIFT)  /* TPM1 Overflow */
-# define TPM_CONF_TRGSEL_TPM2     (10 << TPM_CONF_TRGSEL_SHIFT) /* TPM1 Overflow */
+#  define TPM_CONF_TRGSEL_TPM0     (8 << TPM_CONF_TRGSEL_SHIFT)  /* TPM0 Overflow */
+#  define TPM_CONF_TRGSEL_TPM1     (9 << TPM_CONF_TRGSEL_SHIFT)  /* TPM1 Overflow */
+#  define TPM_CONF_TRGSEL_TPM2     (10 << TPM_CONF_TRGSEL_SHIFT) /* TPM1 Overflow */
 
                                 /* (11 << TPM_CONF_TRGSEL_SHIFT) Reserved */
 
-# define TPM_CONF_TRGSEL_RTC_ALRM (12 << TPM_CONF_TRGSEL_SHIFT) /* RTC Alarm */
-# define TPM_CONF_TRGSEL_RTC_SECS (13 << TPM_CONF_TRGSEL_SHIFT) /* RTC Seconds */
-# define TPM_CONF_TRGSEL_LPTMR    (14 << TPM_CONF_TRGSEL_SHIFT) /* LPTMR trigger */
+#  define TPM_CONF_TRGSEL_RTC_ALRM (12 << TPM_CONF_TRGSEL_SHIFT) /* RTC Alarm */
+#  define TPM_CONF_TRGSEL_RTC_SECS (13 << TPM_CONF_TRGSEL_SHIFT) /* RTC Seconds */
+#  define TPM_CONF_TRGSEL_LPTMR    (14 << TPM_CONF_TRGSEL_SHIFT) /* LPTMR trigger */
 
                                 /* (15 << TPM_CONF_TRGSEL_SHIFT) Reserved */
 
diff --git a/arch/arm/src/lc823450/lc823450_syscontrol.h b/arch/arm/src/lc823450/lc823450_syscontrol.h
index 0924e4c59c..30cc8cf6ef 100644
--- a/arch/arm/src/lc823450/lc823450_syscontrol.h
+++ b/arch/arm/src/lc823450/lc823450_syscontrol.h
@@ -277,8 +277,8 @@ void lc823450_clock_dump(void);
 void mod_stby_regs(uint32_t clearbits, uint32_t setbits);
 void lc823450_mod_stby_regs(uint32_t clearbits, uint32_t setbits);
 #else
-# define mod_stby_regs(...)
-# define lc823450_mod_stby_regs(...)
+#  define mod_stby_regs(...)
+#  define lc823450_mod_stby_regs(...)
 #endif
 
 #if defined(__cplusplus)
diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h b/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h
index d71cd46a2a..024c6b7c88 100644
--- a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h
+++ b/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_memorymap.h
@@ -50,15 +50,15 @@
 /* Off chip Memory via External Memory Interface */
 
 #define LPC17_40_EXTRAM_BASE    0x80000000 /*  */
-# define LPC17_40_EXTSRAM_CS0   0x80000000 /* Chip select 0 /up to 64MB/  */
-# define LPC17_40_EXTSRAM_CS1   0x90000000 /* Chip select 1 /up to 64MB/  */
-# define LPC17_40_EXTSRAM_CS2   0x98000000 /* Chip select 2 /up to 64MB/  */
-# define LPC17_40_EXTSRAM_CS3   0x9c000000 /* Chip select 3 /up to 64MB/  */
-
-# define LPC17_40_EXTDRAM_CS0   0xa0000000 /* Chip select 0 /up to 256MB/  */
-# define LPC17_40_EXTDRAM_CS1   0xb0000000 /* Chip select 1 /up to 256MB/  */
-# define LPC17_40_EXTDRAM_CS2   0xc0000000 /* Chip select 2 /up to 256MB/  */
-# define LPC17_40_EXTDRAM_CS3   0xd0000000 /* Chip select 3 /up to 256MB/  */
+#  define LPC17_40_EXTSRAM_CS0  0x80000000 /* Chip select 0 /up to 64MB/  */
+#  define LPC17_40_EXTSRAM_CS1  0x90000000 /* Chip select 1 /up to 64MB/  */
+#  define LPC17_40_EXTSRAM_CS2  0x98000000 /* Chip select 2 /up to 64MB/  */
+#  define LPC17_40_EXTSRAM_CS3  0x9c000000 /* Chip select 3 /up to 64MB/  */
+
+#  define LPC17_40_EXTDRAM_CS0  0xa0000000 /* Chip select 0 /up to 256MB/  */
+#  define LPC17_40_EXTDRAM_CS1  0xb0000000 /* Chip select 1 /up to 256MB/  */
+#  define LPC17_40_EXTDRAM_CS2  0xc0000000 /* Chip select 2 /up to 256MB/  */
+#  define LPC17_40_EXTDRAM_CS3  0xd0000000 /* Chip select 3 /up to 256MB/  */
 
 #define LPC17_40_CORTEXM3_BASE  0xe0000000 /* -0xe00fffff: (see armv7-m/nvic.h) */
 #define LPC17_40_SCS_BASE       0xe000e000
diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h b/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h
index d47497636a..55f846db87 100644
--- a/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h
+++ b/arch/arm/src/lpc17xx_40xx/hardware/lpc178x_40xx_syscon.h
@@ -373,7 +373,7 @@
 
 #define SYSCON_SPIFICLKSEL_SPIFIDIV_SHIFT   (0)     /* Bits 0-4: divide value for SPIFI clock  */
 #define SYSCON_SPIFICLKSEL_SPIFIDIV_MASK    (0x1f << SYSCON_SPIFICLKSEL_SPIFIDIV_SHIFT)
-# define SYSCON_SPIFICLKSEL_SPIFIDIV(n)     ((n-1) << SYSCON_SPIFICLKSEL_SPIFIDIV_SHIFT) /* n = 2 - 31 */
+#  define SYSCON_SPIFICLKSEL_SPIFIDIV(n)    ((n-1) << SYSCON_SPIFICLKSEL_SPIFIDIV_SHIFT) /* n = 2 - 31 */
 
                                                     /* Bits 5-7: Reserved */
 #define SYSCON_SPIFICLKSEL_SPIFISEL_SHIFT   (8)     /* Bits 8-9: Selects input clock for SPIFI clock divider */
@@ -509,10 +509,10 @@
 
 /* System control registers -- Matrix Arbitration Priorities */
 
-# define SYSCON_MATRIXARB_PRI_LOWEST        (0)
-# define SYSCON_MATRIXARB_PRI_LOW           (1)
-# define SYSCON_MATRIXARB_PRI_HIGH          (2)
-# define SYSCON_MATRIXARB_PRI_HIGHEST       (3)
+#  define SYSCON_MATRIXARB_PRI_LOWEST       (0)
+#  define SYSCON_MATRIXARB_PRI_LOW          (1)
+#  define SYSCON_MATRIXARB_PRI_HIGH         (2)
+#  define SYSCON_MATRIXARB_PRI_HIGHEST      (3)
 
 #define SYSCON_MATRIXARB_PRI_ICODE_SHIFT    (0)       /* Bits 0-1:  I-Code bus priority (should be lower than D-Code) */
 #define SYSCON_MATRIXARB_PRI_ICODE_MASK     (3 << SYSCON_MATRIXARB_PRI_ICODE_SHIFT)
@@ -642,7 +642,7 @@
                             /* Delay values multiplied by 250 picoseconds */
 #define SYSCON_EMCDLYCTL_CMDDLY_SHIFT       (0)     /* Bits 0-4: Delay value for EMC outputs in command delayed mode */
 #define SYSCON_EMCDLYCTL_CMDDLY_MASK        (0x1f << SYSCON_EMCDLYCTL_CMDDLY_SHIFT)
-# define SYSCON_EMCDLYCTL_CMDDLY(n)         ((n-1) << SYSCON_EMCDLYCTL_CMDDLY_SHIFT) /* n = 3 - 32 */
+#  define SYSCON_EMCDLYCTL_CMDDLY(n)        ((n-1) << SYSCON_EMCDLYCTL_CMDDLY_SHIFT) /* n = 3 - 32 */
 
                                                     /* Bits 5-7: Reserved */
 #define SYSCON_EMCDLYCTL_FBCLKDLY_SHIFT     (8)     /* Bits 8-12: Delay value for the feedback clock that controls input data sampling */
@@ -652,12 +652,12 @@
                                                     /* Bits 13-15: Reserved */
 #define SYSCON_EMCDLYCTL_CLKOUT0DLY_SHIFT   (16)    /* Bits 16-20: Delay value for the CLKOUT0 output */
 #define SYSCON_EMCDLYCTL_CLKOUT0DLY_MASK    (0x1f << SYSCON_EMCDLYCTL_CLKOUT0DLY_SHIFT)
-# define SYSCON_EMCDLYCTL_CLKOUT0DLY(n)     ((n-1) << SYSCON_EMCDLYCTL_CLKOUT0DLY_SHIFT) /* n = 3 - 32 */
+#  define SYSCON_EMCDLYCTL_CLKOUT0DLY(n)    ((n-1) << SYSCON_EMCDLYCTL_CLKOUT0DLY_SHIFT) /* n = 3 - 32 */
 
                                                     /* Bits 21-23: Reserved */
 #define SYSCON_EMCDLYCTL_CLKOUT1DLY_SHIFT   (24)    /* Bits 24-28: Delay value for the CLKOUT1 output */
 #define SYSCON_EMCDLYCTL_CLKOUT1DLY_MASK    (0x1f << SYSCON_EMCDLYCTL_CLKOUT1DLY_SHIFT)
-# define SYSCON_EMCDLYCTL_CLKOUT1DLY(n)     ((n-1) << SYSCON_EMCDLYCTL_CLKOUT1DLY_SHIFT) /* n = 3 - 32 */
+#  define SYSCON_EMCDLYCTL_CLKOUT1DLY(n)    ((n-1) << SYSCON_EMCDLYCTL_CLKOUT1DLY_SHIFT) /* n = 3 - 32 */
 
                                                     /* Bits 29-31: Reserved */
 
diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h b/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h
index 2971bb2b0c..4ec2bcc3b1 100644
--- a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h
+++ b/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_can.h
@@ -321,28 +321,28 @@
                                                   /* Bits 11-15: Reserved */
 #define CAN_ICR_ERRBIT_SHIFT            (16)      /* Bits 16-20: Error Code Capture */
 #define CAN_ICR_ERRBIT_MASK             (0x1f << CAN_ICR_ERRBIT_SHIFT)
-# define CAN_ICR_ERRBIT_SOF             (3  << CAN_ICR_ERRBIT_SHIFT) /* Start of Frame */
-# define CAN_ICR_ERRBIT_ID28            (2  << CAN_ICR_ERRBIT_SHIFT) /* ID28 ... ID21 */
-# define CAN_ICR_ERRBIT_SRTR            (4  << CAN_ICR_ERRBIT_SHIFT) /* SRTR Bit */
-# define CAN_ICR_ERRBIT_IDE             (5  << CAN_ICR_ERRBIT_SHIFT) /* DE bit */
-# define CAN_ICR_ERRBIT_ID20            (6  << CAN_ICR_ERRBIT_SHIFT) /* ID20 ... ID18 */
-# define CAN_ICR_ERRBIT_ID17            (7  << CAN_ICR_ERRBIT_SHIFT) /* ID17 ... 13 */
-# define CAN_ICR_ERRBIT_CRC             (8  << CAN_ICR_ERRBIT_SHIFT) /* CRC Sequence */
-# define CAN_ICR_ERRBIT_DATA            (10 << CAN_ICR_ERRBIT_SHIFT) /* Data Field */
-# define CAN_ICR_ERRBIT_LEN             (11 << CAN_ICR_ERRBIT_SHIFT) /* Data Length Code */
-# define CAN_ICR_ERRBIT_ RTR            (12 << CAN_ICR_ERRBIT_SHIFT) /* RTR Bit */
-# define CAN_ICR_ERRBIT_ID4             (14 << CAN_ICR_ERRBIT_SHIFT) /* ID4 ... ID0 */
-# define CAN_ICR_ERRBIT_ID12            (15 << CAN_ICR_ERRBIT_SHIFT) /* ID12 ... ID5 */
-# define CAN_ICR_ERRBIT_AERR            (17 << CAN_ICR_ERRBIT_SHIFT) /* Active Error Flag */
-# define CAN_ICR_ERRBIT_INTERMSN        (18 << CAN_ICR_ERRBIT_SHIFT) /* Intermission */
-# define CAN_ICR_ERRBIT_DOM             (19 << CAN_ICR_ERRBIT_SHIFT) /* Tolerate Dominant Bits */
-# define CAN_ICR_ERRBIT_PERR            (22 << CAN_ICR_ERRBIT_SHIFT) /* Passive Error Flag */
-# define CAN_ICR_ERRBIT_ERRDLM          (23 << CAN_ICR_ERRBIT_SHIFT) /* Error Delimiter */
-# define CAN_ICR_ERRBIT_CRCDLM          (24 << CAN_ICR_ERRBIT_SHIFT) /* CRC Delimiter */
-# define CAN_ICR_ERRBIT_ACKSLT          (25 << CAN_ICR_ERRBIT_SHIFT) /* Acknowledge Slot */
-# define CAN_ICR_ERRBIT_EOF             (26 << CAN_ICR_ERRBIT_SHIFT) /* End of Frame */
-# define CAN_ICR_ERRBIT_ACKDLM          (27 << CAN_ICR_ERRBIT_SHIFT) /* Acknowledge Delimiter */
-# define CAN_ICR_ERRBIT_OVLD            (28 << CAN_ICR_ERRBIT_SHIFT) /* Overload flag */
+#  define CAN_ICR_ERRBIT_SOF            (3  << CAN_ICR_ERRBIT_SHIFT) /* Start of Frame */
+#  define CAN_ICR_ERRBIT_ID28           (2  << CAN_ICR_ERRBIT_SHIFT) /* ID28 ... ID21 */
+#  define CAN_ICR_ERRBIT_SRTR           (4  << CAN_ICR_ERRBIT_SHIFT) /* SRTR Bit */
+#  define CAN_ICR_ERRBIT_IDE            (5  << CAN_ICR_ERRBIT_SHIFT) /* DE bit */
+#  define CAN_ICR_ERRBIT_ID20           (6  << CAN_ICR_ERRBIT_SHIFT) /* ID20 ... ID18 */
+#  define CAN_ICR_ERRBIT_ID17           (7  << CAN_ICR_ERRBIT_SHIFT) /* ID17 ... 13 */
+#  define CAN_ICR_ERRBIT_CRC            (8  << CAN_ICR_ERRBIT_SHIFT) /* CRC Sequence */
+#  define CAN_ICR_ERRBIT_DATA           (10 << CAN_ICR_ERRBIT_SHIFT) /* Data Field */
+#  define CAN_ICR_ERRBIT_LEN            (11 << CAN_ICR_ERRBIT_SHIFT) /* Data Length Code */
+#  define CAN_ICR_ERRBIT_ RTR           (12 << CAN_ICR_ERRBIT_SHIFT) /* RTR Bit */
+#  define CAN_ICR_ERRBIT_ID4            (14 << CAN_ICR_ERRBIT_SHIFT) /* ID4 ... ID0 */
+#  define CAN_ICR_ERRBIT_ID12           (15 << CAN_ICR_ERRBIT_SHIFT) /* ID12 ... ID5 */
+#  define CAN_ICR_ERRBIT_AERR           (17 << CAN_ICR_ERRBIT_SHIFT) /* Active Error Flag */
+#  define CAN_ICR_ERRBIT_INTERMSN       (18 << CAN_ICR_ERRBIT_SHIFT) /* Intermission */
+#  define CAN_ICR_ERRBIT_DOM            (19 << CAN_ICR_ERRBIT_SHIFT) /* Tolerate Dominant Bits */
+#  define CAN_ICR_ERRBIT_PERR           (22 << CAN_ICR_ERRBIT_SHIFT) /* Passive Error Flag */
+#  define CAN_ICR_ERRBIT_ERRDLM         (23 << CAN_ICR_ERRBIT_SHIFT) /* Error Delimiter */
+#  define CAN_ICR_ERRBIT_CRCDLM         (24 << CAN_ICR_ERRBIT_SHIFT) /* CRC Delimiter */
+#  define CAN_ICR_ERRBIT_ACKSLT         (25 << CAN_ICR_ERRBIT_SHIFT) /* Acknowledge Slot */
+#  define CAN_ICR_ERRBIT_EOF            (26 << CAN_ICR_ERRBIT_SHIFT) /* End of Frame */
+#  define CAN_ICR_ERRBIT_ACKDLM         (27 << CAN_ICR_ERRBIT_SHIFT) /* Acknowledge Delimiter */
+#  define CAN_ICR_ERRBIT_OVLD           (28 << CAN_ICR_ERRBIT_SHIFT) /* Overload flag */
 
 #define CAN_ICR_ERRDIR                  (1 << 21) /* Bit 21: Direction bit at time of error */
 #define CAN_ICR_ERRC_SHIFT              (22)      /* Bits 22-23: Type of error */
diff --git a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h b/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h
index 1e2d2eda58..6e4880f61d 100644
--- a/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h
+++ b/arch/arm/src/lpc17xx_40xx/hardware/lpc17_40_wdt.h
@@ -121,14 +121,14 @@
 /* Watchdog timer warning interrupt register */
 
 #ifdef LPC178x_40xx
-# define WDT_WARNINT                  (0x3ff)   /* Bits 0-9: Warning Interrupt compare value */
+#  define WDT_WARNINT                 (0x3ff)   /* Bits 0-9: Warning Interrupt compare value */
                                                 /* Bits 10-31: Reserved */
 #endif
 
 /* Watchdog timer value register */
 
 #ifdef LPC178x_40xx
-# define WDT_WINDOW                   (0xffffff) /* Bits 0-23: Watchdog window value */
+#  define WDT_WINDOW                  (0xffffff) /* Bits 0-23: Watchdog window value */
                                                  /* Bits 24-31: Reserved */
 #endif
 
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
index 2560446b3c..f10380548c 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
@@ -51,11 +51,11 @@
 #include <nuttx/config.h>
 
 #if defined(CONFIG_CAN)
-# define CHRDEV_CAN
+#  define CHRDEV_CAN
 #endif
 
 #if defined(CONFIG_NET_CAN)
-# define SOCKET_CAN
+#  define SOCKET_CAN
 #endif
 
 #include <stdio.h>
@@ -343,13 +343,13 @@ static struct up_dev_s g_can1priv =
   .baud    = CONFIG_LPC17_40_CAN1_BAUD,
   .base    = LPC17_40_CAN1_BASE,
 };
-# if defined(CHRDEV_CAN)
+#  if defined(CHRDEV_CAN)
 static struct lpc17_40_can_s g_can1dev =
 {
   .cd_ops  = &g_canops,
   .cd_priv = &g_can1priv,
 };
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_LPC17_40_CAN2
@@ -360,13 +360,13 @@ static struct up_dev_s g_can2priv =
   .baud    = CONFIG_LPC17_40_CAN2_BAUD,
   .base    = LPC17_40_CAN2_BASE,
 };
-# if defined(CHRDEV_CAN)
+#  if defined(CHRDEV_CAN)
 static struct lpc17_40_can_s g_can2dev =
 {
   .cd_ops  = &g_canops,
   .cd_priv = &g_can2priv,
 };
-# endif
+#  endif
 #endif
 
 #if defined(SOCKET_CAN)
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
index c8b02b70e2..4a8a1e7fa8 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
@@ -340,8 +340,8 @@ static void lpc17_40_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t lpc17_40_getreg(uint32_t addr);
 static void lpc17_40_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc17_40_getreg(addr)     getreg32(addr)
-# define lpc17_40_putreg(val,addr) putreg32(val,addr)
+#  define lpc17_40_getreg(addr)     getreg32(addr)
+#  define lpc17_40_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Common TX logic */
@@ -1264,11 +1264,11 @@ static int lpc17_40_interrupt(int irq, void *context, void *arg)
   /* Clear the pending interrupt */
 
 #if 0 /* Apparently not necessary */
-# if CONFIG_LPC17_40_NINTERFACES > 1
+#  if CONFIG_LPC17_40_NINTERFACES > 1
   lpc17_40_clrpend(priv->irq);
-# else
+#  else
   lpc17_40_clrpend(LPC17_40_IRQ_ETH);
-# endif
+#  endif
 #endif
 
   return OK;
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c
index 0845109bb7..a706c7315e 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_lowputc.c
@@ -142,7 +142,7 @@
 #ifdef LPC178x_40xx
   /* Use the global PCLK frequency */
 
-# define CONSOLE_NUMERATOR BOARD_PCLK_FREQUENCY
+#  define CONSOLE_NUMERATOR BOARD_PCLK_FREQUENCY
 
 #else
 #  ifdef CONFIG_LPC17_40_UART_USE_FRACTIONAL_DIVIDER
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c
index ba5c05b103..a6ef0f546d 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbdev.c
@@ -365,8 +365,8 @@ static void lpc17_40_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t lpc17_40_getreg(uint32_t addr);
 static void lpc17_40_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc17_40_getreg(addr)     getreg32(addr)
-# define lpc17_40_putreg(val,addr) putreg32(val,addr)
+#  define lpc17_40_getreg(addr)     getreg32(addr)
+#  define lpc17_40_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Command operations *******************************************************/
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
index 26cfc4555d..c8e1b17dbb 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
@@ -269,8 +269,8 @@ static void lpc17_40_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t lpc17_40_getreg(uint32_t addr);
 static void lpc17_40_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc17_40_getreg(addr)     getreg32(addr)
-# define lpc17_40_putreg(val,addr) putreg32(val,addr)
+#  define lpc17_40_getreg(addr)     getreg32(addr)
+#  define lpc17_40_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Semaphores ***************************************************************/
diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/arch/arm/src/lpc214x/lpc214x_usbdev.c
index 0a2ba73c86..0a8ce69a92 100644
--- a/arch/arm/src/lpc214x/lpc214x_usbdev.c
+++ b/arch/arm/src/lpc214x/lpc214x_usbdev.c
@@ -371,8 +371,8 @@ struct lpc214x_usbdev_s
 static uint32_t lpc214x_getreg(uint32_t addr);
 static void lpc214x_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc214x_getreg(addr)     getreg32(addr)
-# define lpc214x_putreg(val,addr) putreg32(val,addr)
+#  define lpc214x_getreg(addr)     getreg32(addr)
+#  define lpc214x_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Command operations *******************************************************/
diff --git a/arch/arm/src/lpc2378/lpc23xx_uart.h b/arch/arm/src/lpc2378/lpc23xx_uart.h
index 976317a0a2..d11fae561e 100644
--- a/arch/arm/src/lpc2378/lpc23xx_uart.h
+++ b/arch/arm/src/lpc2378/lpc23xx_uart.h
@@ -91,26 +91,26 @@
 
 /* PCKLSEL0 bits 7:6, 00=CCLK/4, 01=CCLK/1 , 10=CCLK/2  */
 #ifdef U0_PCLKDIV
-# if U0_PCLKDIV == 1
-#  define U0_PCLKSEL     (0x00000040)
-# elif U0_PCLKDIV == 2
-#   define U0_PCLKSEL    (0x00000080)
-# elif U0_PCLKDIV == 4
-#   define U0_PCLKSEL    (0x00000000)
-# endif
+#  if U0_PCLKDIV == 1
+#    define U0_PCLKSEL  (0x00000040)
+#  elif U0_PCLKDIV == 2
+#    define U0_PCLKSEL  (0x00000080)
+#  elif U0_PCLKDIV == 4
+#    define U0_PCLKSEL  (0x00000000)
+#  endif
 #else
 #  error "UART0 PCLK divider not set"
 #endif
 
 /* PCKLSEL1 bits 17:16, 00=CCLK/4, 01=CCLK/1 , 10=CCLK/2  */
 #ifdef U2_PCLKDIV
-# if U2_PCLKDIV == 1
-#  define U2_PCLKSEL    (0x00010000)
-# elif U2_PCLKDIV == 2
-#   define U2_PCLKSEL   (0x00020000)
-# elif U2_PCLKDIV == 4
-#   define U2_PCLKSEL   (0x00000000)
-# endif
+#  if U2_PCLKDIV == 1
+#    define U2_PCLKSEL  (0x00010000)
+#  elif U2_PCLKDIV == 2
+#    define U2_PCLKSEL  (0x00020000)
+#  elif U2_PCLKDIV == 4
+#    define U2_PCLKSEL  (0x00000000)
+#  endif
 #else
 #  error "UART2 PCLK divider not set"
 #endif
diff --git a/arch/arm/src/lpc31xx/lpc31_memorymap.h b/arch/arm/src/lpc31xx/lpc31_memorymap.h
index 3fe86c3293..53c95c5f02 100644
--- a/arch/arm/src/lpc31xx/lpc31_memorymap.h
+++ b/arch/arm/src/lpc31xx/lpc31_memorymap.h
@@ -199,7 +199,7 @@
  */
 
 #ifndef CONFIG_ARCH_ROMPGTABLE
-# define LPC31_FIRST_VSECTION        0x00000000 /* Beginning of the virtual address space */
+#  define LPC31_FIRST_VSECTION       0x00000000 /* Beginning of the virtual address space */
 #  define LPC31_SHADOWSPACE_VSECTION 0x00000000 /* 0x00000000-0x00000fff: Shadow Area 4Kb */
 #  define LPC31_INTSRAM_VSECTION     0x11028000 /*                        Internal SRAM 96Kb-192Kb */
 #    define LPC31_INTSRAM0_VADDR     0x11028000 /* 0x11028000-0x1103ffff: Internal SRAM 0 96Kb */
diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c b/arch/arm/src/lpc31xx/lpc31_usbdev.c
index 7667339166..08c39a3c96 100644
--- a/arch/arm/src/lpc31xx/lpc31_usbdev.c
+++ b/arch/arm/src/lpc31xx/lpc31_usbdev.c
@@ -340,8 +340,8 @@ struct lpc31_usbdev_s
 static uint32_t lpc31_getreg(uint32_t addr);
 static void lpc31_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc31_getreg(addr)     getreg32(addr)
-# define lpc31_putreg(val,addr) putreg32(val,addr)
+#  define lpc31_getreg(addr)     getreg32(addr)
+#  define lpc31_putreg(val,addr) putreg32(val,addr)
 #endif
 
 static inline void lpc31_clrbits(uint32_t mask, uint32_t addr);
diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h b/arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h
index 622d9e83bf..bba75f9eaa 100644
--- a/arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h
+++ b/arch/arm/src/lpc43xx/hardware/lpc43_gpdma.h
@@ -318,13 +318,13 @@
 
 #define GPDMA_CONTROL_S_SHIFT            (24) /* Bit 24: Source AHB master select */
 
-# define GPDMA_CONTROL_S0                (0 << GPDMA_CONTROL_S_SHIFT) /* AHB Master 0 selected for source transfer. */
-# define GPDMA_CONTROL_S1                (1 << GPDMA_CONTROL_S_SHIFT) /* AHB Master 1 selected for source transfer. */
+#  define GPDMA_CONTROL_S0               (0 << GPDMA_CONTROL_S_SHIFT) /* AHB Master 0 selected for source transfer. */
+#  define GPDMA_CONTROL_S1               (1 << GPDMA_CONTROL_S_SHIFT) /* AHB Master 1 selected for source transfer. */
 
 #define GPDMA_CONTROL_D_SHIFT            (25) /* Bit 25: Destination AHB master select */
 
-# define GPDMA_CONTROL_D0                (0 << GPDMA_CONTROL_D_SHIFT) /* AHB Master 0 selected for destination transfer. */
-# define GPDMA_CONTROL_D1                (1 << GPDMA_CONTROL_D_SHIFT) /* AHB Master 1 selected for destination transfer. */
+#  define GPDMA_CONTROL_D0               (0 << GPDMA_CONTROL_D_SHIFT) /* AHB Master 0 selected for destination transfer. */
+#  define GPDMA_CONTROL_D1               (1 << GPDMA_CONTROL_D_SHIFT) /* AHB Master 1 selected for destination transfer. */
 
 #define GPDMA_CONTROL_SI                 (1 << 26) /* Bit 26: Source increment */
 #define GPDMA_CONTROL_DI                 (1 << 27) /* Bit 27: Destination increment */
diff --git a/arch/arm/src/lpc43xx/hardware/lpc43_sct.h b/arch/arm/src/lpc43xx/hardware/lpc43_sct.h
index d8ed2abc6d..63319b6138 100644
--- a/arch/arm/src/lpc43xx/hardware/lpc43_sct.h
+++ b/arch/arm/src/lpc43xx/hardware/lpc43_sct.h
@@ -1081,22 +1081,22 @@
 
 #define SCT_CONFIG_CLKSEL_SHIFT     (3)       /* Bits 3-6: SCT clock select */
 #define SCT_CONFIG_CLKSEL_MASK      (15 << SCT_CONFIG_CLKSEL_SHIFT)
-# define SCT_CONFIG_CLKSEL_REDGE0   (0 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 0 */
-# define SCT_CONFIG_CLKSEL_FEDGE0   (1 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 0 */
-# define SCT_CONFIG_CLKSEL_REDGE1   (2 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 1 */
-# define SCT_CONFIG_CLKSEL_FEDGE1   (3 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 1 */
-# define SCT_CONFIG_CLKSEL_REDGE2   (4 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 2 */
-# define SCT_CONFIG_CLKSEL_FEDGE2   (5 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 2 */
-# define SCT_CONFIG_CLKSEL_REDGE3   (6 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 3 */
-# define SCT_CONFIG_CLKSEL_FEDGE3   (7 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 3 */
-# define SCT_CONFIG_CLKSEL_REDGE4   (8 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 4 */
-# define SCT_CONFIG_CLKSEL_FEDGE4   (9 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 4 */
-# define SCT_CONFIG_CLKSEL_REDGE5   (10 << SCT_CONFIG_CLKSEL_SHIFT) /* Rising edges on input 5 */
-# define SCT_CONFIG_CLKSEL_FEDGE5   (11 << SCT_CONFIG_CLKSEL_SHIFT) /* Falling edges on input 5 */
-# define SCT_CONFIG_CLKSEL_REDGE6   (12 << SCT_CONFIG_CLKSEL_SHIFT) /* Rising edges on input 6 */
-# define SCT_CONFIG_CLKSEL_FEDGE6   (13 << SCT_CONFIG_CLKSEL_SHIFT) /* Falling edges on input 6 */
-# define SCT_CONFIG_CLKSEL_REDGE7   (14 << SCT_CONFIG_CLKSEL_SHIFT) /* Rising edges on input 7 */
-# define SCT_CONFIG_CLKSEL_FEDGE7   (15 << SCT_CONFIG_CLKSEL_SHIFT) /* Falling edges on input 7 */
+#  define SCT_CONFIG_CLKSEL_REDGE0  (0 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 0 */
+#  define SCT_CONFIG_CLKSEL_FEDGE0  (1 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 0 */
+#  define SCT_CONFIG_CLKSEL_REDGE1  (2 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 1 */
+#  define SCT_CONFIG_CLKSEL_FEDGE1  (3 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 1 */
+#  define SCT_CONFIG_CLKSEL_REDGE2  (4 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 2 */
+#  define SCT_CONFIG_CLKSEL_FEDGE2  (5 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 2 */
+#  define SCT_CONFIG_CLKSEL_REDGE3  (6 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 3 */
+#  define SCT_CONFIG_CLKSEL_FEDGE3  (7 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 3 */
+#  define SCT_CONFIG_CLKSEL_REDGE4  (8 << SCT_CONFIG_CLKSEL_SHIFT)  /* Rising edges on input 4 */
+#  define SCT_CONFIG_CLKSEL_FEDGE4  (9 << SCT_CONFIG_CLKSEL_SHIFT)  /* Falling edges on input 4 */
+#  define SCT_CONFIG_CLKSEL_REDGE5  (10 << SCT_CONFIG_CLKSEL_SHIFT) /* Rising edges on input 5 */
+#  define SCT_CONFIG_CLKSEL_FEDGE5  (11 << SCT_CONFIG_CLKSEL_SHIFT) /* Falling edges on input 5 */
+#  define SCT_CONFIG_CLKSEL_REDGE6  (12 << SCT_CONFIG_CLKSEL_SHIFT) /* Rising edges on input 6 */
+#  define SCT_CONFIG_CLKSEL_FEDGE6  (13 << SCT_CONFIG_CLKSEL_SHIFT) /* Falling edges on input 6 */
+#  define SCT_CONFIG_CLKSEL_REDGE7  (14 << SCT_CONFIG_CLKSEL_SHIFT) /* Rising edges on input 7 */
+#  define SCT_CONFIG_CLKSEL_FEDGE7  (15 << SCT_CONFIG_CLKSEL_SHIFT) /* Falling edges on input 7 */
 
 #define SCT_CONFIG_NORELOADU        (1 << 7)  /* Bit 7:  Disable unified match register reload */
 #define SCT_CONFIG_NORELOADL        (1 << 7)  /* Bit 7:  Disable lower match registers reload */
diff --git a/arch/arm/src/lpc43xx/lpc43_ethernet.c b/arch/arm/src/lpc43xx/lpc43_ethernet.c
index f57cd6f57c..053e9ccfcc 100644
--- a/arch/arm/src/lpc43xx/lpc43_ethernet.c
+++ b/arch/arm/src/lpc43xx/lpc43_ethernet.c
@@ -552,9 +552,9 @@ static uint32_t lpc43_getreg(uint32_t addr);
 static void lpc43_putreg(uint32_t val, uint32_t addr);
 static void lpc43_checksetup(void);
 #else
-# define lpc43_getreg(addr)      getreg32(addr)
-# define lpc43_putreg(val,addr)  putreg32(val,addr)
-# define lpc43_checksetup()
+#  define lpc43_getreg(addr)     getreg32(addr)
+#  define lpc43_putreg(val,addr) putreg32(val,addr)
+#  define lpc43_checksetup()
 #endif
 
 /* Free buffer management */
diff --git a/arch/arm/src/lpc43xx/lpc43_sdmmc.c b/arch/arm/src/lpc43xx/lpc43_sdmmc.c
index 553db45076..7498d7fe7c 100644
--- a/arch/arm/src/lpc43xx/lpc43_sdmmc.c
+++ b/arch/arm/src/lpc43xx/lpc43_sdmmc.c
@@ -245,8 +245,8 @@ struct lpc43_dev_s
 static uint32_t lpc43_getreg(uint32_t addr);
 static void lpc43_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc43_getreg(addr)      getreg32(addr)
-# define lpc43_putreg(val,addr)  putreg32(val,addr)
+#  define lpc43_getreg(addr)     getreg32(addr)
+#  define lpc43_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Low-level helpers ********************************************************/
diff --git a/arch/arm/src/lpc43xx/lpc43_serial.c b/arch/arm/src/lpc43xx/lpc43_serial.c
index ad0381acf9..f142ccee66 100644
--- a/arch/arm/src/lpc43xx/lpc43_serial.c
+++ b/arch/arm/src/lpc43xx/lpc43_serial.c
@@ -341,7 +341,7 @@ static uart_dev_t g_usart3port =
 #    define CONSOLE_DEV     g_usart3port    /* USART3=console */
 #    define TTYS0_DEV       g_usart3port    /* USART3=ttyS0 */
 #    define USART3_ASSIGNED 1
-# endif
+#  endif
 #else
 /* No console, assign only ttyS0 */
 
@@ -357,7 +357,7 @@ static uart_dev_t g_usart3port =
 #  else /* elif defined(CONFIG_LPC43_USART3) */
 #    define TTYS0_DEV       g_usart3port    /* USART3=ttyS0 */
 #    define USART3_ASSIGNED 1
-# endif
+#  endif
 #endif
 
 /* Assign ttyS1 */
diff --git a/arch/arm/src/lpc43xx/lpc43_timer.c b/arch/arm/src/lpc43xx/lpc43_timer.c
index f690b8c610..59569ec368 100644
--- a/arch/arm/src/lpc43xx/lpc43_timer.c
+++ b/arch/arm/src/lpc43xx/lpc43_timer.c
@@ -96,8 +96,8 @@ struct lpc43_lowerhalf_s
 static uint32_t lpc43_getreg(uint32_t addr);
 static void     lpc43_putreg(uint32_t val, uint32_t addr);
 #else
-# define        lpc43_getreg(addr)     getreg32(addr)
-# define        lpc43_putreg(val,addr) putreg32(val,addr)
+#  define       lpc43_getreg(addr)     getreg32(addr)
+#  define       lpc43_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/arch/arm/src/lpc43xx/lpc43_usb0dev.c
index 71f3f90c11..eeefdfc9dc 100644
--- a/arch/arm/src/lpc43xx/lpc43_usb0dev.c
+++ b/arch/arm/src/lpc43xx/lpc43_usb0dev.c
@@ -344,8 +344,8 @@ struct lpc43_usbdev_s
 static uint32_t lpc43_getreg(uint32_t addr);
 static void lpc43_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc43_getreg(addr)     getreg32(addr)
-# define lpc43_putreg(val,addr) putreg32(val,addr)
+#  define lpc43_getreg(addr)     getreg32(addr)
+#  define lpc43_putreg(val,addr) putreg32(val,addr)
 #endif
 
 static inline void lpc43_clrbits(uint32_t mask, uint32_t addr);
diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_dma.h b/arch/arm/src/lpc54xx/hardware/lpc54_dma.h
index 23e64a0bc1..6fc95d7778 100644
--- a/arch/arm/src/lpc54xx/hardware/lpc54_dma.h
+++ b/arch/arm/src/lpc54xx/hardware/lpc54_dma.h
@@ -134,17 +134,17 @@
 #define DMA_CFG_TRIGBURST           (1 << 6)  /* Bit 6:  Trigger Burst */
 #define DMA_CFG_BURSTPOWER_SHIFT    (8)       /* Bits 8-11: Burst Power */
 #define DMA_CFG_BURSTPOWER_MASK     (15 << DMA_CFG_BURSTPOWER_SHIFT)
-# define DMA_CFG_BURSTPOWER_1       (0 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 1 (2^0) */
-# define DMA_CFG_BURSTPOWER_2       (1 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 2 (2^1) */
-# define DMA_CFG_BURSTPOWER_3       (2 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 4 (2^2) */
-# define DMA_CFG_BURSTPOWER_8       (3 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 8 (2^2) */
-# define DMA_CFG_BURSTPOWER_16      (4 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 16 (2^2) */
-# define DMA_CFG_BURSTPOWER_32      (5 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 32 (2^2) */
-# define DMA_CFG_BURSTPOWER_64      (6 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 64 (2^2) */
-# define DMA_CFG_BURSTPOWER_128     (7 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 128 (2^2) */
-# define DMA_CFG_BURSTPOWER_256     (8 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 256 (2^2) */
-# define DMA_CFG_BURSTPOWER_512     (9 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 256 (2^2) */
-# define DMA_CFG_BURSTPOWER_1024    (10 << DMA_CFG_BURSTPOWER_SHIFT) /* Burst size = 1024 (2^10) */
+#  define DMA_CFG_BURSTPOWER_1      (0 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 1 (2^0) */
+#  define DMA_CFG_BURSTPOWER_2      (1 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 2 (2^1) */
+#  define DMA_CFG_BURSTPOWER_3      (2 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 4 (2^2) */
+#  define DMA_CFG_BURSTPOWER_8      (3 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 8 (2^2) */
+#  define DMA_CFG_BURSTPOWER_16     (4 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 16 (2^2) */
+#  define DMA_CFG_BURSTPOWER_32     (5 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 32 (2^2) */
+#  define DMA_CFG_BURSTPOWER_64     (6 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 64 (2^2) */
+#  define DMA_CFG_BURSTPOWER_128    (7 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 128 (2^2) */
+#  define DMA_CFG_BURSTPOWER_256    (8 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 256 (2^2) */
+#  define DMA_CFG_BURSTPOWER_512    (9 << DMA_CFG_BURSTPOWER_SHIFT)  /* Burst size = 256 (2^2) */
+#  define DMA_CFG_BURSTPOWER_1024   (10 << DMA_CFG_BURSTPOWER_SHIFT) /* Burst size = 1024 (2^10) */
 
 #define DMA_CFG_SRCBURSTWRAP        (1 << 14) /* Bit 14: Source Burst Wrap */
 #define DMA_CFG_DSTBURSTWRAP        (1 << 15) /* Bit 15: Destination Burst Wrap */
diff --git a/arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h b/arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h
index 93a42af265..2f06d7a188 100644
--- a/arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h
+++ b/arch/arm/src/lpc54xx/hardware/lpc54_ethernet.h
@@ -571,13 +571,13 @@
 #define ETH_DMA_MODE_TXPR                                (1 << 11)                     /* Bit 11: Transmit priority */
 #define ETH_DMA_MODE_PR_SHIFT                            (12)                          /* Bits 12-14: Priority ratio */
 #define ETH_DMA_MODE_PR_MASK                             (7 << ETH_DMA_MODE_PR_SHIFT)
-# define ETH_DMA_MODE_PR_1TO1                            (0 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 1:1 */
-# define ETH_DMA_MODE_PR_3TO1                            (2 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 3:1 */
-# define ETH_DMA_MODE_PR_4TO1                            (3 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 4:1 */
-# define ETH_DMA_MODE_PR_5TO1                            (4 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 5:1 */
-# define ETH_DMA_MODE_PR_6TO1                            (5 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 6:1 */
-# define ETH_DMA_MODE_PR_7TO1                            (6 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 7:1 */
-# define ETH_DMA_MODE_PR_8TO1                            (7 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 8:1 */
+#  define ETH_DMA_MODE_PR_1TO1                           (0 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 1:1 */
+#  define ETH_DMA_MODE_PR_3TO1                           (2 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 3:1 */
+#  define ETH_DMA_MODE_PR_4TO1                           (3 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 4:1 */
+#  define ETH_DMA_MODE_PR_5TO1                           (4 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 5:1 */
+#  define ETH_DMA_MODE_PR_6TO1                           (5 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 6:1 */
+#  define ETH_DMA_MODE_PR_7TO1                           (6 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 7:1 */
+#  define ETH_DMA_MODE_PR_8TO1                           (7 << ETH_DMA_MODE_PR_SHIFT) /* Priority ratio is 8:1 */
 
 /* DMA system bus mode */
 
diff --git a/arch/arm/src/lpc54xx/lpc54_ethernet.c b/arch/arm/src/lpc54xx/lpc54_ethernet.c
index dd90770137..d4ec7ba5a6 100644
--- a/arch/arm/src/lpc54xx/lpc54_ethernet.c
+++ b/arch/arm/src/lpc54xx/lpc54_ethernet.c
@@ -370,8 +370,8 @@ static uint32_t *g_txbuffers1[CONFIG_LPC54_ETH_NTXDESC1];
 static uint32_t lpc54_getreg(uintptr_t addr);
 static void lpc54_putreg(uint32_t val, uintptr_t addr);
 #else
-# define lpc54_getreg(addr)      getreg32(addr)
-# define lpc54_putreg(val,addr)  putreg32(val,addr)
+#  define lpc54_getreg(addr)     getreg32(addr)
+#  define lpc54_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Common TX logic */
diff --git a/arch/arm/src/lpc54xx/lpc54_sdmmc.c b/arch/arm/src/lpc54xx/lpc54_sdmmc.c
index b8d28f5839..398131567b 100644
--- a/arch/arm/src/lpc54xx/lpc54_sdmmc.c
+++ b/arch/arm/src/lpc54xx/lpc54_sdmmc.c
@@ -245,8 +245,8 @@ struct lpc54_dev_s
 static uint32_t lpc54_getreg(uint32_t addr);
 static void lpc54_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc54_getreg(addr)      getreg32(addr)
-# define lpc54_putreg(val,addr)  putreg32(val,addr)
+#  define lpc54_getreg(addr)     getreg32(addr)
+#  define lpc54_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Low-level helpers ********************************************************/
diff --git a/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c b/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c
index 0cf834ffba..6deba1bcde 100644
--- a/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c
+++ b/arch/arm/src/lpc54xx/lpc54_usb0_ohci.c
@@ -364,8 +364,8 @@ static void lpc54_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t lpc54_getreg(uint32_t addr);
 static void lpc54_putreg(uint32_t val, uint32_t addr);
 #else
-# define lpc54_getreg(addr)     getreg32(addr)
-# define lpc54_putreg(val,addr) putreg32(val,addr)
+#  define lpc54_getreg(addr)     getreg32(addr)
+#  define lpc54_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Byte stream access helper functions **************************************/
diff --git a/arch/arm/src/phy62xx/phy62xx_hardfault.c b/arch/arm/src/phy62xx/phy62xx_hardfault.c
index 7189fe8b36..3213aa8848 100644
--- a/arch/arm/src/phy62xx/phy62xx_hardfault.c
+++ b/arch/arm/src/phy62xx/phy62xx_hardfault.c
@@ -42,15 +42,15 @@ extern uint8_t _stextram[];
 extern uint8_t _etextram[];
 
 #ifdef CONFIG_DEBUG_HARDFAULT_ALERT
-# define hfalert(format, ...)  _alert(format, ##__VA_ARGS__)
+#  define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
 #else
-# define hfalert(x...)
+#  define hfalert(x...)
 #endif
 
 #ifdef CONFIG_DEBUG_HARDFAULT_INFO
-# define hfinfo(format, ...)   _info(format, ##__VA_ARGS__)
+#  define hfinfo(format, ...)  _info(format, ##__VA_ARGS__)
 #else
-# define hfinfo(x...)
+#  define hfinfo(x...)
 #endif
 
 #define INSN_SVC0        0xdf00 /* insn: svc 0 */
diff --git a/arch/arm/src/rp2040/hardware/rp2040_memorymap.h b/arch/arm/src/rp2040/hardware/rp2040_memorymap.h
index 0f4d90817f..b905159c2c 100644
--- a/arch/arm/src/rp2040/hardware/rp2040_memorymap.h
+++ b/arch/arm/src/rp2040/hardware/rp2040_memorymap.h
@@ -113,10 +113,10 @@
 
 #ifndef __ASSEMBLY__
 
-# define xorbits_reg32(v,a)   putreg32(v, (a) | RP2040_ATOMIC_XOR_REG_OFFSET)
-# define setbits_reg32(v,a)   putreg32(v, (a) | RP2040_ATOMIC_SET_REG_OFFSET)
-# define clrbits_reg32(v,a)   putreg32(v, (a) | RP2040_ATOMIC_CLR_REG_OFFSET)
-# define modbits_reg32(v,m,a) xorbits_reg32((getreg32(a) ^ (v)) & (m), a)
+#  define xorbits_reg32(v,a)   putreg32(v, (a) | RP2040_ATOMIC_XOR_REG_OFFSET)
+#  define setbits_reg32(v,a)   putreg32(v, (a) | RP2040_ATOMIC_SET_REG_OFFSET)
+#  define clrbits_reg32(v,a)   putreg32(v, (a) | RP2040_ATOMIC_CLR_REG_OFFSET)
+#  define modbits_reg32(v,m,a) xorbits_reg32((getreg32(a) ^ (v)) & (m), a)
 
 /****************************************************************************
  * Public Function Prototypes
diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h b/arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h
index 8192f2478e..f7304ed30d 100644
--- a/arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h
+++ b/arch/arm/src/s32k1xx/hardware/s32k1xx_enet.h
@@ -514,13 +514,13 @@
  */
 
 #ifdef S32K1XX_ENET_HAS_DBSWAP
-# ifndef CONFIG_ENDIAN_BIG
-#  define S32K1XX_USE_DBSWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define S32K1XX_USE_DBSWAP
+#  endif
 #else
-# ifndef CONFIG_ENDIAN_BIG
-#  define S32K1XX_BUFFERS_SWAP
-# endif
+#  ifndef CONFIG_ENDIAN_BIG
+#    define S32K1XX_BUFFERS_SWAP
+#  endif
 #endif
 
 #ifndef S32K1XX_BUFFERS_SWAP
diff --git a/arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h b/arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h
index ff4e67b5a2..283d1907ff 100644
--- a/arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h
+++ b/arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h
@@ -190,8 +190,8 @@
 /* ADC Options Register */
 
 #define SIM_ADCOPT_ADC0TRGSEL                   (1 << 0)  /* Bit 0:  ADC0 trigger source select */
-# define SIM_ADCOPT_ADC0TRGSEL_PDB              (0)       /*         PDB output */
-# define SIM_ADCOPT_ADC0TRGSEL_TRGMUX           (1 << 0)  /*         TRGMUX output */
+#  define SIM_ADCOPT_ADC0TRGSEL_PDB             (0)       /*         PDB output */
+#  define SIM_ADCOPT_ADC0TRGSEL_TRGMUX          (1 << 0)  /*         TRGMUX output */
 #define SIM_ADCOPT_ADC0SWPRETRG_SHIFT           (1)       /* Bits 1-3: ADC0 software pretrigger sources */
 #define SIM_ADCOPT_ADC0SWPRETRG_MASK            (7 << SIM_ADCOPT_ADC0SWPRETRG_SHIFT)
 #  define SIM_ADCOPT_ADC0SWPRETRG_DISABLED      (0 << SIM_ADCOPT_ADC0SWPRETRG_SHIFT) /* Software pretrigger disabled */
@@ -207,8 +207,8 @@
 #  define SIM_ADCOPT_ADC0PRETRGSEL_SW           (2 << SIM_ADCOPT_ADC0PRETRGSEL_SHIFT) /* Software pretrigger */
 
 #define SIM_ADCOPT_ADC1TRGSEL                   (1 << 8)  /* Bit 8:  ADC1 trigger source select */
-# define SIM_ADCOPT_ADC1TRGSEL_PDB              (0)       /*         PDB output */
-# define SIM_ADCOPT_ADC1TRGSEL_TRGMUX           (1 << 8)  /*         TRGMUX output */
+#  define SIM_ADCOPT_ADC1TRGSEL_PDB             (0)       /*         PDB output */
+#  define SIM_ADCOPT_ADC1TRGSEL_TRGMUX          (1 << 8)  /*         TRGMUX output */
 #define SIM_ADCOPT_ADC1SWPRETRG_SHIFT           (9)       /* Bits 9-11: ADC1 software pretrigger sources */
 #define SIM_ADCOPT_ADC1SWPRETRG_MASK            (7 << SIM_ADCOPT_ADC1SWPRETRG_SHIFT)
 #  define SIM_ADCOPT_ADC1SWPRETRG_DISABLED      (0 << SIM_ADCOPT_ADC1SWPRETRG_SHIFT) /* Software pretrigger disabled */
diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
index 82ca35f178..a17dc91164 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
@@ -1917,7 +1917,7 @@ static void s32k1xx_lpspi_bus_initialize(struct s32k1xx_lpspidev_s *priv)
 static void up_pm_notify(struct pm_callback_s *cb, int domain,
                          enum pm_state_e pmstate)
 {
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
   struct s32k1xx_lpspidev_s *priv0 = NULL;
 
@@ -1925,8 +1925,8 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain,
 
   priv0 = &g_lpspi0dev;
 
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
 
   struct s32k1xx_lpspidev_s *priv1 = NULL;
 
@@ -1934,7 +1934,7 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain,
 
   priv1 = &g_lpspi1dev;
 
-# endif
+#  endif
 
   unsigned int count = 0;   /* the amount of peripheral clocks to change */
 
@@ -1967,19 +1967,19 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain,
 
       clock_source = CLK_SRC_SPLL_DIV2;
 
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
       /* add 1 to count to do it for SPI0 */
 
       count++;
-# endif
+#  endif
 
-# ifdef CONFIG_PM_SPI1
+#  ifdef CONFIG_PM_SPI1
 
       /* add 1 to count to do it for SPI1 */
 
       count++;
-# endif
+#  endif
     }
     break;
 
@@ -1998,7 +1998,7 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain,
 
     const struct peripheral_clock_config_s clock_config[] =
     {
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
       {
         .clkname  =   LPSPI0_CLK,
@@ -2007,8 +2007,8 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain,
         .frac     =   MULTIPLY_BY_ONE,
         .divider  =   1,
       },
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
 
       {
         .clkname  =   LPSPI1_CLK,
@@ -2017,45 +2017,45 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain,
         .frac     =   MULTIPLY_BY_ONE,
         .divider  =   1,
       }
-# endif
+#  endif
     };
 
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
     /* disable LPSP0 */
 
     s32k1xx_lpspi_modifyreg32(priv0, S32K1XX_LPSPI_CR_OFFSET, 0,
                               !LPSPI_CR_MEN);
 
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
 
     /* disable LPSPI */
 
     s32k1xx_lpspi_modifyreg32(priv1, S32K1XX_LPSPI_CR_OFFSET, 0,
                               !LPSPI_CR_MEN);
 
-# endif
+#  endif
 
     /* change the clock config for the new mode */
 
     s32k1xx_periphclocks(count, clock_config);
 
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
     /* Enable LPSP0 */
 
     s32k1xx_lpspi_modifyreg32(priv0, S32K1XX_LPSPI_CR_OFFSET, 0,
                               LPSPI_CR_MEN);
 
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
 
     /* Enable LPSPI */
 
     s32k1xx_lpspi_modifyreg32(priv1, S32K1XX_LPSPI_CR_OFFSET, 0,
                               LPSPI_CR_MEN);
-# endif
+#  endif
 
     /* get the clock freq */
   }
@@ -2276,14 +2276,14 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
   /* make the private struct for lpspi bus 0 */
 
   priv0 = &g_lpspi0dev;
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
   struct s32k1xx_lpspidev_s *priv1 = NULL;
 
   /* make the private struct for lpspi bus 1  */
 
   priv1 = &g_lpspi1dev;
-# endif
+#  endif
 
   unsigned int count = 0;   /* the amount of peripheral clocks to change */
 
@@ -2312,20 +2312,20 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
 
       clock_source = CLK_SRC_SIRC_DIV2;
 
-# ifdef CONFIG_PM_SPI0_STANDBY
+#  ifdef CONFIG_PM_SPI0_STANDBY
 
       /* increase count to change the SPI0  */
 
       count++;
 
-# endif
-# ifdef CONFIG_PM_SPI1_STANDBY
+#  endif
+#  ifdef CONFIG_PM_SPI1_STANDBY
 
       /* increase count to change the SPI1 */
 
       count++;
 
-# endif
+#  endif
     }
     break;
 
@@ -2339,20 +2339,20 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
 
       clock_source = CLK_SRC_SIRC_DIV2;
 
-# ifdef CONFIG_PM_SPI0_SLEEP
+#  ifdef CONFIG_PM_SPI0_SLEEP
 
       /* increase count to change the SPI0  */
 
       count++;
 
-# endif
-# ifdef CONFIG_PM_SPI1_SLEEP
+#  endif
+#  ifdef CONFIG_PM_SPI1_SLEEP
 
       /* increase count to change the SPI1 */
 
       count++;
 
-# endif
+#  endif
     }
     break;
 
@@ -2371,7 +2371,7 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
 
     const struct peripheral_clock_config_s clock_config[] =
     {
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
       {
         .clkname  =   LPSPI0_CLK,
         .clkgate  =   true,
@@ -2379,8 +2379,8 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
         .frac     =   MULTIPLY_BY_ONE,
         .divider  =   1,
       },
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
       {
         .clkname  =   LPSPI1_CLK,
         .clkgate  =   true,
@@ -2388,46 +2388,46 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain,
         .frac     =   MULTIPLY_BY_ONE,
         .divider  =   1,
       }
-# endif
+#  endif
     };
 
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
     /* disable LPSPI0 */
 
     s32k1xx_lpspi_modifyreg32(priv0, S32K1XX_LPSPI_CR_OFFSET, 0,
                                      !LPSPI_CR_MEN);
 
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
 
     /* disable LPSPI1 */
 
     s32k1xx_lpspi_modifyreg32(priv1, S32K1XX_LPSPI_CR_OFFSET, 0,
                               !LPSPI_CR_MEN);
 
-# endif
+#  endif
 
     /* change the clock config for the new mode */
 
     s32k1xx_periphclocks(count, clock_config);
 
-# ifdef CONFIG_PM_SPI0
+#  ifdef CONFIG_PM_SPI0
 
     /* Enable LPSPI */
 
     s32k1xx_lpspi_modifyreg32(priv0, S32K1XX_LPSPI_CR_OFFSET, 0,
                               LPSPI_CR_MEN);
 
-# endif
-# ifdef CONFIG_PM_SPI1
+#  endif
+#  ifdef CONFIG_PM_SPI1
 
     /* Enable LPSPI */
 
     s32k1xx_lpspi_modifyreg32(priv1, S32K1XX_LPSPI_CR_OFFSET, 0,
                               LPSPI_CR_MEN);
 
-# endif
+#  endif
   }
 
   /* get the clock freq */
diff --git a/arch/arm/src/s32k1xx/s32k1xx_serial.c b/arch/arm/src/s32k1xx/s32k1xx_serial.c
index 738d4d93a2..df2b2ed83f 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_serial.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_serial.c
@@ -608,7 +608,7 @@ static struct s32k1xx_uart_s g_lpuart2priv =
 #  ifdef CONFIG_LPUART2_RXDMA
   .dma_rxreqsrc = S32K1XX_DMACHAN_LPUART2_RX,
   .rxfifo        = g_lpuart2rxfifo,
-# endif
+#  endif
 };
 #endif
 
diff --git a/arch/arm/src/s32k3xx/s32k3xx_qspi.c b/arch/arm/src/s32k3xx/s32k3xx_qspi.c
index 4fde2bdb66..5a6ebcb9b7 100644
--- a/arch/arm/src/s32k3xx/s32k3xx_qspi.c
+++ b/arch/arm/src/s32k3xx/s32k3xx_qspi.c
@@ -151,7 +151,7 @@ static void qspi_resetregisters(void);
 #if defined(CONFIG_DEBUG_SPI_INFO) && defined(CONFIG_DEBUG_GPIO)
 static void     qspi_dumpgpioconfig(const char *msg);
 #else
-# define        qspi_dumpgpioconfig(msg)
+#  define       qspi_dumpgpioconfig(msg)
 #endif
 
 static inline uint32_t qspi_isbusy(void);
diff --git a/arch/arm/src/s32k3xx/s32k3xx_serial.c b/arch/arm/src/s32k3xx/s32k3xx_serial.c
index 3768307870..ca30e7fa50 100644
--- a/arch/arm/src/s32k3xx/s32k3xx_serial.c
+++ b/arch/arm/src/s32k3xx/s32k3xx_serial.c
@@ -1730,37 +1730,37 @@ static struct s32k3xx_uart_s g_lpuart0priv =
   .parity       = CONFIG_LPUART0_PARITY,
   .bits         = CONFIG_LPUART0_BITS,
   .stopbits2    = CONFIG_LPUART0_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART0_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART0_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART0_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART0_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART0_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART0_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART0_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART0_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART0_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART0_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART0_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART0_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART0_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART0_TXDMA
+#  ifdef CONFIG_LPUART0_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART08_TX,
-#endif
-#ifdef CONFIG_LPUART0_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART0_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART08_RX,
   .rxfifo        = g_lpuart0rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1779,15 +1779,15 @@ static struct s32k3xx_uart_s g_lpuart1priv =
         .size       = CONFIG_LPUART1_TXBUFSIZE,
         .buffer     = g_lpuart1txbuffer,
       },
-    #if defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
+#  if defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART1_RXDMA) && !defined(CONFIG_LPUART1_TXDMA)
+#  elif defined(CONFIG_LPUART1_RXDMA) && !defined(CONFIG_LPUART1_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
+#  elif !defined(CONFIG_LPUART1_RXDMA) && defined(CONFIG_LPUART1_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart1priv,
     },
 
@@ -1797,37 +1797,37 @@ static struct s32k3xx_uart_s g_lpuart1priv =
   .parity       = CONFIG_LPUART1_PARITY,
   .bits         = CONFIG_LPUART1_BITS,
   .stopbits2    = CONFIG_LPUART1_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART1_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART1_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART1_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART1_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART1_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART1_TXDMA
+#  ifdef CONFIG_LPUART1_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART19_TX,
-#endif
-#ifdef CONFIG_LPUART1_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART1_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART19_RX,
   .rxfifo        = g_lpuart1rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1846,15 +1846,15 @@ static struct s32k3xx_uart_s g_lpuart2priv =
         .size       = CONFIG_LPUART2_TXBUFSIZE,
         .buffer     = g_lpuart2txbuffer,
       },
-    #if defined(CONFIG_LPUART2_RXDMA) && defined(CONFIG_LPUART2_TXDMA)
+#  if defined(CONFIG_LPUART2_RXDMA) && defined(CONFIG_LPUART2_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART2_RXDMA) && !defined(CONFIG_LPUART2_TXDMA)
+#  elif defined(CONFIG_LPUART2_RXDMA) && !defined(CONFIG_LPUART2_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART2_RXDMA) && defined(CONFIG_LPUART2_TXDMA)
+#  elif !defined(CONFIG_LPUART2_RXDMA) && defined(CONFIG_LPUART2_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart2priv,
     },
 
@@ -1864,37 +1864,37 @@ static struct s32k3xx_uart_s g_lpuart2priv =
   .parity       = CONFIG_LPUART2_PARITY,
   .bits         = CONFIG_LPUART2_BITS,
   .stopbits2    = CONFIG_LPUART2_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART2_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART2_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART2_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART2_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART2_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART2_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART2_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART2_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART2_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART2_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART2_TXDMA
+#  ifdef CONFIG_LPUART2_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART210_TX,
-#endif
-#ifdef CONFIG_LPUART2_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART2_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART210_RX,
   .rxfifo        = g_lpuart2rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1913,15 +1913,15 @@ static struct s32k3xx_uart_s g_lpuart3priv =
         .size       = CONFIG_LPUART3_TXBUFSIZE,
         .buffer     = g_lpuart3txbuffer,
       },
-    #if defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
+#  if defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART3_RXDMA) && !defined(CONFIG_LPUART3_TXDMA)
+#  elif defined(CONFIG_LPUART3_RXDMA) && !defined(CONFIG_LPUART3_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
+#  elif !defined(CONFIG_LPUART3_RXDMA) && defined(CONFIG_LPUART3_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart3priv,
     },
 
@@ -1931,37 +1931,37 @@ static struct s32k3xx_uart_s g_lpuart3priv =
   .parity       = CONFIG_LPUART3_PARITY,
   .bits         = CONFIG_LPUART3_BITS,
   .stopbits2    = CONFIG_LPUART3_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART3_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART3_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART3_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART3_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART3_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART3_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART3_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART3_TX,
-#endif
+  #endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART3_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART3_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART3_TXDMA
+#  ifdef CONFIG_LPUART3_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART311_TX,
-#endif
-#ifdef CONFIG_LPUART3_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART3_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART311_RX,
   .rxfifo        = g_lpuart3rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -1980,15 +1980,15 @@ static struct s32k3xx_uart_s g_lpuart4priv =
         .size       = CONFIG_LPUART4_TXBUFSIZE,
         .buffer     = g_lpuart4txbuffer,
       },
-    #if defined(CONFIG_LPUART4_RXDMA) && defined(CONFIG_LPUART4_TXDMA)
+#  if defined(CONFIG_LPUART4_RXDMA) && defined(CONFIG_LPUART4_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART4_RXDMA) && !defined(CONFIG_LPUART4_TXDMA)
+#  elif defined(CONFIG_LPUART4_RXDMA) && !defined(CONFIG_LPUART4_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART4_RXDMA) && defined(CONFIG_LPUART4_TXDMA)
+#  elif !defined(CONFIG_LPUART4_RXDMA) && defined(CONFIG_LPUART4_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart4priv,
     },
 
@@ -1998,37 +1998,37 @@ static struct s32k3xx_uart_s g_lpuart4priv =
   .parity       = CONFIG_LPUART4_PARITY,
   .bits         = CONFIG_LPUART4_BITS,
   .stopbits2    = CONFIG_LPUART4_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART4_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART4_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART4_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART4_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART4_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART4_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART4_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART4_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART4_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART4_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART4_TXDMA
+#  ifdef CONFIG_LPUART4_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART412_TX,
-#endif
-#ifdef CONFIG_LPUART4_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART4_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART412_RX,
   .rxfifo        = g_lpuart4rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2047,15 +2047,15 @@ static struct s32k3xx_uart_s g_lpuart5priv =
         .size       = CONFIG_LPUART5_TXBUFSIZE,
         .buffer     = g_lpuart5txbuffer,
       },
-    #if defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
+#  if defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART5_RXDMA) && !defined(CONFIG_LPUART5_TXDMA)
+#  elif defined(CONFIG_LPUART5_RXDMA) && !defined(CONFIG_LPUART5_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
+#  elif !defined(CONFIG_LPUART5_RXDMA) && defined(CONFIG_LPUART5_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart5priv,
     },
 
@@ -2065,37 +2065,37 @@ static struct s32k3xx_uart_s g_lpuart5priv =
   .parity       = CONFIG_LPUART5_PARITY,
   .bits         = CONFIG_LPUART5_BITS,
   .stopbits2    = CONFIG_LPUART5_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART5_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART5_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART5_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART5_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART5_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART5_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART5_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART5_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART5_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART5_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART5_TXDMA
+#  ifdef CONFIG_LPUART5_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART513_TX,
-#endif
-#ifdef CONFIG_LPUART5_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART5_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART513_RX,
   .rxfifo        = g_lpuart5rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2114,15 +2114,15 @@ static struct s32k3xx_uart_s g_lpuart6priv =
         .size       = CONFIG_LPUART6_TXBUFSIZE,
         .buffer     = g_lpuart6txbuffer,
       },
-    #if defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
+#  if defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART6_RXDMA) && !defined(CONFIG_LPUART6_TXDMA)
+#  elif defined(CONFIG_LPUART6_RXDMA) && !defined(CONFIG_LPUART6_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
+#  elif !defined(CONFIG_LPUART6_RXDMA) && defined(CONFIG_LPUART6_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart6priv,
     },
 
@@ -2132,37 +2132,37 @@ static struct s32k3xx_uart_s g_lpuart6priv =
   .parity       = CONFIG_LPUART6_PARITY,
   .bits         = CONFIG_LPUART6_BITS,
   .stopbits2    = CONFIG_LPUART6_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART6_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART6_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART6_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART6_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART6_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART6_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART6_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART6_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART6_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART6_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART6_TXDMA
+#  ifdef CONFIG_LPUART6_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART614_TX,
-#endif
-#ifdef CONFIG_LPUART6_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART6_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART614_RX,
   .rxfifo        = g_lpuart6rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2181,15 +2181,15 @@ static struct s32k3xx_uart_s g_lpuart7priv =
         .size       = CONFIG_LPUART7_TXBUFSIZE,
         .buffer     = g_lpuart7txbuffer,
       },
-    #if defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
+#  if defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART7_RXDMA) && !defined(CONFIG_LPUART7_TXDMA)
+#  elif defined(CONFIG_LPUART7_RXDMA) && !defined(CONFIG_LPUART7_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
+#  elif !defined(CONFIG_LPUART7_RXDMA) && defined(CONFIG_LPUART7_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart7priv,
     },
 
@@ -2199,37 +2199,37 @@ static struct s32k3xx_uart_s g_lpuart7priv =
   .parity       = CONFIG_LPUART7_PARITY,
   .bits         = CONFIG_LPUART7_BITS,
   .stopbits2    = CONFIG_LPUART7_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART7_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART7_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART7_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART7_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART7_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART7_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART7_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART7_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART7_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART7_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART7_TXDMA
+#  ifdef CONFIG_LPUART7_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART715_TX,
-#endif
-#ifdef CONFIG_LPUART7_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART7_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART715_RX,
   .rxfifo        = g_lpuart7rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2248,15 +2248,15 @@ static struct s32k3xx_uart_s g_lpuart8priv =
         .size       = CONFIG_LPUART8_TXBUFSIZE,
         .buffer     = g_lpuart8txbuffer,
       },
-    #if defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
+#  if defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART8_RXDMA) && !defined(CONFIG_LPUART8_TXDMA)
+#  elif defined(CONFIG_LPUART8_RXDMA) && !defined(CONFIG_LPUART8_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
+#  elif !defined(CONFIG_LPUART8_RXDMA) && defined(CONFIG_LPUART8_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart8priv,
     },
 
@@ -2266,37 +2266,37 @@ static struct s32k3xx_uart_s g_lpuart8priv =
   .parity       = CONFIG_LPUART8_PARITY,
   .bits         = CONFIG_LPUART8_BITS,
   .stopbits2    = CONFIG_LPUART8_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART8_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART8_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART8_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART8_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART8_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART8_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART8_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART8_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART8_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART8_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART8_TXDMA
+#  ifdef CONFIG_LPUART8_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART08_TX,
-#endif
-#ifdef CONFIG_LPUART8_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART8_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART08_RX,
   .rxfifo        = g_lpuart8rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2315,15 +2315,15 @@ static struct s32k3xx_uart_s g_lpuart9priv =
         .size       = CONFIG_LPUART9_TXBUFSIZE,
         .buffer     = g_lpuart9txbuffer,
       },
-    #if defined(CONFIG_LPUART9_RXDMA) && defined(CONFIG_LPUART9_TXDMA)
+#  if defined(CONFIG_LPUART9_RXDMA) && defined(CONFIG_LPUART9_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART9_RXDMA) && !defined(CONFIG_LPUART9_TXDMA)
+#  elif defined(CONFIG_LPUART9_RXDMA) && !defined(CONFIG_LPUART9_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART9_RXDMA) && defined(CONFIG_LPUART9_TXDMA)
+#  elif !defined(CONFIG_LPUART9_RXDMA) && defined(CONFIG_LPUART9_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart9priv,
     },
 
@@ -2333,37 +2333,37 @@ static struct s32k3xx_uart_s g_lpuart9priv =
   .parity       = CONFIG_LPUART9_PARITY,
   .bits         = CONFIG_LPUART9_BITS,
   .stopbits2    = CONFIG_LPUART9_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART9_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART9_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART9_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART9_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART9_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART9_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART9_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART9_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART9_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART9_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART9_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART9_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART9_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART9_TXDMA
+#  ifdef CONFIG_LPUART9_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART19_TX,
-#endif
-#ifdef CONFIG_LPUART9_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART9_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART19_RX,
   .rxfifo        = g_lpuart9rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2382,15 +2382,15 @@ static struct s32k3xx_uart_s g_lpuart10priv =
         .size       = CONFIG_LPUART10_TXBUFSIZE,
         .buffer     = g_lpuart10txbuffer,
       },
-    #if defined(CONFIG_LPUART10_RXDMA) && defined(CONFIG_LPUART10_TXDMA)
+#  if defined(CONFIG_LPUART10_RXDMA) && defined(CONFIG_LPUART10_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART10_RXDMA) && !defined(CONFIG_LPUART10_TXDMA)
+#  elif defined(CONFIG_LPUART10_RXDMA) && !defined(CONFIG_LPUART10_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART10_RXDMA) && defined(CONFIG_LPUART10_TXDMA)
+#  elif !defined(CONFIG_LPUART10_RXDMA) && defined(CONFIG_LPUART10_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart10priv,
     },
 
@@ -2400,37 +2400,37 @@ static struct s32k3xx_uart_s g_lpuart10priv =
   .parity       = CONFIG_LPUART10_PARITY,
   .bits         = CONFIG_LPUART10_BITS,
   .stopbits2    = CONFIG_LPUART10_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART10_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART10_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART10_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART10_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART10_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART10_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART10_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART10_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART10_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART10_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART10_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART10_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART10_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART10_TXDMA
+#  ifdef CONFIG_LPUART10_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART210_TX,
-#endif
-#ifdef CONFIG_LPUART10_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART10_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART210_RX,
   .rxfifo        = g_lpuart10rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2449,15 +2449,15 @@ static struct s32k3xx_uart_s g_lpuart11priv =
         .size       = CONFIG_LPUART11_TXBUFSIZE,
         .buffer     = g_lpuart11txbuffer,
       },
-    #if defined(CONFIG_LPUART11_RXDMA) && defined(CONFIG_LPUART11_TXDMA)
+#  if defined(CONFIG_LPUART11_RXDMA) && defined(CONFIG_LPUART11_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART11_RXDMA) && !defined(CONFIG_LPUART11_TXDMA)
+#  elif defined(CONFIG_LPUART11_RXDMA) && !defined(CONFIG_LPUART11_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART11_RXDMA) && defined(CONFIG_LPUART11_TXDMA)
+#  elif !defined(CONFIG_LPUART11_RXDMA) && defined(CONFIG_LPUART11_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart11priv,
     },
 
@@ -2467,37 +2467,37 @@ static struct s32k3xx_uart_s g_lpuart11priv =
   .parity       = CONFIG_LPUART11_PARITY,
   .bits         = CONFIG_LPUART11_BITS,
   .stopbits2    = CONFIG_LPUART11_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART11_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART11_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART11_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART11_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART11_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART11_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART11_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART11_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART11_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART11_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART11_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART11_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART11_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART11_TXDMA
+#  ifdef CONFIG_LPUART11_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART311_TX,
-#endif
-#ifdef CONFIG_LPUART11_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART11_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART311_RX,
   .rxfifo        = g_lpuart11rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2516,15 +2516,15 @@ static struct s32k3xx_uart_s g_lpuart12priv =
         .size       = CONFIG_LPUART12_TXBUFSIZE,
         .buffer     = g_lpuart12txbuffer,
       },
-    #if defined(CONFIG_LPUART12_RXDMA) && defined(CONFIG_LPUART12_TXDMA)
+#  if defined(CONFIG_LPUART12_RXDMA) && defined(CONFIG_LPUART12_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART12_RXDMA) && !defined(CONFIG_LPUART12_TXDMA)
+#  elif defined(CONFIG_LPUART12_RXDMA) && !defined(CONFIG_LPUART12_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART12_RXDMA) && defined(CONFIG_LPUART12_TXDMA)
+#  elif !defined(CONFIG_LPUART12_RXDMA) && defined(CONFIG_LPUART12_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart12priv,
     },
 
@@ -2534,37 +2534,37 @@ static struct s32k3xx_uart_s g_lpuart12priv =
   .parity       = CONFIG_LPUART12_PARITY,
   .bits         = CONFIG_LPUART12_BITS,
   .stopbits2    = CONFIG_LPUART12_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART12_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART12_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART12_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART12_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART12_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART12_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART12_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART12_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART12_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART12_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART12_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART12_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART12_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART12_TXDMA
+#  ifdef CONFIG_LPUART12_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART412_TX,
-#endif
-#ifdef CONFIG_LPUART12_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART12_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART412_RX,
   .rxfifo        = g_lpuart12rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2583,15 +2583,15 @@ static struct s32k3xx_uart_s g_lpuart13priv =
         .size       = CONFIG_LPUART13_TXBUFSIZE,
         .buffer     = g_lpuart13txbuffer,
       },
-    #if defined(CONFIG_LPUART13_RXDMA) && defined(CONFIG_LPUART13_TXDMA)
+#  if defined(CONFIG_LPUART13_RXDMA) && defined(CONFIG_LPUART13_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART13_RXDMA) && !defined(CONFIG_LPUART13_TXDMA)
+#  elif defined(CONFIG_LPUART13_RXDMA) && !defined(CONFIG_LPUART13_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART13_RXDMA) && defined(CONFIG_LPUART13_TXDMA)
+#  elif !defined(CONFIG_LPUART13_RXDMA) && defined(CONFIG_LPUART13_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart13priv,
     },
 
@@ -2601,37 +2601,37 @@ static struct s32k3xx_uart_s g_lpuart13priv =
   .parity       = CONFIG_LPUART13_PARITY,
   .bits         = CONFIG_LPUART13_BITS,
   .stopbits2    = CONFIG_LPUART13_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART13_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART13_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART13_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART13_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART13_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART13_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART13_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART13_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART13_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART13_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART13_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART13_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART13_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART13_TXDMA
+#  ifdef CONFIG_LPUART13_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART513_TX,
-#endif
-#ifdef CONFIG_LPUART13_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART13_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART513_RX,
   .rxfifo        = g_lpuart13rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2650,15 +2650,15 @@ static struct s32k3xx_uart_s g_lpuart14priv =
         .size       = CONFIG_LPUART14_TXBUFSIZE,
         .buffer     = g_lpuart14txbuffer,
       },
-    #if defined(CONFIG_LPUART14_RXDMA) && defined(CONFIG_LPUART14_TXDMA)
+#  if defined(CONFIG_LPUART14_RXDMA) && defined(CONFIG_LPUART14_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART14_RXDMA) && !defined(CONFIG_LPUART14_TXDMA)
+#  elif defined(CONFIG_LPUART14_RXDMA) && !defined(CONFIG_LPUART14_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART14_RXDMA) && defined(CONFIG_LPUART14_TXDMA)
+#  elif !defined(CONFIG_LPUART14_RXDMA) && defined(CONFIG_LPUART14_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart14priv,
     },
 
@@ -2668,37 +2668,37 @@ static struct s32k3xx_uart_s g_lpuart14priv =
   .parity       = CONFIG_LPUART14_PARITY,
   .bits         = CONFIG_LPUART14_BITS,
   .stopbits2    = CONFIG_LPUART14_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART14_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART14_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART14_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART14_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART14_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART14_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART14_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART14_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART14_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART14_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART14_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART14_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART14_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART14_TXDMA
+#  ifdef CONFIG_LPUART14_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART614_TX,
-#endif
-#ifdef CONFIG_LPUART14_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART14_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART614_RX,
   .rxfifo        = g_lpuart14rxfifo,
-#endif
+#  endif
 };
 #endif
 
@@ -2717,15 +2717,15 @@ static struct s32k3xx_uart_s g_lpuart15priv =
         .size       = CONFIG_LPUART15_TXBUFSIZE,
         .buffer     = g_lpuart15txbuffer,
       },
-    #if defined(CONFIG_LPUART15_RXDMA) && defined(CONFIG_LPUART15_TXDMA)
+#  if defined(CONFIG_LPUART15_RXDMA) && defined(CONFIG_LPUART15_TXDMA)
         .ops       = &g_lpuart_rxtxdma_ops,
-    #elif defined(CONFIG_LPUART15_RXDMA) && !defined(CONFIG_LPUART15_TXDMA)
+#  elif defined(CONFIG_LPUART15_RXDMA) && !defined(CONFIG_LPUART15_TXDMA)
         .ops       = &g_lpuart_rxdma_ops,
-    #elif !defined(CONFIG_LPUART15_RXDMA) && defined(CONFIG_LPUART15_TXDMA)
+#  elif !defined(CONFIG_LPUART15_RXDMA) && defined(CONFIG_LPUART15_TXDMA)
         .ops       = &g_lpuart_txdma_ops,
-    #else
+#  else
         .ops       = &g_lpuart_ops,
-    #endif
+#  endif
       .priv         = &g_lpuart15priv,
     },
 
@@ -2735,37 +2735,37 @@ static struct s32k3xx_uart_s g_lpuart15priv =
   .parity       = CONFIG_LPUART15_PARITY,
   .bits         = CONFIG_LPUART15_BITS,
   .stopbits2    = CONFIG_LPUART15_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART15_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART15_OFLOWCONTROL)
   .oflow        = 1,
   .cts_gpio     = PIN_LPUART15_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART15_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART15_IFLOWCONTROL)
   .iflow        = 1,
-#endif
-# if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART15_RS485RTSCONTROL)) || \
+#  endif
+#  if ((defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART15_RS485RTSCONTROL)) || \
       (defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART15_IFLOWCONTROL)))
   .rts_gpio     = PIN_LPUART15_RTS,
-#endif
-#ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
+#  endif
+#  ifdef CONFIG_S32K3XX_LPUART_SINGLEWIRE
   .tx_gpio      = PIN_LPUART15_TX,
-#endif
+#  endif
 
-#if   (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
+#  if (defined(CONFIG_SERIAL_RS485CONTROL) || defined(CONFIG_SERIAL_IFLOWCONTROL)) && \
       defined(CONFIG_LPUART15_INVERTIFLOWCONTROL)
   .inviflow     = 1,
-#endif
+#  endif
 
-#if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART15_RS485RTSCONTROL)
+#  if defined(CONFIG_SERIAL_RS485CONTROL) && defined(CONFIG_LPUART15_RS485RTSCONTROL)
   .rs485mode    = 1,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART15_TXDMA
+#  ifdef CONFIG_LPUART15_TXDMA
   .dma_txreqsrc = DMA_REQ_LPUART715_TX,
-#endif
-#ifdef CONFIG_LPUART15_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART15_RXDMA
   .dma_rxreqsrc = DMA_REQ_LPUART715_RX,
   .rxfifo        = g_lpuart15rxfifo,
-#endif
+#  endif
 };
 #endif
 
diff --git a/arch/arm/src/sam34/hardware/sam4l_bpm.h b/arch/arm/src/sam34/hardware/sam4l_bpm.h
index 03809efe65..5b4c1eb404 100644
--- a/arch/arm/src/sam34/hardware/sam4l_bpm.h
+++ b/arch/arm/src/sam34/hardware/sam4l_bpm.h
@@ -105,10 +105,10 @@
 #define BPM_PMCON_RET                (1 << 9)  /* Bit 9:  RETENTION Mode */
 #define BPM_PMCON_SLEEP_SHIFT        (12)      /* Bits 12-13: SLEEP mode Configuration */
 #define BPM_PMCON_SLEEP_MASK         (3 << BPM_PMCON_SLEEP_SHIFT)
-# define BPM_PMCON_SLEEP_SLEEP0      (0 << BPM_PMCON_SLEEP_SHIFT) /* CPU clock stopped */
-# define BPM_PMCON_SLEEP_SLEEP1      (1 << BPM_PMCON_SLEEP_SHIFT) /* CPU+AHB clocks stopped */
-# define BPM_PMCON_SLEEP_SLEEP2      (2 << BPM_PMCON_SLEEP_SHIFT) /* CPU+AHB+PB+GCLK clocks stopped */
-# define BPM_PMCON_SLEEP_SLEEP3      (3 << BPM_PMCON_SLEEP_SHIFT) /* CPU+AHB+PB+GCLK+sources stopped */
+#  define BPM_PMCON_SLEEP_SLEEP0     (0 << BPM_PMCON_SLEEP_SHIFT) /* CPU clock stopped */
+#  define BPM_PMCON_SLEEP_SLEEP1     (1 << BPM_PMCON_SLEEP_SHIFT) /* CPU+AHB clocks stopped */
+#  define BPM_PMCON_SLEEP_SLEEP2     (2 << BPM_PMCON_SLEEP_SHIFT) /* CPU+AHB+PB+GCLK clocks stopped */
+#  define BPM_PMCON_SLEEP_SLEEP3     (3 << BPM_PMCON_SLEEP_SHIFT) /* CPU+AHB+PB+GCLK+sources stopped */
 
 #define BPM_PMCON_CK32S              (1 << 16) /* Bit 16: 32kHz-1kHz Clock Source Selection */
 #define BPM_PMCON_FASTWKUP           (1 << 24) /* Bit 24: Fast Wakeup */
diff --git a/arch/arm/src/sam34/hardware/sam4l_picouart.h b/arch/arm/src/sam34/hardware/sam4l_picouart.h
index 4a6821a44f..674c85dc26 100644
--- a/arch/arm/src/sam34/hardware/sam4l_picouart.h
+++ b/arch/arm/src/sam34/hardware/sam4l_picouart.h
@@ -66,10 +66,10 @@
 
 #define PICOUART_CFG_SOURCE_SHIFT    (0)       /* Bit 0-1: Source Enable Mode */
 #define PICOUART_CFG_SOURCE_MASK     (3 << PICOUART_CFG_SOURCE_SHIFT)
-# define PICOUART_CFG_SOURCE_WE      (0 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up and event disable */
-# define PICOUART_CFG_SOURCE_WESB    (1 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up or event enable on start bit detection */
-# define PICOUART_CFG_SOURCE_WEFF    (2 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up or event enable on full frame reception */
-# define PICOUART_CFG_SOURCE_WECH    (3 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up or event enable on character recognition */
+#  define PICOUART_CFG_SOURCE_WE     (0 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up and event disable */
+#  define PICOUART_CFG_SOURCE_WESB   (1 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up or event enable on start bit detection */
+#  define PICOUART_CFG_SOURCE_WEFF   (2 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up or event enable on full frame reception */
+#  define PICOUART_CFG_SOURCE_WECH   (3 << PICOUART_CFG_SOURCE_SHIFT) /* Wake up or event enable on character recognition */
 
 #define PICOUART_CFG_ACTION          (1 << 0)  /* Bit 0: Action to perform */
 #define PICOUART_CFG_MATCH_SHIFT     (8)       /* Bit 8-15: Data Match */
diff --git a/arch/arm/src/sam34/hardware/sam_afec.h b/arch/arm/src/sam34/hardware/sam_afec.h
index cafb4e638e..dd616ab8e8 100644
--- a/arch/arm/src/sam34/hardware/sam_afec.h
+++ b/arch/arm/src/sam34/hardware/sam_afec.h
@@ -209,12 +209,12 @@
 #  define AFEC_EMR_CMPFILTER(n)      ((uint32_t)(n) << AFEC_EMR_CMPFILTER_SHIFT)
 #define AFEC_EMR_RES_SHIFT           (16)      /* Bits 16-18: Resolution */
 #define AFEC_EMR_RES_MASK            (7 << AFEC_EMR_RES_SHIFT)
-# define AFEC_EMR_RES_NOAVG          (0 << AFEC_EMR_RES_SHIFT) /* 12-bit resolution, AFEC sample rate is maximum (no averaging) */
-# define AFEC_EMR_RES_LOWRES         (1 << AFEC_EMR_RES_SHIFT) /* 10-bit resolution, AFEC sample rate is maximum (no averaging) */
-# define AFEC_EMR_RES_OSR4           (2 << AFEC_EMR_RES_SHIFT) /* 13-bit resolution, AFEC sample rate divided by 4 (averaging) */
-# define AFEC_EMR_RES_OSR16          (3 << AFEC_EMR_RES_SHIFT) /* 14-bit resolution, AFEC sample rate divided by 16 (averaging) */
-# define AFEC_EMR_RES_OSR64          (4 << AFEC_EMR_RES_SHIFT) /* 15-bit resolution, AFEC sample rate divided by 64 (averaging) */
-# define AFEC_EMR_RES_OSR256         (5 << AFEC_EMR_RES_SHIFT) /* 16-bit resolution, AFEC sample rate divided by 256 (averaging) */
+#  define AFEC_EMR_RES_NOAVG         (0 << AFEC_EMR_RES_SHIFT) /* 12-bit resolution, AFEC sample rate is maximum (no averaging) */
+#  define AFEC_EMR_RES_LOWRES        (1 << AFEC_EMR_RES_SHIFT) /* 10-bit resolution, AFEC sample rate is maximum (no averaging) */
+#  define AFEC_EMR_RES_OSR4          (2 << AFEC_EMR_RES_SHIFT) /* 13-bit resolution, AFEC sample rate divided by 4 (averaging) */
+#  define AFEC_EMR_RES_OSR16         (3 << AFEC_EMR_RES_SHIFT) /* 14-bit resolution, AFEC sample rate divided by 16 (averaging) */
+#  define AFEC_EMR_RES_OSR64         (4 << AFEC_EMR_RES_SHIFT) /* 15-bit resolution, AFEC sample rate divided by 64 (averaging) */
+#  define AFEC_EMR_RES_OSR256        (5 << AFEC_EMR_RES_SHIFT) /* 16-bit resolution, AFEC sample rate divided by 256 (averaging) */
 
 #define AFEC_EMR_TAG                 (1 << 24) /* Bit 24: TAG of the AFEC_LDCR register */
 #define AFEC_EMR_STM                 (1 << 25) /* Bit 25: Single Trigger Mode */
diff --git a/arch/arm/src/sam34/sam4s_nand.h b/arch/arm/src/sam34/sam4s_nand.h
index e1fbe485af..23dbb10353 100644
--- a/arch/arm/src/sam34/sam4s_nand.h
+++ b/arch/arm/src/sam34/sam4s_nand.h
@@ -47,7 +47,7 @@
 /* Only NCS0 can support NAND.  The rest is a fantasy */
 
 #if defined(CONFIG_SAM34_EXTNAND)
-  # define CONFIG_SAM34_NCS0_NAND 1
+  #  define CONFIG_SAM34_NCS0_NAND 1
 #else
   # undef CONFIG_SAM34_NCS0_NAND
 #endif
diff --git a/arch/arm/src/sam34/sam_emac.c b/arch/arm/src/sam34/sam_emac.c
index 490f4dc7bb..e215297a34 100644
--- a/arch/arm/src/sam34/sam_emac.c
+++ b/arch/arm/src/sam34/sam_emac.c
@@ -329,8 +329,8 @@ static uint32_t sam_getreg(struct sam_emac_s *priv, uintptr_t addr);
 static void sam_putreg(struct sam_emac_s *priv,
                        uintptr_t addr, uint32_t val);
 #else
-# define sam_getreg(priv,addr)      getreg32(addr)
-# define sam_putreg(priv,addr,val)  putreg32(val,addr)
+#  define sam_getreg(priv,addr)     getreg32(addr)
+#  define sam_putreg(priv,addr,val) putreg32(val,addr)
 #endif
 
 /* Buffer management */
diff --git a/arch/arm/src/sam34/sam_rtc.c b/arch/arm/src/sam34/sam_rtc.c
index 17e60ea5b3..f0661dfa51 100644
--- a/arch/arm/src/sam34/sam_rtc.c
+++ b/arch/arm/src/sam34/sam_rtc.c
@@ -52,12 +52,12 @@
 /* Configuration ************************************************************/
 
 #ifdef CONFIG_RTC_HIRES
-# if !defined(CONFIG_SAM34_RTT)
-#  error RTT is required to emulate high resolution RTC
-# endif
-# if (CONFIG_RTC_FREQUENCY > 32768) || ((32768 % CONFIG_RTC_FREQUENCY) != 0)
-#  error CONFIG_RTC_FREQUENCY must be an integer division of 32768
-# endif
+#  if !defined(CONFIG_SAM34_RTT)
+#    error RTT is required to emulate high resolution RTC
+#  endif
+#  if (CONFIG_RTC_FREQUENCY > 32768) || ((32768 % CONFIG_RTC_FREQUENCY) != 0)
+#    error CONFIG_RTC_FREQUENCY must be an integer division of 32768
+#   endif
 #endif
 
 #if defined(CONFIG_RTC_ALARM) && !defined(CONFIG_SCHED_WORKQUEUE)
diff --git a/arch/arm/src/sam34/sam_rtt.c b/arch/arm/src/sam34/sam_rtt.c
index 80d6eeefdf..7ae534564a 100644
--- a/arch/arm/src/sam34/sam_rtt.c
+++ b/arch/arm/src/sam34/sam_rtt.c
@@ -99,8 +99,8 @@ struct sam34_lowerhalf_s
 static uint32_t sam34_getreg(uint32_t addr);
 static void     sam34_putreg(uint32_t val, uint32_t addr);
 #else
-# define        sam34_getreg(addr)     getreg32(addr)
-# define        sam34_putreg(val,addr) putreg32(val,addr)
+#  define       sam34_getreg(addr)     getreg32(addr)
+#  define       sam34_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/sam34/sam_spi.c b/arch/arm/src/sam34/sam_spi.c
index 5e35a71d0c..4ecfea4128 100644
--- a/arch/arm/src/sam34/sam_spi.c
+++ b/arch/arm/src/sam34/sam_spi.c
@@ -214,7 +214,7 @@ struct sam_spidev_s
 static bool     spi_checkreg(struct sam_spidev_s *spi, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        spi_checkreg(spi,wr,value,address) (false)
+#  define       spi_checkreg(spi,wr,value,address) (false)
 #endif
 
 static inline uint32_t spi_getreg(struct sam_spidev_s *spi,
@@ -226,7 +226,7 @@ static inline struct sam_spidev_s *spi_device(struct sam_spics_s *spics);
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     spi_dumpregs(struct sam_spidev_s *spi, const char *msg);
 #else
-# define        spi_dumpregs(spi,msg)
+#  define       spi_dumpregs(spi,msg)
 #endif
 
 static inline void spi_flush(struct sam_spidev_s *spi);
diff --git a/arch/arm/src/sam34/sam_tc.c b/arch/arm/src/sam34/sam_tc.c
index 45d50e4af8..5bfb0d11f2 100644
--- a/arch/arm/src/sam34/sam_tc.c
+++ b/arch/arm/src/sam34/sam_tc.c
@@ -97,8 +97,8 @@ struct sam34_lowerhalf_s
 static uint32_t sam34_getreg(uint32_t addr);
 static void     sam34_putreg(uint32_t val, uint32_t addr);
 #else
-# define        sam34_getreg(addr)     getreg32(addr)
-# define        sam34_putreg(val,addr) putreg32(val,addr)
+#  define       sam34_getreg(addr)     getreg32(addr)
+#  define       sam34_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/sam34/sam_twi.c b/arch/arm/src/sam34/sam_twi.c
index 3cd93c2f41..eae14a5643 100644
--- a/arch/arm/src/sam34/sam_twi.c
+++ b/arch/arm/src/sam34/sam_twi.c
@@ -148,9 +148,9 @@ static uint32_t twi_getabs(struct twi_dev_s *priv, uintptr_t address);
 static void twi_putabs(struct twi_dev_s *priv, uintptr_t address,
               uint32_t value);
 #else
-# define    twi_checkreg(priv,wr,value,address) (false)
-# define    twi_putabs(p,a,v) putreg32(v,a)
-# define    twi_getabs(p,a) getreg32(a)
+#  define   twi_checkreg(priv,wr,value,address) (false)
+#  define   twi_putabs(p,a,v) putreg32(v,a)
+#  define   twi_getabs(p,a) getreg32(a)
 #endif
 
 static inline uint32_t twi_getrel(struct twi_dev_s *priv,
diff --git a/arch/arm/src/sam34/sam_udp.c b/arch/arm/src/sam34/sam_udp.c
index d9fdca2e5b..cab91708c4 100644
--- a/arch/arm/src/sam34/sam_udp.c
+++ b/arch/arm/src/sam34/sam_udp.c
@@ -329,7 +329,7 @@ static void   sam_dumpep(struct sam_usbdev_s *priv, uint8_t epno);
 #else
 static inline uint32_t sam_getreg(uintptr_t regaddr);
 static inline void sam_putreg(uint32_t regval, uintptr_t regaddr);
-# define sam_dumpep(priv,epno)
+#  define sam_dumpep(priv,epno)
 #endif
 
 static void   sam_csr_setbits(uint8_t epno, uint32_t setbits);
diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c
index aa3f8cec82..4e5af9e140 100644
--- a/arch/arm/src/sam34/sam_wdt.c
+++ b/arch/arm/src/sam34/sam_wdt.c
@@ -103,8 +103,8 @@ struct sam34_lowerhalf_s
 static uint32_t sam34_getreg(uint32_t addr);
 static void     sam34_putreg(uint32_t val, uint32_t addr);
 #else
-# define        sam34_getreg(addr)     getreg32(addr)
-# define        sam34_putreg(val,addr) putreg32(val,addr)
+#  define       sam34_getreg(addr)     getreg32(addr)
+#  define       sam34_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/sama5/hardware/sam_gmac.h b/arch/arm/src/sama5/hardware/sam_gmac.h
index 42180aff1b..ef72e2aea7 100644
--- a/arch/arm/src/sama5/hardware/sam_gmac.h
+++ b/arch/arm/src/sama5/hardware/sam_gmac.h
@@ -1002,10 +1002,10 @@
 #define GMACRXD_STA_SNAP          (1 << 24) /* Bit 24: Frame was SNAP encoded */
 #define GMACRXD_STA_ADDR_SHIFT    (25)      /* Bits 25-26: Specific Address Register match */
 #define GMACRXD_STA_ADDR_MASK     (3 << GMACRXD_STA_ADDR_SHIFT)
-# define GMACRXD_STA_ADDR1_MATCH  (0 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 1 match */
-# define GMACRXD_STA_ADDR2_MATCH  (1 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 2 match */
-# define GMACRXD_STA_ADDR3_MATCH  (2 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 3 match */
-# define GMACRXD_STA_ADDR4_MATCH  (3 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 4 match */
+#  define GMACRXD_STA_ADDR1_MATCH (0 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 1 match */
+#  define GMACRXD_STA_ADDR2_MATCH (1 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 2 match */
+#  define GMACRXD_STA_ADDR3_MATCH (2 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 3 match */
+#  define GMACRXD_STA_ADDR4_MATCH (3 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 4 match */
 
 #define GMACRXD_STA_ADDRMATCH     (1 << 27) /* Bit 27: Specific Address Register match found */
                                             /* Bit 28: Reserved */
diff --git a/arch/arm/src/sama5/hardware/sam_sdmmc.h b/arch/arm/src/sama5/hardware/sam_sdmmc.h
index 0439f13ca6..9fe4f12d2c 100644
--- a/arch/arm/src/sama5/hardware/sam_sdmmc.h
+++ b/arch/arm/src/sama5/hardware/sam_sdmmc.h
@@ -591,9 +591,9 @@ enum bus_mode
  */
 
 #ifdef CONFIG_SAMA5_SDMMC_50MHZ
-# define SAMA5_SDMMC_BUS_SPEED 50000000
+#  define SAMA5_SDMMC_BUS_SPEED 50000000
 #else
-# define SAMA5_SDMMC_BUS_SPEED 25000000
+#  define SAMA5_SDMMC_BUS_SPEED 25000000
 #endif
 
 /* SDMA default buffer size - needed to reset the start address after an SDMA
diff --git a/arch/arm/src/sama5/hardware/sam_trng.h b/arch/arm/src/sama5/hardware/sam_trng.h
index 8806bcf120..5975544638 100644
--- a/arch/arm/src/sama5/hardware/sam_trng.h
+++ b/arch/arm/src/sama5/hardware/sam_trng.h
@@ -58,7 +58,7 @@
 #  define TRNG_CR_DISABLE         (0)       /* Bit 0:  0=Disables the TRNG */
 #define TRNG_CR_KEY_SHIFT         (8)       /* Bits 8-31: Security key */
 #define TRNG_CR_KEY_MASK          (0xffffff << TRNG_CR_KEY_SHIFT)
-# define TRNG_CR_KEY              (0x524e47 << TRNG_CR_KEY_SHIFT) /* RNG in ASCII */
+#  define TRNG_CR_KEY             (0x524e47 << TRNG_CR_KEY_SHIFT) /* RNG in ASCII */
 
 /* Interrupt Enable Register,
  * Interrupt Disable Register, Interrupt Mask Register,
diff --git a/arch/arm/src/sama5/sam_allocateheap.c b/arch/arm/src/sama5/sam_allocateheap.c
index b2293be8f9..90bd2cdcbd 100644
--- a/arch/arm/src/sama5/sam_allocateheap.c
+++ b/arch/arm/src/sama5/sam_allocateheap.c
@@ -131,7 +131,7 @@
 #    error CONFIG_SAMA5_DDRCS_HEAP_END is beyond CONFIG_RAM_VEND
 #  elif CONFIG_SAMA5_DDRCS_HEAP_END < CONFIG_RAM_VSTART
 #    error CONFIG_SAMA5_DDRCS_HEAP_END is before CONFIG_RAM_VSTART
-# endif
+#  endif
 
 #  define SAMA5_PRIMARY_HEAP_END CONFIG_SAMA5_DDRCS_HEAP_END
 #else
diff --git a/arch/arm/src/sama5/sam_emaca.c b/arch/arm/src/sama5/sam_emaca.c
index 6af9c6d347..9e19eaf478 100644
--- a/arch/arm/src/sama5/sam_emaca.c
+++ b/arch/arm/src/sama5/sam_emaca.c
@@ -360,8 +360,8 @@ static uint32_t sam_getreg(struct sam_emac_s *priv, uintptr_t addr);
 static void sam_putreg(struct sam_emac_s *priv,
                        uintptr_t addr, uint32_t val);
 #else
-# define sam_getreg(priv,addr)      getreg32(addr)
-# define sam_putreg(priv,addr,val)  putreg32(val,addr)
+#  define sam_getreg(priv,addr)     getreg32(addr)
+#  define sam_putreg(priv,addr,val) putreg32(val,addr)
 #endif
 
 /* Buffer management */
diff --git a/arch/arm/src/sama5/sam_flexcom_spi.c b/arch/arm/src/sama5/sam_flexcom_spi.c
index 2c3a2db464..29c85cd208 100644
--- a/arch/arm/src/sama5/sam_flexcom_spi.c
+++ b/arch/arm/src/sama5/sam_flexcom_spi.c
@@ -235,7 +235,7 @@ static inline struct sam_flex_spidev_s
 static void     flex_spi_dumpregs(struct sam_flex_spidev_s *flex_spi,
                                   const char *msg);
 #else
-# define        flex_spi_dumpregs(flex_spi,msg)
+#  define       flex_spi_dumpregs(flex_spi,msg)
 #endif
 
 static inline void flex_spi_flush(struct sam_flex_spidev_s *flex_spi);
diff --git a/arch/arm/src/sama5/sam_gmac.c b/arch/arm/src/sama5/sam_gmac.c
index fc54473a7c..07cce97b9e 100644
--- a/arch/arm/src/sama5/sam_gmac.c
+++ b/arch/arm/src/sama5/sam_gmac.c
@@ -285,8 +285,8 @@ static uint32_t sam_getreg(struct sam_gmac_s *priv, uintptr_t addr);
 static void sam_putreg(struct sam_gmac_s *priv, uintptr_t addr,
                        uint32_t val);
 #else
-# define sam_getreg(priv,addr)      getreg32(addr)
-# define sam_putreg(priv,addr,val)  putreg32(val,addr)
+#  define sam_getreg(priv,addr)     getreg32(addr)
+#  define sam_putreg(priv,addr,val) putreg32(val,addr)
 #endif
 
 /* Buffer management */
diff --git a/arch/arm/src/sama5/sam_hsmci.c b/arch/arm/src/sama5/sam_hsmci.c
index 749f3143e0..1c4475ec41 100644
--- a/arch/arm/src/sama5/sam_hsmci.c
+++ b/arch/arm/src/sama5/sam_hsmci.c
@@ -458,7 +458,7 @@ struct sam_dev_s
 static bool sam_checkreg(struct sam_dev_s *priv, bool wr,
               uint32_t value, uint32_t address);
 #else
-# define    sam_checkreg(priv,wr,value,address) (false)
+#  define   sam_checkreg(priv,wr,value,address) (false)
 #endif
 
 static inline uint32_t sam_getreg(struct sam_dev_s *priv,
diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c
index 72711ed096..c3db4d59fd 100644
--- a/arch/arm/src/sama5/sam_ohci.c
+++ b/arch/arm/src/sama5/sam_ohci.c
@@ -338,8 +338,8 @@ static void sam_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t sam_getreg(uint32_t addr);
 static void sam_putreg(uint32_t val, uint32_t addr);
 #else
-# define sam_getreg(addr)     getreg32(addr)
-# define sam_putreg(val,addr) putreg32(val,addr)
+#  define sam_getreg(addr)     getreg32(addr)
+#  define sam_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Byte stream access helper functions **************************************/
diff --git a/arch/arm/src/sama5/sam_pwm.c b/arch/arm/src/sama5/sam_pwm.c
index 3c2144694c..fb76d80320 100644
--- a/arch/arm/src/sama5/sam_pwm.c
+++ b/arch/arm/src/sama5/sam_pwm.c
@@ -302,7 +302,7 @@ static bool pwm_checkreg(struct sam_pwm_s *chan,
                          bool wr, uint32_t regval,
                          uintptr_t regaddr);
 #else
-# define pwm_checkreg(chan,wr,regval,regaddr) (false)
+#  define pwm_checkreg(chan,wr,regval,regaddr) (false)
 #endif
 
 static uint32_t pwm_getreg(struct sam_pwm_chan_s *chan, int offset);
diff --git a/arch/arm/src/sama5/sam_spi.c b/arch/arm/src/sama5/sam_spi.c
index e7b7746415..6d9037e1c0 100644
--- a/arch/arm/src/sama5/sam_spi.c
+++ b/arch/arm/src/sama5/sam_spi.c
@@ -201,7 +201,7 @@ struct sam_spidev_s
 static bool     spi_checkreg(struct sam_spidev_s *spi, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        spi_checkreg(spi,wr,value,address) (false)
+#  define       spi_checkreg(spi,wr,value,address) (false)
 #endif
 
 static inline uint32_t spi_getreg(struct sam_spidev_s *spi,
@@ -213,7 +213,7 @@ static inline struct sam_spidev_s *spi_device(struct sam_spics_s *spics);
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     spi_dumpregs(struct sam_spidev_s *spi, const char *msg);
 #else
-# define        spi_dumpregs(spi,msg)
+#  define       spi_dumpregs(spi,msg)
 #endif
 
 static inline void spi_flush(struct sam_spidev_s *spi);
diff --git a/arch/arm/src/sama5/sam_ssc.c b/arch/arm/src/sama5/sam_ssc.c
index 5277a11619..20d33e769a 100644
--- a/arch/arm/src/sama5/sam_ssc.c
+++ b/arch/arm/src/sama5/sam_ssc.c
@@ -496,7 +496,7 @@ struct sam_ssc_s
 static bool     ssc_checkreg(struct sam_ssc_s *priv, bool wr,
                   uint32_t regval, uint32_t regaddr);
 #else
-# define        ssc_checkreg(priv,wr,regval,regaddr) (false)
+#  define       ssc_checkreg(priv,wr,regval,regaddr) (false)
 #endif
 
 static inline uint32_t ssc_getreg(struct sam_ssc_s *priv,
diff --git a/arch/arm/src/sama5/sam_twi.c b/arch/arm/src/sama5/sam_twi.c
index aa83c8c836..43c4c16fd6 100644
--- a/arch/arm/src/sama5/sam_twi.c
+++ b/arch/arm/src/sama5/sam_twi.c
@@ -197,9 +197,9 @@ static uint32_t twi_getabs(struct twi_dev_s *priv, uintptr_t address);
 static void twi_putabs(struct twi_dev_s *priv, uintptr_t address,
               uint32_t value);
 #else
-# define    twi_checkreg(priv,wr,value,address) (false)
-# define    twi_putabs(p,a,v) putreg32(v,a)
-# define    twi_getabs(p,a) getreg32(a)
+#  define   twi_checkreg(priv,wr,value,address) (false)
+#  define   twi_putabs(p,a,v) putreg32(v,a)
+#  define   twi_getabs(p,a) getreg32(a)
 #endif
 
 static inline uint32_t twi_getrel(struct twi_dev_s *priv,
diff --git a/arch/arm/src/sama5/sam_udphs.c b/arch/arm/src/sama5/sam_udphs.c
index c1f9e0e4c8..a834077e5f 100644
--- a/arch/arm/src/sama5/sam_udphs.c
+++ b/arch/arm/src/sama5/sam_udphs.c
@@ -395,7 +395,7 @@ static void   sam_dumpep(struct sam_usbdev_s *priv, int epno);
 #else
 static inline uint32_t sam_getreg(uintptr_t regaddr);
 static inline void sam_putreg(uint32_t regval, uintptr_t regaddr);
-# define sam_dumpep(priv,epno)
+#  define sam_dumpep(priv,epno)
 #endif
 
 /* Suspend/Resume Helpers ***************************************************/
diff --git a/arch/arm/src/sama5/sam_wdt.c b/arch/arm/src/sama5/sam_wdt.c
index 1069e5cfc9..abb44dd103 100644
--- a/arch/arm/src/sama5/sam_wdt.c
+++ b/arch/arm/src/sama5/sam_wdt.c
@@ -102,8 +102,8 @@ struct sam_lowerhalf_s
 static uint32_t sam_getreg(uintptr_t regaddr);
 static void     sam_putreg(uint32_t regval, uintptr_t regaddr);
 #else
-# define        sam_getreg(regaddr)        getreg32(regaddr)
-# define        sam_putreg(regval,regaddr) putreg32(regval,regaddr)
+#  define       sam_getreg(regaddr)        getreg32(regaddr)
+#  define       sam_putreg(regval,regaddr) putreg32(regval,regaddr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/samd2l2/sam_spi.c b/arch/arm/src/samd2l2/sam_spi.c
index 23fda9dba2..ea9cc1941c 100644
--- a/arch/arm/src/samd2l2/sam_spi.c
+++ b/arch/arm/src/samd2l2/sam_spi.c
@@ -136,7 +136,7 @@ struct sam_spidev_s
 static bool     spi_checkreg(struct sam_spidev_s *priv, bool wr,
                   uint32_t regval, uint32_t regaddr);
 #else
-# define        spi_checkreg(priv,wr,regval,regaddr) (false)
+#  define       spi_checkreg(priv,wr,regval,regaddr) (false)
 #endif
 
 static uint8_t  spi_getreg8(struct sam_spidev_s *priv,
@@ -159,7 +159,7 @@ static void spi_dma_setup(struct sam_spidev_s *priv);
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     spi_dumpregs(struct sam_spidev_s *priv, const char *msg);
 #else
-# define        spi_dumpregs(priv,msg)
+#  define       spi_dumpregs(priv,msg)
 #endif
 
 /* Interrupt handling */
diff --git a/arch/arm/src/samd2l2/sam_usb.c b/arch/arm/src/samd2l2/sam_usb.c
index 2ce1aaa419..e2da9f3c28 100644
--- a/arch/arm/src/samd2l2/sam_usb.c
+++ b/arch/arm/src/samd2l2/sam_usb.c
@@ -383,7 +383,7 @@ static inline uint32_t sam_getreg16(uintptr_t regaddr);
 static inline void sam_putreg16(uint16_t regval, uintptr_t regaddr);
 static inline uint32_t sam_getreg8(uintptr_t regaddr);
 static inline void sam_putreg8(uint8_t regval, uintptr_t regaddr);
-# define sam_dumpep(priv,epno)
+#  define sam_dumpep(priv,epno)
 #endif
 
 /* Suspend/Resume Helpers ***************************************************/
diff --git a/arch/arm/src/samd5e5/hardware/sam_gmac.h b/arch/arm/src/samd5e5/hardware/sam_gmac.h
index 4f0da6508c..9f39174ba4 100644
--- a/arch/arm/src/samd5e5/hardware/sam_gmac.h
+++ b/arch/arm/src/samd5e5/hardware/sam_gmac.h
@@ -1003,10 +1003,10 @@
 #define GMACRXD_STA_SNAP          (1 << 24) /* Bit 24: Frame was SNAP encoded */
 #define GMACRXD_STA_ADDR_SHIFT    (25)      /* Bits 25-26: Specific Address Register match */
 #define GMACRXD_STA_ADDR_MASK     (3 << GMACRXD_STA_ADDR_SHIFT)
-# define GMACRXD_STA_ADDR1_MATCH  (0 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 1 match */
-# define GMACRXD_STA_ADDR2_MATCH  (1 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 2 match */
-# define GMACRXD_STA_ADDR3_MATCH  (2 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 3 match */
-# define GMACRXD_STA_ADDR4_MATCH  (3 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 4 match */
+#  define GMACRXD_STA_ADDR1_MATCH (0 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 1 match */
+#  define GMACRXD_STA_ADDR2_MATCH (1 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 2 match */
+#  define GMACRXD_STA_ADDR3_MATCH (2 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 3 match */
+#  define GMACRXD_STA_ADDR4_MATCH (3 << GMACRXD_STA_ADDR_SHIFT) /* Specific address register 4 match */
 
 #define GMACRXD_STA_ADDRMATCH     (1 << 27) /* Bit 27: Specific Address Register match found */
                                             /* Bit 28: Reserved */
diff --git a/arch/arm/src/samd5e5/sam_gmac.c b/arch/arm/src/samd5e5/sam_gmac.c
index c0fed3675c..52e28a26c0 100644
--- a/arch/arm/src/samd5e5/sam_gmac.c
+++ b/arch/arm/src/samd5e5/sam_gmac.c
@@ -282,8 +282,8 @@ static uint32_t sam_getreg(struct sam_gmac_s *priv, uintptr_t addr);
 static void sam_putreg(struct sam_gmac_s *priv,
                        uintptr_t addr, uint32_t val);
 #else
-# define sam_getreg(priv,addr)      getreg32(addr)
-# define sam_putreg(priv,addr,val)  putreg32(val,addr)
+#  define sam_getreg(priv,addr)     getreg32(addr)
+#  define sam_putreg(priv,addr,val) putreg32(val,addr)
 #endif
 
 /* Buffer management */
diff --git a/arch/arm/src/samd5e5/sam_spi.c b/arch/arm/src/samd5e5/sam_spi.c
index 0bf2c43e4c..f90bef8d2c 100644
--- a/arch/arm/src/samd5e5/sam_spi.c
+++ b/arch/arm/src/samd5e5/sam_spi.c
@@ -130,7 +130,7 @@ struct sam_spidev_s
 static bool     spi_checkreg(struct sam_spidev_s *priv, bool wr,
                   uint32_t regval, uint32_t regaddr);
 #else
-# define        spi_checkreg(priv,wr,regval,regaddr) (false)
+#  define       spi_checkreg(priv,wr,regval,regaddr) (false)
 #endif
 
 static uint8_t  spi_getreg8(struct sam_spidev_s *priv,
@@ -153,7 +153,7 @@ static void spi_dma_setup(struct sam_spidev_s *priv);
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     spi_dumpregs(struct sam_spidev_s *priv, const char *msg);
 #else
-# define        spi_dumpregs(priv,msg)
+#  define       spi_dumpregs(priv,msg)
 #endif
 
 /* Interrupt handling */
diff --git a/arch/arm/src/samd5e5/sam_usb.c b/arch/arm/src/samd5e5/sam_usb.c
index 56048971b2..d49c974826 100644
--- a/arch/arm/src/samd5e5/sam_usb.c
+++ b/arch/arm/src/samd5e5/sam_usb.c
@@ -711,9 +711,9 @@ static inline uint32_t sam_getreg16(uintptr_t regaddr);
 static inline void sam_putreg16(uint16_t regval, uintptr_t regaddr);
 static inline uint32_t sam_getreg8(uintptr_t regaddr);
 static inline void sam_putreg8(uint8_t regval, uintptr_t regaddr);
-# define sam_dumpep(priv, epno)
+#  define sam_dumpep(priv, epno)
 #ifdef CONFIG_USBHOST
-# define sam_dumppipe(priv, epno)
+#  define sam_dumppipe(priv, epno)
 #endif
 #endif
 static inline void sam_modifyreg8(uint32_t clrbits,
diff --git a/arch/arm/src/samv7/hardware/sam_matrix.h b/arch/arm/src/samv7/hardware/sam_matrix.h
index 65e5016c64..e7f81fcb8b 100644
--- a/arch/arm/src/samv7/hardware/sam_matrix.h
+++ b/arch/arm/src/samv7/hardware/sam_matrix.h
@@ -51,7 +51,7 @@
 #  define SAM_MATRIX_MCFG11_OFFSET       0x002c /* Master Configuration Register 11 */
                                                 /* 0x0030-0x003c: Reserved */
 #define SAM_MATRIX_SCFG_OFFSET(n)        (0x0040+((n)<<2))
-# define SAM_MATRIX_SCFG0_OFFSET         0x0040 /* Slave Configuration Register 0 */
+#  define SAM_MATRIX_SCFG0_OFFSET        0x0040 /* Slave Configuration Register 0 */
 #  define SAM_MATRIX_SCFG1_OFFSET        0x0044 /* Slave Configuration Register 1 */
 #  define SAM_MATRIX_SCFG2_OFFSET        0x0048 /* Slave Configuration Register 2 */
 #  define SAM_MATRIX_SCFG3_OFFSET        0x004c /* Slave Configuration Register 3 */
diff --git a/arch/arm/src/samv7/hardware/sam_trng.h b/arch/arm/src/samv7/hardware/sam_trng.h
index c80f4fec3e..f797a7e550 100644
--- a/arch/arm/src/samv7/hardware/sam_trng.h
+++ b/arch/arm/src/samv7/hardware/sam_trng.h
@@ -58,7 +58,7 @@
 #  define TRNG_CR_DISABLE         (0)       /* Bit 0:  0=Disables the TRNG */
 #define TRNG_CR_KEY_SHIFT         (8)       /* Bits 8-31: Security key */
 #define TRNG_CR_KEY_MASK          (0xffffff << TRNG_CR_KEY_SHIFT)
-# define TRNG_CR_KEY              (0x524e47 << TRNG_CR_KEY_SHIFT) /* RNG in ASCII */
+#  define TRNG_CR_KEY             (0x524e47 << TRNG_CR_KEY_SHIFT) /* RNG in ASCII */
 
 /* Interrupt Enable Register, Interrupt Disable Register,
  * Interrupt Mask Register, and Interrupt Status Register
diff --git a/arch/arm/src/samv7/hardware/sam_usbhs.h b/arch/arm/src/samv7/hardware/sam_usbhs.h
index c017e82fde..ebac071802 100644
--- a/arch/arm/src/samv7/hardware/sam_usbhs.h
+++ b/arch/arm/src/samv7/hardware/sam_usbhs.h
@@ -692,9 +692,9 @@
 
 #define USBHS_HSTPIPISR_CURRBK_SHIFT       (14)              /* Bits 14-15: Current Bank */
 #define USBHS_HSTPIPISR_CURRBK_MASK        (3 << USBHS_HSTPIPISR_CURRBK_SHIFT)
-# define USBHS_HSTPIPISR_CURRBK_BANK0      (0 << USBHS_HSTPIPISR_CURRBK_SHIFT) /* Current bank is bank0 */
-# define USBHS_HSTPIPISR_CURRBK_BANK1      (1 << USBHS_HSTPIPISR_CURRBK_SHIFT) /* Current bank is bank1 */
-# define USBHS_HSTPIPISR_CURRBK_BANK2      (2 << USBHS_HSTPIPISR_CURRBK_SHIFT) /* Current bank is bank2 */
+#  define USBHS_HSTPIPISR_CURRBK_BANK0     (0 << USBHS_HSTPIPISR_CURRBK_SHIFT) /* Current bank is bank0 */
+#  define USBHS_HSTPIPISR_CURRBK_BANK1     (1 << USBHS_HSTPIPISR_CURRBK_SHIFT) /* Current bank is bank1 */
+#  define USBHS_HSTPIPISR_CURRBK_BANK2     (2 << USBHS_HSTPIPISR_CURRBK_SHIFT) /* Current bank is bank2 */
 
 #define USBHS_HSTPIPISR_RWALL              (1 << 16)         /* Bit 16: Read/Write Allowed */
 #define USBHS_HSTPIPISR_CFGOK              (1 << 18)         /* Bit 18: Configuration OK Status */
diff --git a/arch/arm/src/samv7/sam_hsmci.c b/arch/arm/src/samv7/sam_hsmci.c
index ea5333187d..e11d75c992 100644
--- a/arch/arm/src/samv7/sam_hsmci.c
+++ b/arch/arm/src/samv7/sam_hsmci.c
@@ -393,7 +393,7 @@ struct sam_dev_s
 static bool sam_checkreg(struct sam_dev_s *priv, bool wr,
               uint32_t value, uint32_t address);
 #else
-# define    sam_checkreg(priv,wr,value,address) (false)
+#  define   sam_checkreg(priv,wr,value,address) (false)
 #endif
 
 static inline uint32_t sam_getreg(struct sam_dev_s *priv,
diff --git a/arch/arm/src/samv7/sam_qspi.c b/arch/arm/src/samv7/sam_qspi.c
index ec673b45ae..0c196842f4 100644
--- a/arch/arm/src/samv7/sam_qspi.c
+++ b/arch/arm/src/samv7/sam_qspi.c
@@ -89,7 +89,7 @@
 #endif
 
 #ifdef CONFIG_SAMV7_QSPI_DMA
-# define SAMV7_QSPI0_DMA true
+#  define SAMV7_QSPI0_DMA true
 #endif
 
 #ifndef CONFIG_SAMV7_QSPI_DMA
@@ -206,7 +206,7 @@ struct sam_qspidev_s
 static bool     qspi_checkreg(struct sam_qspidev_s *priv, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        qspi_checkreg(priv,wr,value,address) (false)
+#  define       qspi_checkreg(priv,wr,value,address) (false)
 #endif
 
 static inline uint32_t qspi_getreg(struct sam_qspidev_s *priv,
@@ -217,7 +217,7 @@ static inline void qspi_putreg(struct sam_qspidev_s *priv, uint32_t value,
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     qspi_dumpregs(struct sam_qspidev_s *priv, const char *msg);
 #else
-# define        qspi_dumpregs(priv,msg)
+#  define       qspi_dumpregs(priv,msg)
 #endif
 
 /* DMA support */
diff --git a/arch/arm/src/samv7/sam_rswdt.c b/arch/arm/src/samv7/sam_rswdt.c
index eeb77cdc5b..fdc3d78ad8 100644
--- a/arch/arm/src/samv7/sam_rswdt.c
+++ b/arch/arm/src/samv7/sam_rswdt.c
@@ -102,8 +102,8 @@ struct sam_lowerhalf_s
 static uint32_t sam_getreg(uintptr_t regaddr);
 static void     sam_putreg(uint32_t regval, uintptr_t regaddr);
 #else
-# define        sam_getreg(regaddr)        getreg32(regaddr)
-# define        sam_putreg(regval,regaddr) putreg32(regval,regaddr)
+#  define       sam_getreg(regaddr)        getreg32(regaddr)
+#  define       sam_putreg(regval,regaddr) putreg32(regval,regaddr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/samv7/sam_serial.c b/arch/arm/src/samv7/sam_serial.c
index 2f2327fdc7..6a4318aaca 100644
--- a/arch/arm/src/samv7/sam_serial.c
+++ b/arch/arm/src/samv7/sam_serial.c
@@ -64,7 +64,7 @@
 
 #if defined(CONFIG_USART0_RXDMA) || defined(CONFIG_USART1_RXDMA) || \
     defined(CONFIG_USART2_RXDMA)
-# define SERIAL_HAVE_RXDMA
+#  define SERIAL_HAVE_RXDMA
 #else
 # undef SERIAL_HAVE_RXDMA
 #endif
@@ -91,12 +91,12 @@
 #endif
 
 #ifndef CONFIG_SAMV7_SERIAL_DMA_TIMEOUT
-# define CONFIG_SAMV7_SERIAL_DMA_TIMEOUT 0
+#  define CONFIG_SAMV7_SERIAL_DMA_TIMEOUT 0
 #endif
 
 #ifdef SERIAL_HAVE_RXDMA
 
-# define DMA_RXFLAGS  (DMACH_FLAG_FIFOCFG_LARGEST | \
+#  define DMA_RXFLAGS  (DMACH_FLAG_FIFOCFG_LARGEST | \
      DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH |  \
      DMACH_FLAG_PERIPHWIDTH_32BITS | DMACH_FLAG_PERIPHCHUNKSIZE_1 | \
      DMACH_FLAG_MEMPID_MAX | DMACH_FLAG_MEMAHB_AHB_IF0 | \
@@ -525,29 +525,29 @@ static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
 #if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER)
 static char g_usart0rxbuffer[CONFIG_USART0_RXBUFSIZE];
 static char g_usart0txbuffer[CONFIG_USART0_TXBUFSIZE];
-# ifdef CONFIG_USART0_RXDMA
+#  ifdef CONFIG_USART0_RXDMA
 static uint32_t g_usart0rxbuf[2][RXDMA_BUFFER_SIZE]
 aligned_data(ARMV7M_DCACHE_LINESIZE);
 static struct chnext_view1_s g_usart0rxdesc[2];
-# endif
+#  endif
 #endif
 #if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER)
 static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
 static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
-# ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
 static uint32_t g_usart1rxbuf[2][RXDMA_BUFFER_SIZE]
 aligned_data(ARMV7M_DCACHE_LINESIZE);
 static struct chnext_view1_s g_usart1rxdesc[2];
-# endif
+#  endif
 #endif
 #if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER)
 static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
 static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
-# ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
 static uint32_t g_usart2rxbuf[2][RXDMA_BUFFER_SIZE]
 aligned_data(ARMV7M_DCACHE_LINESIZE);
 static struct chnext_view1_s g_usart2rxdesc[2];
-# endif
+#  endif
 #endif
 
 /* This describes the state of the UART0 port. */
@@ -717,10 +717,10 @@ static struct sam_dev_s g_usart0priv =
   .parity         = CONFIG_USART0_PARITY,
   .bits           = CONFIG_USART0_BITS,
   .stopbits2      = CONFIG_USART0_2STOP,
-#if defined(CONFIG_USART0_OFLOWCONTROL) || defined(CONFIG_USART0_IFLOWCONTROL)
+#  if defined(CONFIG_USART0_OFLOWCONTROL) || defined(CONFIG_USART0_IFLOWCONTROL)
   .flowc          = true,
-#endif
-#ifdef CONFIG_USART0_RXDMA
+#  endif
+#  ifdef CONFIG_USART0_RXDMA
   .buf_idx        = 0,
   .nextcache      = 0,
   .rxbuf          =
@@ -732,11 +732,11 @@ static struct sam_dev_s g_usart0priv =
     &g_usart0rxdesc[0], &g_usart0rxdesc[1]
   },
   .has_rxdma      = true,
-#endif
-#ifdef CONFIG_SAMV7_USART0_RS485MODE
+#  endif
+#  ifdef CONFIG_SAMV7_USART0_RS485MODE
   .has_rs485      = true,
   .rs485_dir_gpio = GPIO_USART0_RTS,
-#endif
+#  endif
 };
 
 static uart_dev_t g_usart0port =
@@ -751,11 +751,11 @@ static uart_dev_t g_usart0port =
     .size   = CONFIG_USART0_TXBUFSIZE,
     .buffer = g_usart0txbuffer,
   },
-#ifdef CONFIG_USART0_RXDMA
+#  ifdef CONFIG_USART0_RXDMA
   .ops      = &g_uart_rxdma_ops,
-#else
+#  else
   .ops      = &g_uart_ops,
-#endif
+#  endif
   .priv     = &g_usart0priv,
 };
 #endif
@@ -772,10 +772,10 @@ static struct sam_dev_s g_usart1priv =
   .parity         = CONFIG_USART1_PARITY,
   .bits           = CONFIG_USART1_BITS,
   .stopbits2      = CONFIG_USART1_2STOP,
-#if defined(CONFIG_USART1_OFLOWCONTROL) || defined(CONFIG_USART1_IFLOWCONTROL)
+#  if defined(CONFIG_USART1_OFLOWCONTROL) || defined(CONFIG_USART1_IFLOWCONTROL)
   .flowc          = true,
-#endif
-#ifdef CONFIG_USART1_RXDMA
+#  endif
+#  ifdef CONFIG_USART1_RXDMA
   .buf_idx        = 0,
   .nextcache      = 0,
   .rxbuf          =
@@ -787,11 +787,11 @@ static struct sam_dev_s g_usart1priv =
     &g_usart1rxdesc[0], &g_usart1rxdesc[1]
   },
   .has_rxdma      = true,
-#endif
-#ifdef CONFIG_SAMV7_USART1_RS485MODE
+#  endif
+#  ifdef CONFIG_SAMV7_USART1_RS485MODE
   .has_rs485      = true,
   .rs485_dir_gpio = GPIO_USART1_RTS,
-#endif
+#  endif
 };
 
 static uart_dev_t g_usart1port =
@@ -806,11 +806,11 @@ static uart_dev_t g_usart1port =
     .size   = CONFIG_USART1_TXBUFSIZE,
     .buffer = g_usart1txbuffer,
   },
-#ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
   .ops      = &g_uart_rxdma_ops,
-#else
+#  else
   .ops      = &g_uart_ops,
-#endif
+#  endif
   .priv     = &g_usart1priv,
 };
 #endif
@@ -827,10 +827,10 @@ static struct sam_dev_s g_usart2priv =
   .parity         = CONFIG_USART2_PARITY,
   .bits           = CONFIG_USART2_BITS,
   .stopbits2      = CONFIG_USART2_2STOP,
-#if defined(CONFIG_USART2_OFLOWCONTROL) || defined(CONFIG_USART2_IFLOWCONTROL)
+#  if defined(CONFIG_USART2_OFLOWCONTROL) || defined(CONFIG_USART2_IFLOWCONTROL)
   .flowc          = true,
-#endif
-#ifdef CONFIG_USART2_RXDMA
+#  endif
+#  ifdef CONFIG_USART2_RXDMA
   .buf_idx        = 0,
   .nextcache      = 0,
   .rxbuf          =
@@ -842,11 +842,11 @@ static struct sam_dev_s g_usart2priv =
     &g_usart2rxdesc[0], &g_usart2rxdesc[1]
   },
   .has_rxdma      = true,
-#endif
-#ifdef CONFIG_SAMV7_USART2_RS485MODE
+#  endif
+#  ifdef CONFIG_SAMV7_USART2_RS485MODE
   .has_rs485      = true,
   .rs485_dir_gpio = GPIO_USART2_RTS,
-#endif
+#  endif
 };
 
 static uart_dev_t g_usart2port =
@@ -861,11 +861,11 @@ static uart_dev_t g_usart2port =
       .size   = CONFIG_USART2_TXBUFSIZE,
       .buffer = g_usart2txbuffer,
     },
-#ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
   .ops        = &g_uart_rxdma_ops,
-#else
+#  else
   .ops        = &g_uart_ops,
-#endif
+#  endif
   .priv       = &g_usart2priv,
 };
 #endif
diff --git a/arch/arm/src/samv7/sam_spi.c b/arch/arm/src/samv7/sam_spi.c
index f70dff06fa..fce42793d0 100644
--- a/arch/arm/src/samv7/sam_spi.c
+++ b/arch/arm/src/samv7/sam_spi.c
@@ -204,7 +204,7 @@ struct sam_spidev_s
 static bool     spi_checkreg(struct sam_spidev_s *spi, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        spi_checkreg(spi,wr,value,address) (false)
+#  define       spi_checkreg(spi,wr,value,address) (false)
 #endif
 
 static inline uint32_t spi_getreg(struct sam_spidev_s *spi,
@@ -216,7 +216,7 @@ static inline struct sam_spidev_s *spi_device(struct sam_spics_s *spics);
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     spi_dumpregs(struct sam_spidev_s *spi, const char *msg);
 #else
-# define        spi_dumpregs(spi,msg)
+#  define       spi_dumpregs(spi,msg)
 #endif
 
 static inline void spi_flush(struct sam_spidev_s *spi);
diff --git a/arch/arm/src/samv7/sam_spi_slave.c b/arch/arm/src/samv7/sam_spi_slave.c
index 4cab3a5bbc..2b8a2a560b 100644
--- a/arch/arm/src/samv7/sam_spi_slave.c
+++ b/arch/arm/src/samv7/sam_spi_slave.c
@@ -116,7 +116,7 @@ struct sam_spidev_s
 static bool     spi_checkreg(struct sam_spidev_s *priv, bool wr,
                              uint32_t value, uint32_t address);
 #else
-# define        spi_checkreg(priv,wr,value,address) (false)
+#  define       spi_checkreg(priv,wr,value,address) (false)
 #endif
 
 static uint32_t spi_getreg(struct sam_spidev_s *priv,
@@ -127,7 +127,7 @@ static void     spi_putreg(struct sam_spidev_s *priv, uint32_t value,
 #ifdef CONFIG_DEBUG_SPI_INFO
 static void     spi_dumpregs(struct sam_spidev_s *priv, const char *msg);
 #else
-# define        spi_dumpregs(priv,msg)
+#  define       spi_dumpregs(priv,msg)
 #endif
 
 /* Interrupt Handling */
diff --git a/arch/arm/src/samv7/sam_ssc.c b/arch/arm/src/samv7/sam_ssc.c
index 071be7bc33..21a95dd381 100644
--- a/arch/arm/src/samv7/sam_ssc.c
+++ b/arch/arm/src/samv7/sam_ssc.c
@@ -470,7 +470,7 @@ struct sam_ssc_s
 static bool     ssc_checkreg(struct sam_ssc_s *priv, bool wr,
                   uint32_t regval, uint32_t regaddr);
 #else
-# define        ssc_checkreg(priv,wr,regval,regaddr) (false)
+#  define       ssc_checkreg(priv,wr,regval,regaddr) (false)
 #endif
 
 static inline uint32_t ssc_getreg(struct sam_ssc_s *priv,
diff --git a/arch/arm/src/samv7/sam_twihs.c b/arch/arm/src/samv7/sam_twihs.c
index 133ba88313..1be6385ab8 100644
--- a/arch/arm/src/samv7/sam_twihs.c
+++ b/arch/arm/src/samv7/sam_twihs.c
@@ -190,9 +190,9 @@ static uint32_t twi_getabs(struct twi_dev_s *priv, uintptr_t address);
 static void twi_putabs(struct twi_dev_s *priv, uintptr_t address,
               uint32_t value);
 #else
-# define    twi_checkreg(priv,wr,value,address) (false)
-# define    twi_putabs(p,a,v) putreg32(v,a)
-# define    twi_getabs(p,a) getreg32(a)
+#  define   twi_checkreg(priv,wr,value,address) (false)
+#  define   twi_putabs(p,a,v) putreg32(v,a)
+#  define   twi_getabs(p,a) getreg32(a)
 #endif
 
 static inline uint32_t twi_getrel(struct twi_dev_s *priv,
diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/arch/arm/src/samv7/sam_usbdevhs.c
index eb3036d3c2..53ff40e01a 100644
--- a/arch/arm/src/samv7/sam_usbdevhs.c
+++ b/arch/arm/src/samv7/sam_usbdevhs.c
@@ -455,7 +455,7 @@ static void   sam_dumpep(struct sam_usbdev_s *priv, int epno);
 #else
 static inline uint32_t sam_getreg(uintptr_t regaddr);
 static inline void sam_putreg(uint32_t regval, uintptr_t regaddr);
-# define sam_dumpep(priv,epno)
+#  define sam_dumpep(priv,epno)
 #endif
 
 /* Suspend/Resume Helpers ***************************************************/
diff --git a/arch/arm/src/samv7/sam_wdt.c b/arch/arm/src/samv7/sam_wdt.c
index 52bf87bc15..26df5d5282 100644
--- a/arch/arm/src/samv7/sam_wdt.c
+++ b/arch/arm/src/samv7/sam_wdt.c
@@ -102,8 +102,8 @@ struct sam_lowerhalf_s
 static uint32_t sam_getreg(uintptr_t regaddr);
 static void     sam_putreg(uint32_t regval, uintptr_t regaddr);
 #else
-# define        sam_getreg(regaddr)        getreg32(regaddr)
-# define        sam_putreg(regval,regaddr) putreg32(regval,regaddr)
+#  define       sam_getreg(regaddr)        getreg32(regaddr)
+#  define       sam_putreg(regval,regaddr) putreg32(regval,regaddr)
 #endif
 
 /* Interrupt handling *******************************************************/
diff --git a/arch/arm/src/stm32/hardware/stm32_eth.h b/arch/arm/src/stm32/hardware/stm32_eth.h
index 438b2a04bc..402a728e96 100644
--- a/arch/arm/src/stm32/hardware/stm32_eth.h
+++ b/arch/arm/src/stm32/hardware/stm32_eth.h
@@ -784,9 +784,9 @@
 
 #define ETH_RDES4_IPPT_SHIFT         (0)       /* Bits 0-2: IP payload type */
 #define ETH_RDES4_IPPT_MASK          (7 << ETH_RDES4_IPPT_SHIFT)
-# define ETH_RDES4_IPPT_UDP          (1 << ETH_RDES4_IPPT_SHIFT) /* UDP payload in IP datagram */
-# define ETH_RDES4_IPPT_TCP          (2 << ETH_RDES4_IPPT_SHIFT) /* TCP payload in IP datagram */
-# define ETH_RDES4_IPPT_ICMP         (3 << ETH_RDES4_IPPT_SHIFT) /* ICMP payload in IP datagram */
+#  define ETH_RDES4_IPPT_UDP         (1 << ETH_RDES4_IPPT_SHIFT) /* UDP payload in IP datagram */
+#  define ETH_RDES4_IPPT_TCP         (2 << ETH_RDES4_IPPT_SHIFT) /* TCP payload in IP datagram */
+#  define ETH_RDES4_IPPT_ICMP        (3 << ETH_RDES4_IPPT_SHIFT) /* ICMP payload in IP datagram */
 
 #define ETH_RDES4_IPHE               (1 << 3)  /* Bit 3:  IP header error */
 #define ETH_RDES4_IPPE               (1 << 4)  /* Bit 4:  IP payload error */
diff --git a/arch/arm/src/stm32/hardware/stm32_lcd.h b/arch/arm/src/stm32/hardware/stm32_lcd.h
index 840da1de7a..4f12393e64 100644
--- a/arch/arm/src/stm32/hardware/stm32_lcd.h
+++ b/arch/arm/src/stm32/hardware/stm32_lcd.h
@@ -100,11 +100,11 @@
 #define LCD_CR_VSEL               (1 << 1)  /* Bit 1:  Voltage source selection */
 #define LCD_CR_DUTY_SHIFT         (2)       /* Bits 2-4: Duty selection */
 #define LCD_CR_DUTY_MASK          (7 << LCD_CR_DUTY_SHIFT)
-# define LCD_CR_DUTY_STATIC       (0 << LCD_CR_DUTY_SHIFT) /* 000: Static duty */
-# define LCD_CR_DUTY_1TO2         (1 << LCD_CR_DUTY_SHIFT) /* 001: 1/2 duty */
-# define LCD_CR_DUTY_1TO3         (2 << LCD_CR_DUTY_SHIFT) /* 010: 1/3 duty */
-# define LCD_CR_DUTY_1TO4         (3 << LCD_CR_DUTY_SHIFT) /* 011: 1/4 duty */
-# define LCD_CR_DUTY_1TO8         (4 << LCD_CR_DUTY_SHIFT) /* 100: 1/8 duty */
+#  define LCD_CR_DUTY_STATIC      (0 << LCD_CR_DUTY_SHIFT) /* 000: Static duty */
+#  define LCD_CR_DUTY_1TO2        (1 << LCD_CR_DUTY_SHIFT) /* 001: 1/2 duty */
+#  define LCD_CR_DUTY_1TO3        (2 << LCD_CR_DUTY_SHIFT) /* 010: 1/3 duty */
+#  define LCD_CR_DUTY_1TO4        (3 << LCD_CR_DUTY_SHIFT) /* 011: 1/4 duty */
+#  define LCD_CR_DUTY_1TO8        (4 << LCD_CR_DUTY_SHIFT) /* 100: 1/8 duty */
 
 #define LCD_CR_BIAS_SHIFT         (5)       /* Bits 5-6: Bias selector */
 #define LCD_CR_BIAS_MASK          (3 << LCD_CR_BIAS_SHIFT)
diff --git a/arch/arm/src/stm32/hardware/stm32_pwr.h b/arch/arm/src/stm32/hardware/stm32_pwr.h
index 9e59160367..7a4777256e 100644
--- a/arch/arm/src/stm32/hardware/stm32_pwr.h
+++ b/arch/arm/src/stm32/hardware/stm32_pwr.h
@@ -72,7 +72,7 @@
 #    define PWR_CR_2p7V        (5 << PWR_CR_PLS_SHIFT) /* 101: 2.7V */
 #    define PWR_CR_2p8V        (6 << PWR_CR_PLS_SHIFT) /* 110: 2.8V */
 #    define PWR_CR_2p9V        (7 << PWR_CR_PLS_SHIFT) /* 111: 2.9V */
-# endif
+#  endif
 #define PWR_CR_DBP             (1 << 8)  /* Bit 8: Disable Backup Domain write protection */
 
 #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F4XXX)
diff --git a/arch/arm/src/stm32/stm32_dac.c b/arch/arm/src/stm32/stm32_dac.c
index 2220a8d3a5..782b24e95e 100644
--- a/arch/arm/src/stm32/stm32_dac.c
+++ b/arch/arm/src/stm32/stm32_dac.c
@@ -129,33 +129,33 @@
 
 #if defined(CONFIG_STM32_DAC1CH1_DMA) || defined(CONFIG_STM32_DAC1CH2_DMA) || \
     defined(CONFIG_STM32_DAC2CH1_DMA)
-# if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX)
-#   ifndef CONFIG_STM32_DMA2
-#     warning "STM32 F1/F3 DAC DMA support requires CONFIG_STM32_DMA2"
-#     undef CONFIG_STM32_DAC1CH1_DMA
-#     undef CONFIG_STM32_DAC1CH2_DMA
-#     undef CONFIG_STM32_DAC2CH1_DMA
-#   endif
-# elif defined(CONFIG_STM32_STM32F33XX)
-#   ifndef CONFIG_STM32_DMA1
-#     warning "STM32 F334 DAC DMA support requires CONFIG_STM32_DMA1"
-#     undef CONFIG_STM32_DAC1CH1_DMA
-#     undef CONFIG_STM32_DAC1CH2_DMA
-#     undef CONFIG_STM32_DAC2CH1_DMA
-#   endif
-# elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F4XXX)
-#   ifndef CONFIG_STM32_DMA1
-#     warning "STM32 F4 DAC DMA support requires CONFIG_STM32_DMA1"
-#     undef CONFIG_STM32_DAC1CH1_DMA
-#     undef CONFIG_STM32_DAC1CH2_DMA
-#     undef CONFIG_STM32_DAC2CH1_DMA
-#   endif
-# else
-#   warning "No DAC DMA information for this STM32 family"
-#   undef CONFIG_STM32_DAC1CH1_DMA
-#   undef CONFIG_STM32_DAC1CH2_DMA
-#   undef CONFIG_STM32_DAC2CH1_DMA
-# endif
+#  if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX)
+#    ifndef CONFIG_STM32_DMA2
+#      warning "STM32 F1/F3 DAC DMA support requires CONFIG_STM32_DMA2"
+#      undef CONFIG_STM32_DAC1CH1_DMA
+#      undef CONFIG_STM32_DAC1CH2_DMA
+#      undef CONFIG_STM32_DAC2CH1_DMA
+#    endif
+#  elif defined(CONFIG_STM32_STM32F33XX)
+#    ifndef CONFIG_STM32_DMA1
+#      warning "STM32 F334 DAC DMA support requires CONFIG_STM32_DMA1"
+#      undef CONFIG_STM32_DAC1CH1_DMA
+#      undef CONFIG_STM32_DAC1CH2_DMA
+#      undef CONFIG_STM32_DAC2CH1_DMA
+#    endif
+#  elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F4XXX)
+#    ifndef CONFIG_STM32_DMA1
+#      warning "STM32 F4 DAC DMA support requires CONFIG_STM32_DMA1"
+#      undef CONFIG_STM32_DAC1CH1_DMA
+#      undef CONFIG_STM32_DAC1CH2_DMA
+#      undef CONFIG_STM32_DAC2CH1_DMA
+#    endif
+#  else
+#    warning "No DAC DMA information for this STM32 family"
+#    undef CONFIG_STM32_DAC1CH1_DMA
+#    undef CONFIG_STM32_DAC1CH2_DMA
+#    undef CONFIG_STM32_DAC2CH1_DMA
+#  endif
 #endif
 
 #if defined(CONFIG_STM32_DAC1CH1_HRTIM_TRG1) || defined(CONFIG_STM32_DAC1CH1_HRTIM_TRG2)
@@ -220,10 +220,10 @@
 #undef HAVE_DMA
 #if defined(CONFIG_STM32_DAC1CH1_DMA) || defined(CONFIG_STM32_DAC1CH2_DMA) || \
     defined(CONFIG_STM32_DAC2CH1_DMA)
-# if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) || \
-     defined(CONFIG_STM32_STM32F33XX)
-#  define HAVE_DMA        1
-#  define DAC_DMA         2
+#  if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) || \
+      defined(CONFIG_STM32_STM32F33XX)
+#    define HAVE_DMA        1
+#    define DAC_DMA         2
 #  if defined(CONFIG_STM32_DAC1CH1) && !defined(CONFIG_STM32_DAC1CH1_DMA_EXTERNAL)
 #    define DAC1CH1_DMA_CHAN   DMACHAN_DAC1_CH1
 #  endif
@@ -233,19 +233,19 @@
 #  if defined(CONFIG_STM32_DAC2CH1) && !defined(CONFIG_STM32_DAC2CH1_DMA_EXTERNAL)
 #    define DAC2CH1_DMA_CHAN   DMACHAN_DAC2_CH1
 #  endif
-# elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F4XXX)
-#  define HAVE_DMA        1
-#  define DAC_DMA         1
-#  if defined(CONFIG_STM32_DAC1CH1) && !defined(CONFIG_STM32_DAC1CH1_DMA_EXTERNAL)
-#    define DAC1CH1_DMA_CHAN   DMAMAP_DAC1
-#  endif
-#  if defined(CONFIG_STM32_DAC1CH2) && !defined(CONFIG_STM32_DAC1CH2_DMA_EXTERNAL)
-#    define DAC1CH2_DMA_CHAN   DMAMAP_DAC1
-#  endif
-#  if defined(CONFIG_STM32_DAC2CH1) && !defined(CONFIG_STM32_DAC2CH1_DMA_EXTERNAL)
-#    define DAC2CH1_DMA_CHAN   DMAMAP_DAC2
+#  elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F4XXX)
+#    define HAVE_DMA        1
+#    define DAC_DMA         1
+#    if defined(CONFIG_STM32_DAC1CH1) && !defined(CONFIG_STM32_DAC1CH1_DMA_EXTERNAL)
+#      define DAC1CH1_DMA_CHAN   DMAMAP_DAC1
+#    endif
+#    if defined(CONFIG_STM32_DAC1CH2) && !defined(CONFIG_STM32_DAC1CH2_DMA_EXTERNAL)
+#      define DAC1CH2_DMA_CHAN   DMAMAP_DAC1
+#    endif
+#    if defined(CONFIG_STM32_DAC2CH1) && !defined(CONFIG_STM32_DAC2CH1_DMA_EXTERNAL)
+#      define DAC2CH1_DMA_CHAN   DMAMAP_DAC2
+#    endif
 #  endif
-# endif
 #endif
 
 /* Timer configuration.  The STM32 supports 8 different trigger for DAC
diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c
index 1b7b93b109..149dcaf0a6 100644
--- a/arch/arm/src/stm32/stm32_eth.c
+++ b/arch/arm/src/stm32/stm32_eth.c
@@ -665,9 +665,9 @@ static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t val, uint32_t addr);
 static void stm32_checksetup(void);
 #else
-# define stm32_getreg(addr)      getreg32(addr)
-# define stm32_putreg(val,addr)  putreg32(val,addr)
-# define stm32_checksetup()
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(val,addr) putreg32(val,addr)
+#  define stm32_checksetup()
 #endif
 
 /* Free buffer management */
@@ -3365,7 +3365,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
 
   /* Set up the MII interface */
 
-#if defined(CONFIG_STM32_MII)
+#  if defined(CONFIG_STM32_MII)
 
   /* Select the MII interface */
 
@@ -3380,7 +3380,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
    *  PLLI2S clock (through a configurable prescaler) on PC9 pin."
    */
 
-# if defined(CONFIG_STM32_MII_MCO1)
+#    if defined(CONFIG_STM32_MII_MCO1)
   /* Configure MC01 to drive the PHY.  Board logic must provide MC01 clocking
    * info.
    */
@@ -3388,7 +3388,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
   stm32_configgpio(GPIO_MCO1);
   stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER);
 
-# elif defined(CONFIG_STM32_MII_MCO2)
+#    elif defined(CONFIG_STM32_MII_MCO2)
   /* Configure MC02 to drive the PHY.  Board logic must provide MC02 clocking
    * info.
    */
@@ -3396,12 +3396,12 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
   stm32_configgpio(GPIO_MCO2);
   stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER);
 
-# elif defined(CONFIG_STM32_MII_MCO)
+#    elif defined(CONFIG_STM32_MII_MCO)
   /* Setup MCO pin for alternative usage */
 
   stm32_configgpio(GPIO_MCO);
   stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE);
-# endif
+#    endif
 
   /* MII interface pins (17):
    *
@@ -3427,7 +3427,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
 
   /* Set up the RMII interface. */
 
-#elif defined(CONFIG_STM32_RMII)
+#  elif defined(CONFIG_STM32_RMII)
 
   /* Select the RMII interface */
 
@@ -3442,7 +3442,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
    *  PLLI2S clock (through a configurable prescaler) on PC9 pin."
    */
 
-# if defined(CONFIG_STM32_RMII_MCO1)
+#    if defined(CONFIG_STM32_RMII_MCO1)
   /* Configure MC01 to drive the PHY.  Board logic must provide MC01 clocking
    * info.
    */
@@ -3450,7 +3450,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
   stm32_configgpio(GPIO_MCO1);
   stm32_mco1config(BOARD_CFGR_MC01_SOURCE, BOARD_CFGR_MC01_DIVIDER);
 
-# elif defined(CONFIG_STM32_RMII_MCO2)
+#    elif defined(CONFIG_STM32_RMII_MCO2)
   /* Configure MC02 to drive the PHY.  Board logic must provide MC02 clocking
    * info.
    */
@@ -3458,12 +3458,12 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
   stm32_configgpio(GPIO_MCO2);
   stm32_mco2config(BOARD_CFGR_MC02_SOURCE, BOARD_CFGR_MC02_DIVIDER);
 
-# elif defined(CONFIG_STM32_RMII_MCO)
+#    elif defined(CONFIG_STM32_RMII_MCO)
   /* Setup MCO pin for alternative usage */
 
   stm32_configgpio(GPIO_MCO);
   stm32_mcoconfig(BOARD_CFGR_MCO_SOURCE);
-# endif
+#    endif
 
   /* RMII interface pins (7):
    *
@@ -3479,7 +3479,7 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv)
   stm32_configgpio(GPIO_ETH_RMII_TXD1);
   stm32_configgpio(GPIO_ETH_RMII_TX_EN);
 
-#endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_ETH_PTP
diff --git a/arch/arm/src/stm32/stm32_hciuart.c b/arch/arm/src/stm32/stm32_hciuart.c
index 788a1733b7..d9d34906f4 100644
--- a/arch/arm/src/stm32/stm32_hciuart.c
+++ b/arch/arm/src/stm32/stm32_hciuart.c
@@ -189,7 +189,7 @@
                  DMA_CCR_PSIZE_8BITS   | \
                  DMA_CCR_MSIZE_8BITS   | \
                  CONFIG_STM32_HCIUART_RXDMAPRIO)
-# endif
+#  endif
 #endif
 
 /* All interrupts */
@@ -352,9 +352,9 @@ static int  hciuart_pm_prepare(struct pm_callback_s *cb, int domain,
 
 static uint8_t g_usart1_rxbuffer[CONFIG_STM32_HCIUART1_RXBUFSIZE];
 static uint8_t g_usart1_txbuffer[CONFIG_STM32_HCIUART1_TXBUFSIZE];
-# ifdef CONFIG_STM32_HCIUART1_RXDMA
+#  ifdef CONFIG_STM32_HCIUART1_RXDMA
 static uint8_t g_usart1_rxdmabuffer[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 
 /* HCI USART1 variable state information */
 
@@ -381,26 +381,26 @@ static const struct hciuart_config_s g_hciusart1_config =
 
   .rxbuffer      = g_usart1_rxbuffer,
   .txbuffer      = g_usart1_txbuffer,
-#ifdef CONFIG_STM32_HCIUART1_RXDMA
+#  ifdef CONFIG_STM32_HCIUART1_RXDMA
   .rxdmabuffer   = g_usart1_rxdmabuffer,
-#endif
+#  endif
   .rxbufsize     = CONFIG_STM32_HCIUART1_RXBUFSIZE,
   .txbufsize     = CONFIG_STM32_HCIUART1_TXBUFSIZE,
-#ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
+#  ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
   .rxupper       = RXFLOW_UPPER(CONFIG_STM32_HCIUART1_RXBUFSIZE),
   .rxlower       = RXFLOW_LOWER(CONFIG_STM32_HCIUART1_RXBUFSIZE),
-#endif
-#ifdef CONFIG_STM32_HCIUART_RXDMA
+#  endif
+#  ifdef CONFIG_STM32_HCIUART_RXDMA
   .rxdmachan     = DMAMAP_USART1_RX,
-#endif
+#  endif
 
   .irq           = STM32_IRQ_USART1,
   .baud          = CONFIG_STM32_HCIUART1_BAUD,
-#if defined(CONFIG_STM32_STM32F33XX)
+#  if defined(CONFIG_STM32_STM32F33XX)
   .apbclock      = STM32_PCLK1_FREQUENCY, /* Errata 2.5.1 */
-#else
+#  else
   .apbclock      = STM32_PCLK2_FREQUENCY,
-#endif
+#  endif
   .usartbase     = STM32_USART1_BASE,
   .tx_gpio       = GPIO_USART1_TX,
   .rx_gpio       = GPIO_USART1_RX,
@@ -416,9 +416,9 @@ static const struct hciuart_config_s g_hciusart1_config =
 
 static uint8_t g_usart2_rxbuffer[CONFIG_STM32_HCIUART2_RXBUFSIZE];
 static uint8_t g_usart2_txbuffer[CONFIG_STM32_HCIUART2_TXBUFSIZE];
-# ifdef CONFIG_STM32_HCIUART2_RXDMA
+#  ifdef CONFIG_STM32_HCIUART2_RXDMA
 static uint8_t g_usart2_rxdmabuffer[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 
 /* HCI USART2 variable state information */
 
@@ -445,18 +445,18 @@ static const struct hciuart_config_s g_hciusart2_config =
 
   .rxbuffer      = g_usart2_rxbuffer,
   .txbuffer      = g_usart2_txbuffer,
-#ifdef CONFIG_STM32_HCIUART2_RXDMA
+#  ifdef CONFIG_STM32_HCIUART2_RXDMA
   .rxdmabuffer   = g_usart2_rxdmabuffer,
-#endif
+#  endif
   .rxbufsize     = CONFIG_STM32_HCIUART2_RXBUFSIZE,
   .txbufsize     = CONFIG_STM32_HCIUART2_TXBUFSIZE,
-#ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
+#  ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
   .rxupper       = RXFLOW_UPPER(CONFIG_STM32_HCIUART2_RXBUFSIZE),
   .rxlower       = RXFLOW_LOWER(CONFIG_STM32_HCIUART2_RXBUFSIZE),
-#endif
-#ifdef CONFIG_STM32_HCIUART_RXDMA
+#  endif
+#  ifdef CONFIG_STM32_HCIUART_RXDMA
   .rxdmachan     = DMAMAP_USART2_RX,
-#endif
+#  endif
 
   .irq           = STM32_IRQ_USART2,
   .baud          = CONFIG_STM32_HCIUART2_BAUD,
@@ -476,9 +476,9 @@ static const struct hciuart_config_s g_hciusart2_config =
 
 static uint8_t g_usart3_rxbuffer[CONFIG_STM32_HCIUART3_RXBUFSIZE];
 static uint8_t g_usart3_txbuffer[CONFIG_STM32_HCIUART3_TXBUFSIZE];
-#ifdef CONFIG_STM32_HCIUART3_RXDMA
+#  ifdef CONFIG_STM32_HCIUART3_RXDMA
 static uint8_t g_usart3_rxdmabuffer[RXDMA_BUFFER_SIZE];
-#endif
+#  endif
 
 /* HCI USART3 variable state information */
 
@@ -505,18 +505,18 @@ static const struct hciuart_config_s g_hciusart3_config =
 
   .rxbuffer      = g_usart3_rxbuffer,
   .txbuffer      = g_usart3_txbuffer,
-#ifdef CONFIG_STM32_HCIUART3_RXDMA
+#  ifdef CONFIG_STM32_HCIUART3_RXDMA
   .rxdmabuffer   = g_usart3_rxdmabuffer,
-#endif
+#  endif
   .rxbufsize     = CONFIG_STM32_HCIUART3_RXBUFSIZE,
   .txbufsize     = CONFIG_STM32_HCIUART3_TXBUFSIZE,
-#ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
+#  ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
   .rxupper       = RXFLOW_UPPER(CONFIG_STM32_HCIUART3_RXBUFSIZE),
   .rxlower       = RXFLOW_LOWER(CONFIG_STM32_HCIUART3_RXBUFSIZE),
-#endif
-#ifdef CONFIG_STM32_HCIUART_RXDMA
+#  endif
+#  ifdef CONFIG_STM32_HCIUART_RXDMA
   .rxdmachan     = DMAMAP_USART3_RX,
-#endif
+#  endif
 
   .irq           = STM32_IRQ_USART3,
   .baud          = CONFIG_STM32_HCIUART3_BAUD,
@@ -534,13 +534,11 @@ static const struct hciuart_config_s g_hciusart3_config =
 #ifdef CONFIG_STM32_USART6_HCIUART
 /* I/O buffers */
 
-#ifdef CONFIG_STM32_USART6_HCIUART
 static uint8_t g_usart6_rxbuffer[CONFIG_STM32_HCIUART6_RXBUFSIZE];
 static uint8_t g_usart6_txbuffer[CONFIG_STM32_HCIUART6_TXBUFSIZE];
-# ifdef CONFIG_STM32_HCIUART6_RXDMA
+#  ifdef CONFIG_STM32_HCIUART6_RXDMA
 static uint8_t g_usart6_rxdmabuffer[RXDMA_BUFFER_SIZE];
-# endif
-#endif
+#  endif
 
 /* HCI USART6 variable state information */
 
@@ -567,18 +565,18 @@ static const struct hciuart_config_s g_hciusart6_config =
 
   .rxbuffer      = g_usart6_rxbuffer,
   .txbuffer      = g_usart6_txbuffer,
-#ifdef CONFIG_STM32_HCIUART6_RXDMA
+#  ifdef CONFIG_STM32_HCIUART6_RXDMA
   .rxdmabuffer   = g_usart6_rxdmabuffer,
-#endif
+#  endif
   .rxbufsize     = CONFIG_STM32_HCIUART6_RXBUFSIZE,
   .txbufsize     = CONFIG_STM32_HCIUART6_TXBUFSIZE,
-#ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
+#  ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
   .rxupper       = RXFLOW_UPPER(CONFIG_STM32_HCIUART6_RXBUFSIZE),
   .rxlower       = RXFLOW_LOWER(CONFIG_STM32_HCIUART6_RXBUFSIZE),
-#endif
-#ifdef CONFIG_STM32_HCIUART_RXDMA
+#  endif
+#  ifdef CONFIG_STM32_HCIUART_RXDMA
   .rxdmachan     = DMAMAP_USART6_RX,
-#endif
+#  endif
 
   .irq           = STM32_IRQ_USART6,
   .baud          = CONFIG_STM32_HCIUART6_BAUD,
@@ -598,9 +596,9 @@ static const struct hciuart_config_s g_hciusart6_config =
 
 static uint8_t g_uart7_rxbuffer[CONFIG_STM32_HCIUART7_RXBUFSIZE];
 static uint8_t g_uart7_txbuffer[CONFIG_STM32_HCIUART7_TXBUFSIZE];
-#ifdef CONFIG_STM32_HCIUART7_RXDMA
+#  ifdef CONFIG_STM32_HCIUART7_RXDMA
 static uint8_t g_uart7_rxdmabuffer[RXDMA_BUFFER_SIZE];
-#endif
+#  endif
 
 /* HCI UART7 variable state information */
 
@@ -627,18 +625,18 @@ static const struct hciuart_config_s g_hciuart7_config =
 
   .rxbuffer      = g_uart7_rxbuffer,
   .txbuffer      = g_uart7_txbuffer,
-#ifdef CONFIG_STM32_HCIUART7_RXDMA
+#  ifdef CONFIG_STM32_HCIUART7_RXDMA
   .rxdmabuffer   = g_uart7_rxdmabuffer,
-#endif
+#  endif
   .rxbufsize     = CONFIG_STM32_HCIUART7_RXBUFSIZE,
   .txbufsize     = CONFIG_STM32_HCIUART7_TXBUFSIZE,
-#ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
+#  ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
   .rxupper       = RXFLOW_UPPER(CONFIG_STM32_HCIUART7_RXBUFSIZE),
   .rxlower       = RXFLOW_LOWER(CONFIG_STM32_HCIUART7_RXBUFSIZE),
-#endif
-#ifdef CONFIG_STM32_HCIUART_RXDMA
+#  endif
+#  ifdef CONFIG_STM32_HCIUART_RXDMA
   .rxdmachan     = DMAMAP_UART7_RX,
-#endif
+#  endif
 
   .irq           = STM32_IRQ_UART7,
   .baud          = CONFIG_STM32_HCIUART7_BAUD,
@@ -658,9 +656,9 @@ static const struct hciuart_config_s g_hciuart7_config =
 
 static uint8_t g_uart8_rxbuffer[CONFIG_STM32_HCIUART8_RXBUFSIZE];
 static uint8_t g_uart8_txbuffer[CONFIG_STM32_HCIUART8_TXBUFSIZE];
-#ifdef CONFIG_STM32_HCIUART8_RXDMA
+#  ifdef CONFIG_STM32_HCIUART8_RXDMA
 static uint8_t g_uart8_rxdmabuffer[RXDMA_BUFFER_SIZE];
-#endif
+#  endif
 
 /* HCI UART8 variable state information */
 
@@ -687,18 +685,18 @@ static const struct hciuart_config_s g_hciuart8_config =
 
   .rxbuffer      = g_uart8_rxbuffer,
   .txbuffer      = g_uart8_txbuffer,
-#ifdef CONFIG_STM32_HCIUART8_RXDMA
+#  ifdef CONFIG_STM32_HCIUART8_RXDMA
   .rxdmabuffer   = g_uart8_rxdmabuffer,
-#endif
+#  endif
   .rxbufsize     = CONFIG_STM32_HCIUART8_RXBUFSIZE,
   .txbufsize     = CONFIG_STM32_HCIUART8_TXBUFSIZE,
-#ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
+#  ifdef CONFIG_STM32_HCIUART_SW_RXFLOW
   .rxupper       = RXFLOW_UPPER(CONFIG_STM32_HCIUART8_RXBUFSIZE),
   .rxlower       = RXFLOW_LOWER(CONFIG_STM32_HCIUART8_RXBUFSIZE),
-#endif
-#ifdef CONFIG_STM32_HCIUART_RXDMA
+#  endif
+#  ifdef CONFIG_STM32_HCIUART_RXDMA
   .rxdmachan     = DMAMAP_UART8_RX,
-#endif
+#  endif
 
   .irq           = STM32_IRQ_UART8,
   .baud          = CONFIG_STM32_HCIUART8_BAUD,
diff --git a/arch/arm/src/stm32/stm32_i2s.c b/arch/arm/src/stm32/stm32_i2s.c
index c9dadf6bc2..d2e09b71b8 100644
--- a/arch/arm/src/stm32/stm32_i2s.c
+++ b/arch/arm/src/stm32/stm32_i2s.c
@@ -323,7 +323,7 @@ struct stm32_i2s_s
 static bool     i2s_checkreg(struct stm32_i2s_s *priv, bool wr,
                              uint16_t regval, uint32_t regaddr);
 #else
-# define        i2s_checkreg(priv,wr,regval,regaddr) (false)
+#  define       i2s_checkreg(priv,wr,regval,regaddr) (false)
 #endif
 
 static inline uint16_t i2s_getreg(struct stm32_i2s_s *priv, uint8_t offset);
diff --git a/arch/arm/src/stm32/stm32_iwdg.c b/arch/arm/src/stm32/stm32_iwdg.c
index 425aa343e8..77fa9f1101 100644
--- a/arch/arm/src/stm32/stm32_iwdg.c
+++ b/arch/arm/src/stm32/stm32_iwdg.c
@@ -128,8 +128,8 @@ struct stm32_lowerhalf_s
 static uint16_t stm32_getreg(uint32_t addr);
 static void     stm32_putreg(uint16_t val, uint32_t addr);
 #else
-# define        stm32_getreg(addr)     getreg16(addr)
-# define        stm32_putreg(val,addr) putreg16(val,addr)
+#  define       stm32_getreg(addr)     getreg16(addr)
+#  define       stm32_putreg(val,addr) putreg16(val,addr)
 #endif
 
 static inline void stm32_setprescaler(struct stm32_lowerhalf_s *priv);
diff --git a/arch/arm/src/stm32/stm32_otgfsdev.c b/arch/arm/src/stm32/stm32_otgfsdev.c
index 4969707df9..1af7cb48a1 100644
--- a/arch/arm/src/stm32/stm32_otgfsdev.c
+++ b/arch/arm/src/stm32/stm32_otgfsdev.c
@@ -505,8 +505,8 @@ struct stm32_usbdev_s
 static uint32_t    stm32_getreg(uint32_t addr);
 static void        stm32_putreg(uint32_t val, uint32_t addr);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(val,addr) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Request queue operations *************************************************/
@@ -5366,9 +5366,9 @@ static void stm32_hwinitialize(struct stm32_usbdev_s *priv)
 
   regval  = OTGFS_GCCFG_PWRDWN;
 
-# ifdef CONFIG_USBDEV_VBUSSENSING
+#  ifdef CONFIG_USBDEV_VBUSSENSING
   regval |= OTGFS_GCCFG_VBDEN;
-# endif
+#  endif
 
 #else
   /* In the case of the all others the meaning of the bit is No VBUS
@@ -5377,12 +5377,12 @@ static void stm32_hwinitialize(struct stm32_usbdev_s *priv)
 
   regval  = (OTGFS_GCCFG_PWRDWN | OTGFS_GCCFG_VBUSASEN |
              OTGFS_GCCFG_VBUSBSEN);
-# ifndef CONFIG_USBDEV_VBUSSENSING
+#  ifndef CONFIG_USBDEV_VBUSSENSING
   regval |= OTGFS_GCCFG_NOVBUSSENS;
-# endif
-# ifdef CONFIG_STM32_OTGFS_SOFOUTPUT
+#  endif
+#  ifdef CONFIG_STM32_OTGFS_SOFOUTPUT
   regval |= OTGFS_GCCFG_SOFOUTEN;
-# endif
+#  endif
 #endif
   stm32_putreg(regval, STM32_OTGFS_GCCFG);
   up_mdelay(20);
@@ -5392,11 +5392,11 @@ static void stm32_hwinitialize(struct stm32_usbdev_s *priv)
    */
 
 #if defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469)
-# ifndef CONFIG_USBDEV_VBUSSENSING
+#  ifndef CONFIG_USBDEV_VBUSSENSING
   regval  =  stm32_getreg(STM32_OTGFS_GOTGCTL);
   regval |= (OTGFS_GOTGCTL_BVALOEN | OTGFS_GOTGCTL_BVALOVAL);
   stm32_putreg(regval, STM32_OTGFS_GOTGCTL);
-# endif
+#  endif
 #endif
 
   /* Force Device Mode */
diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c
index f7513c3906..f328b28b6e 100644
--- a/arch/arm/src/stm32/stm32_otgfshost.c
+++ b/arch/arm/src/stm32/stm32_otgfshost.c
@@ -275,8 +275,8 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t addr, uint32_t value);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(addr,val) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(addr,val) putreg32(val,addr)
 #endif
 
 static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
diff --git a/arch/arm/src/stm32/stm32_otghsdev.c b/arch/arm/src/stm32/stm32_otghsdev.c
index 1b166047bd..cbbb251c88 100644
--- a/arch/arm/src/stm32/stm32_otghsdev.c
+++ b/arch/arm/src/stm32/stm32_otghsdev.c
@@ -455,8 +455,8 @@ struct stm32_usbdev_s
 static uint32_t    stm32_getreg(uint32_t addr);
 static void        stm32_putreg(uint32_t val, uint32_t addr);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(val,addr) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Request queue operations *************************************************/
diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c
index be55ad985a..ca6f045904 100644
--- a/arch/arm/src/stm32/stm32_otghshost.c
+++ b/arch/arm/src/stm32/stm32_otghshost.c
@@ -280,8 +280,8 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t addr, uint32_t value);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(addr,val) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(addr,val) putreg32(val,addr)
 #endif
 
 static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
diff --git a/arch/arm/src/stm32/stm32_rcc.c b/arch/arm/src/stm32/stm32_rcc.c
index 850ac21ed5..dcebf6e36d 100644
--- a/arch/arm/src/stm32/stm32_rcc.c
+++ b/arch/arm/src/stm32/stm32_rcc.c
@@ -82,11 +82,11 @@
  ****************************************************************************/
 
 #if defined(CONFIG_STM32_STM32L15XX)
-# define STM32_RCC_XXX       STM32_RCC_CSR
-# define RCC_XXX_YYYRST      RCC_CSR_RTCRST
+#  define STM32_RCC_XXX      STM32_RCC_CSR
+#  define RCC_XXX_YYYRST     RCC_CSR_RTCRST
 #else
-# define STM32_RCC_XXX       STM32_RCC_BDCR
-# define RCC_XXX_YYYRST      RCC_BDCR_BDRST
+#  define STM32_RCC_XXX      STM32_RCC_BDCR
+#  define RCC_XXX_YYYRST     RCC_BDCR_BDRST
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c
index 0b5552f331..ccc53df7b8 100644
--- a/arch/arm/src/stm32/stm32_serial.c
+++ b/arch/arm/src/stm32/stm32_serial.c
@@ -216,7 +216,7 @@
                  DMA_CCR_PSIZE_8BITS   | \
                  DMA_CCR_MSIZE_8BITS   | \
                  CONFIG_USART_RXDMAPRIO)
-# endif
+#  endif
 
 #endif  /* SERIAL_HAVE_RXDMA */
 
@@ -634,65 +634,65 @@ static const struct uart_ops_s g_uart_txdma_ops =
 #ifdef CONFIG_STM32_USART1_SERIALDRIVER
 static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
 static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
-# ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
 static char g_usart1rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_USART2_SERIALDRIVER
 static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
 static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
-# ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
 static char g_usart2rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_USART3_SERIALDRIVER
 static char g_usart3rxbuffer[CONFIG_USART3_RXBUFSIZE];
 static char g_usart3txbuffer[CONFIG_USART3_TXBUFSIZE];
-# ifdef CONFIG_USART3_RXDMA
+#  ifdef CONFIG_USART3_RXDMA
 static char g_usart3rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_UART4_SERIALDRIVER
 static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE];
 static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
-# ifdef CONFIG_UART4_RXDMA
+#  ifdef CONFIG_UART4_RXDMA
 static char g_uart4rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_UART5_SERIALDRIVER
 static char g_uart5rxbuffer[CONFIG_UART5_RXBUFSIZE];
 static char g_uart5txbuffer[CONFIG_UART5_TXBUFSIZE];
-# ifdef CONFIG_UART5_RXDMA
+#  ifdef CONFIG_UART5_RXDMA
 static char g_uart5rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_USART6_SERIALDRIVER
 static char g_usart6rxbuffer[CONFIG_USART6_RXBUFSIZE];
 static char g_usart6txbuffer[CONFIG_USART6_TXBUFSIZE];
-# ifdef CONFIG_USART6_RXDMA
+#  ifdef CONFIG_USART6_RXDMA
 static char g_usart6rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_UART7_SERIALDRIVER
 static char g_uart7rxbuffer[CONFIG_UART7_RXBUFSIZE];
 static char g_uart7txbuffer[CONFIG_UART7_TXBUFSIZE];
-# ifdef CONFIG_UART7_RXDMA
+#  ifdef CONFIG_UART7_RXDMA
 static char g_uart7rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32_UART8_SERIALDRIVER
 static char g_uart8rxbuffer[CONFIG_UART8_RXBUFSIZE];
 static char g_uart8txbuffer[CONFIG_UART8_TXBUFSIZE];
-# ifdef CONFIG_UART8_RXDMA
+#  ifdef CONFIG_UART8_RXDMA
 static char g_uart8rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 /* This describes the state of the STM32 USART1 ports. */
@@ -702,9 +702,9 @@ static struct up_dev_s g_usart1priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 1
+#  if CONSOLE_UART == 1
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART1_RXBUFSIZE,
@@ -715,15 +715,15 @@ static struct up_dev_s g_usart1priv =
         .size    = CONFIG_USART1_TXBUFSIZE,
         .buffer  = g_usart1txbuffer,
       },
-#if defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_TXDMA)
+#  if defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_USART1_RXDMA) && !defined(CONFIG_USART1_TXDMA)
+#  elif defined(CONFIG_USART1_RXDMA) && !defined(CONFIG_USART1_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_TXDMA)
+#  elif !defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart1priv,
     },
 
@@ -732,38 +732,38 @@ static struct up_dev_s g_usart1priv =
   .bits          = CONFIG_USART1_BITS,
   .stopbits2     = CONFIG_USART1_2STOP,
   .baud          = CONFIG_USART1_BAUD,
-#if defined(CONFIG_STM32_STM32F33XX) || defined(CONFIG_STM32_STM32F302)
+#  if defined(CONFIG_STM32_STM32F33XX) || defined(CONFIG_STM32_STM32F302)
   .apbclock      = STM32_PCLK1_FREQUENCY, /* Errata 2.5.1 */
-#else
+#  else
   .apbclock      = STM32_PCLK2_FREQUENCY,
-#endif
+#  endif
   .usartbase     = STM32_USART1_BASE,
   .tx_gpio       = GPIO_USART1_TX,
   .rx_gpio       = GPIO_USART1_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART1_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART1_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART1_RTS,
-#endif
-#ifdef CONFIG_USART1_TXDMA
+#  endif
+#  ifdef CONFIG_USART1_TXDMA
   .txdma_channel = DMAMAP_USART1_TX,
-#endif
-#ifdef CONFIG_USART1_RXDMA
+#  endif
+#  ifdef CONFIG_USART1_RXDMA
   .rxdma_channel = DMAMAP_USART1_RX,
   .rxfifo        = g_usart1rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART1_RS485
+#  ifdef CONFIG_USART1_RS485
   .rs485_dir_gpio = GPIO_USART1_RS485_DIR,
-#  if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -774,9 +774,9 @@ static struct up_dev_s g_usart2priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 2
+#  if CONSOLE_UART == 2
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART2_RXBUFSIZE,
@@ -787,15 +787,15 @@ static struct up_dev_s g_usart2priv =
         .size    = CONFIG_USART2_TXBUFSIZE,
         .buffer  = g_usart2txbuffer,
       },
-#if defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_TXDMA)
+#  if defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_USART2_RXDMA) && !defined(CONFIG_USART2_TXDMA)
+#  elif defined(CONFIG_USART2_RXDMA) && !defined(CONFIG_USART2_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_TXDMA)
+#  elif !defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart2priv,
     },
 
@@ -808,30 +808,30 @@ static struct up_dev_s g_usart2priv =
   .usartbase     = STM32_USART2_BASE,
   .tx_gpio       = GPIO_USART2_TX,
   .rx_gpio       = GPIO_USART2_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART2_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART2_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART2_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART2_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART2_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART2_RTS,
-#endif
-#ifdef CONFIG_USART2_TXDMA
+#  endif
+#  ifdef CONFIG_USART2_TXDMA
   .txdma_channel = DMAMAP_USART2_TX,
-#endif
-#ifdef CONFIG_USART2_RXDMA
+#  endif
+#  ifdef CONFIG_USART2_RXDMA
   .rxdma_channel = DMAMAP_USART2_RX,
   .rxfifo        = g_usart2rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART2_RS485
+#  ifdef CONFIG_USART2_RS485
   .rs485_dir_gpio = GPIO_USART2_RS485_DIR,
-#  if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -842,9 +842,9 @@ static struct up_dev_s g_usart3priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 3
+#  if CONSOLE_UART == 3
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART3_RXBUFSIZE,
@@ -855,15 +855,15 @@ static struct up_dev_s g_usart3priv =
         .size    = CONFIG_USART3_TXBUFSIZE,
         .buffer  = g_usart3txbuffer,
       },
-#if defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_TXDMA)
+#  if defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_USART3_RXDMA) && !defined(CONFIG_USART3_TXDMA)
+#  elif defined(CONFIG_USART3_RXDMA) && !defined(CONFIG_USART3_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_TXDMA)
+#  elif !defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart3priv,
     },
 
@@ -876,30 +876,30 @@ static struct up_dev_s g_usart3priv =
   .usartbase     = STM32_USART3_BASE,
   .tx_gpio       = GPIO_USART3_TX,
   .rx_gpio       = GPIO_USART3_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART3_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART3_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART3_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART3_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART3_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART3_RTS,
-#endif
-#ifdef CONFIG_USART3_TXDMA
+#  endif
+#  ifdef CONFIG_USART3_TXDMA
   .txdma_channel = DMAMAP_USART3_TX,
-#endif
-#ifdef CONFIG_USART3_RXDMA
+#  endif
+#  ifdef CONFIG_USART3_RXDMA
   .rxdma_channel = DMAMAP_USART3_RX,
   .rxfifo        = g_usart3rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART3_RS485
+#  ifdef CONFIG_USART3_RS485
   .rs485_dir_gpio = GPIO_USART3_RS485_DIR,
-#  if (CONFIG_USART3_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART3_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -910,9 +910,9 @@ static struct up_dev_s g_uart4priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 4
+#  if CONSOLE_UART == 4
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_UART4_RXBUFSIZE,
@@ -923,15 +923,15 @@ static struct up_dev_s g_uart4priv =
         .size    = CONFIG_UART4_TXBUFSIZE,
         .buffer  = g_uart4txbuffer,
       },
-#if defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_TXDMA)
+#  if defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_UART4_RXDMA) && !defined(CONFIG_UART4_TXDMA)
+#  elif defined(CONFIG_UART4_RXDMA) && !defined(CONFIG_UART4_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_TXDMA)
+#  elif !defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_uart4priv,
     },
 
@@ -939,35 +939,35 @@ static struct up_dev_s g_uart4priv =
   .parity        = CONFIG_UART4_PARITY,
   .bits          = CONFIG_UART4_BITS,
   .stopbits2     = CONFIG_UART4_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART4_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART4_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_UART4_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART4_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART4_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_UART4_RTS,
-#endif
+#  endif
   .baud          = CONFIG_UART4_BAUD,
   .apbclock      = STM32_PCLK1_FREQUENCY,
   .usartbase     = STM32_UART4_BASE,
   .tx_gpio       = GPIO_UART4_TX,
   .rx_gpio       = GPIO_UART4_RX,
-#ifdef CONFIG_UART4_TXDMA
+#  ifdef CONFIG_UART4_TXDMA
   .txdma_channel = DMAMAP_UART4_TX,
-#endif
-#ifdef CONFIG_UART4_RXDMA
+#  endif
+#  ifdef CONFIG_UART4_RXDMA
   .rxdma_channel = DMAMAP_UART4_RX,
   .rxfifo        = g_uart4rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_UART4_RS485
+#  ifdef CONFIG_UART4_RS485
   .rs485_dir_gpio = GPIO_UART4_RS485_DIR,
-#  if (CONFIG_UART4_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_UART4_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -978,9 +978,9 @@ static struct up_dev_s g_uart5priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 5
+#  if CONSOLE_UART == 5
       .isconsole = true,
-#endif
+#  endif
       .recv     =
       {
         .size   = CONFIG_UART5_RXBUFSIZE,
@@ -991,15 +991,15 @@ static struct up_dev_s g_uart5priv =
         .size   = CONFIG_UART5_TXBUFSIZE,
         .buffer = g_uart5txbuffer,
       },
-#if defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_TXDMA)
+#  if defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_UART5_RXDMA) && !defined(CONFIG_UART5_TXDMA)
+#  elif defined(CONFIG_UART5_RXDMA) && !defined(CONFIG_UART5_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_TXDMA)
+#  elif !defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv     = &g_uart5priv,
     },
 
@@ -1007,35 +1007,35 @@ static struct up_dev_s g_uart5priv =
   .parity         = CONFIG_UART5_PARITY,
   .bits           = CONFIG_UART5_BITS,
   .stopbits2      = CONFIG_UART5_2STOP,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART5_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART5_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_UART5_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART5_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART5_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_UART5_RTS,
-#endif
+#  endif
   .baud           = CONFIG_UART5_BAUD,
   .apbclock       = STM32_PCLK1_FREQUENCY,
   .usartbase      = STM32_UART5_BASE,
   .tx_gpio        = GPIO_UART5_TX,
   .rx_gpio        = GPIO_UART5_RX,
-#ifdef CONFIG_UART5_TXDMA
+#  ifdef CONFIG_UART5_TXDMA
   .txdma_channel = DMAMAP_UART5_TX,
-#endif
-#ifdef CONFIG_UART5_RXDMA
+#  endif
+#  ifdef CONFIG_UART5_RXDMA
   .rxdma_channel = DMAMAP_UART5_RX,
   .rxfifo        = g_uart5rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_UART5_RS485
+#  ifdef CONFIG_UART5_RS485
   .rs485_dir_gpio = GPIO_UART5_RS485_DIR,
-#  if (CONFIG_UART5_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_UART5_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -1046,9 +1046,9 @@ static struct up_dev_s g_usart6priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 6
+#  if CONSOLE_UART == 6
       .isconsole = true,
-#endif
+#  endif
       .recv     =
       {
         .size   = CONFIG_USART6_RXBUFSIZE,
@@ -1059,15 +1059,15 @@ static struct up_dev_s g_usart6priv =
         .size   = CONFIG_USART6_TXBUFSIZE,
         .buffer = g_usart6txbuffer,
       },
-#if defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_TXDMA)
+#  if defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_USART6_RXDMA) && !defined(CONFIG_USART6_TXDMA)
+#  elif defined(CONFIG_USART6_RXDMA) && !defined(CONFIG_USART6_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_TXDMA)
+#  elif !defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv     = &g_usart6priv,
     },
 
@@ -1080,30 +1080,30 @@ static struct up_dev_s g_usart6priv =
   .usartbase      = STM32_USART6_BASE,
   .tx_gpio        = GPIO_USART6_TX,
   .rx_gpio        = GPIO_USART6_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART6_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART6_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = GPIO_USART6_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART6_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART6_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = GPIO_USART6_RTS,
-#endif
-#ifdef CONFIG_USART6_TXDMA
+#  endif
+#  ifdef CONFIG_USART6_TXDMA
   .txdma_channel = DMAMAP_USART6_TX,
-#endif
-#ifdef CONFIG_USART6_RXDMA
+#  endif
+#  ifdef CONFIG_USART6_RXDMA
   .rxdma_channel = DMAMAP_USART6_RX,
   .rxfifo        = g_usart6rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART6_RS485
+#  ifdef CONFIG_USART6_RS485
   .rs485_dir_gpio = GPIO_USART6_RS485_DIR,
-#  if (CONFIG_USART6_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART6_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -1114,9 +1114,9 @@ static struct up_dev_s g_uart7priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 7
+#  if CONSOLE_UART == 7
       .isconsole = true,
-#endif
+#  endif
       .recv     =
       {
         .size   = CONFIG_UART7_RXBUFSIZE,
@@ -1127,15 +1127,15 @@ static struct up_dev_s g_uart7priv =
         .size   = CONFIG_UART7_TXBUFSIZE,
         .buffer = g_uart7txbuffer,
       },
-#if defined(CONFIG_UART7_RXDMA) && defined(CONFIG_UART7_TXDMA)
+#  if defined(CONFIG_UART7_RXDMA) && defined(CONFIG_UART7_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_UART7_RXDMA) && !defined(CONFIG_UART7_TXDMA)
+#  elif defined(CONFIG_UART7_RXDMA) && !defined(CONFIG_UART7_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_UART7_RXDMA) && defined(CONFIG_UART7_TXDMA)
+#  elif !defined(CONFIG_UART7_RXDMA) && defined(CONFIG_UART7_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv     = &g_uart7priv,
     },
 
@@ -1148,30 +1148,30 @@ static struct up_dev_s g_uart7priv =
   .usartbase      = STM32_UART7_BASE,
   .tx_gpio        = GPIO_UART7_TX,
   .rx_gpio        = GPIO_UART7_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART7_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART7_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = GPIO_UART7_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART7_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART7_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = GPIO_UART7_RTS,
-#endif
-#ifdef CONFIG_UART7_TXDMA
+#  endif
+#  ifdef CONFIG_UART7_TXDMA
   .txdma_channel = DMAMAP_UART7_TX,
-#endif
-#ifdef CONFIG_UART7_RXDMA
+#  endif
+#  ifdef CONFIG_UART7_RXDMA
   .rxdma_channel = DMAMAP_UART7_RX,
   .rxfifo        = g_uart7rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_UART7_RS485
+#  ifdef CONFIG_UART7_RS485
   .rs485_dir_gpio = GPIO_UART7_RS485_DIR,
-#  if (CONFIG_UART7_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_UART7_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -1182,9 +1182,9 @@ static struct up_dev_s g_uart8priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 8
+#  if CONSOLE_UART == 8
       .isconsole = true,
-#endif
+#  endif
       .recv     =
       {
         .size   = CONFIG_UART8_RXBUFSIZE,
@@ -1195,15 +1195,15 @@ static struct up_dev_s g_uart8priv =
         .size   = CONFIG_UART8_TXBUFSIZE,
         .buffer = g_uart8txbuffer,
       },
-#if defined(CONFIG_UART8_RXDMA) && defined(CONFIG_UART8_TXDMA)
+#  if defined(CONFIG_UART8_RXDMA) && defined(CONFIG_UART8_TXDMA)
       .ops       = &g_uart_rxtxdma_ops,
-#elif defined(CONFIG_UART8_RXDMA) && !defined(CONFIG_UART8_TXDMA)
+#  elif defined(CONFIG_UART8_RXDMA) && !defined(CONFIG_UART8_TXDMA)
       .ops       = &g_uart_rxdma_ops,
-#elif !defined(CONFIG_UART8_RXDMA) && defined(CONFIG_UART8_TXDMA)
+#  elif !defined(CONFIG_UART8_RXDMA) && defined(CONFIG_UART8_TXDMA)
       .ops       = &g_uart_txdma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv     = &g_uart8priv,
     },
 
@@ -1216,30 +1216,30 @@ static struct up_dev_s g_uart8priv =
   .usartbase      = STM32_UART8_BASE,
   .tx_gpio        = GPIO_UART8_TX,
   .rx_gpio        = GPIO_UART8_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART8_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART8_OFLOWCONTROL)
   .oflow          = true,
   .cts_gpio       = GPIO_UART8_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART8_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART8_IFLOWCONTROL)
   .iflow          = true,
   .rts_gpio       = GPIO_UART8_RTS,
-#endif
-#ifdef CONFIG_UART8_TXDMA
+#  endif
+#  ifdef CONFIG_UART8_TXDMA
   .txdma_channel = DMAMAP_UART8_TX,
-#endif
-#ifdef CONFIG_UART8_RXDMA
+#  endif
+#  ifdef CONFIG_UART8_RXDMA
   .rxdma_channel = DMAMAP_UART8_RX,
   .rxfifo        = g_uart8rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_UART8_RS485
+#  ifdef CONFIG_UART8_RS485
   .rs485_dir_gpio = GPIO_UART8_RS485_DIR,
-#  if (CONFIG_UART8_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_UART8_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c
index 9a56acea35..1983684789 100644
--- a/arch/arm/src/stm32/stm32_usbdev.c
+++ b/arch/arm/src/stm32/stm32_usbdev.c
@@ -369,10 +369,10 @@ static void stm32_putreg(uint16_t val, uint32_t addr);
 static void stm32_checksetup(void);
 static void stm32_dumpep(int epno);
 #else
-# define stm32_getreg(addr)      getreg16(addr)
-# define stm32_putreg(val,addr)  putreg16(val,addr)
-# define stm32_checksetup()
-# define stm32_dumpep(epno)
+#  define stm32_getreg(addr)     getreg16(addr)
+#  define stm32_putreg(val,addr) putreg16(val,addr)
+#  define stm32_checksetup()
+#  define stm32_dumpep(epno)
 #endif
 
 /* Low-Level Helpers ********************************************************/
diff --git a/arch/arm/src/stm32/stm32_usbfs.c b/arch/arm/src/stm32/stm32_usbfs.c
index 3d5b717e8f..220b86b066 100644
--- a/arch/arm/src/stm32/stm32_usbfs.c
+++ b/arch/arm/src/stm32/stm32_usbfs.c
@@ -350,10 +350,10 @@ static void stm32_putreg(uint16_t val, uint32_t addr);
 static void stm32_checksetup(void);
 static void stm32_dumpep(int epno);
 #else
-# define stm32_getreg(addr)      getreg16(addr)
-# define stm32_putreg(val,addr)  putreg16(val,addr)
-# define stm32_checksetup()
-# define stm32_dumpep(epno)
+#  define stm32_getreg(addr)     getreg16(addr)
+#  define stm32_putreg(val,addr) putreg16(val,addr)
+#  define stm32_checksetup()
+#  define stm32_dumpep(epno)
 #endif
 
 /* Low-Level Helpers ********************************************************/
diff --git a/arch/arm/src/stm32/stm32_wwdg.c b/arch/arm/src/stm32/stm32_wwdg.c
index f99133bea4..aac9a289db 100644
--- a/arch/arm/src/stm32/stm32_wwdg.c
+++ b/arch/arm/src/stm32/stm32_wwdg.c
@@ -103,8 +103,8 @@ struct stm32_lowerhalf_s
 static uint16_t stm32_getreg(uint32_t addr);
 static void     stm32_putreg(uint16_t val, uint32_t addr);
 #else
-# define        stm32_getreg(addr)     getreg32(addr)
-# define        stm32_putreg(val,addr) putreg32(val,addr)
+#  define       stm32_getreg(addr)     getreg32(addr)
+#  define       stm32_putreg(val,addr) putreg32(val,addr)
 #endif
 static void     stm32_setwindow(struct stm32_lowerhalf_s *priv,
                   uint8_t window);
diff --git a/arch/arm/src/stm32/stm32f10xxx_rcc.c b/arch/arm/src/stm32/stm32f10xxx_rcc.c
index bd89aa0e57..cd3e346661 100644
--- a/arch/arm/src/stm32/stm32f10xxx_rcc.c
+++ b/arch/arm/src/stm32/stm32f10xxx_rcc.c
@@ -671,18 +671,18 @@ static void stm32_stdclockconfig(void)
 
   /* If this is a value-line part and we are using the HSE as the PLL */
 
-# if defined(CONFIG_STM32_VALUELINE) && (STM32_CFGR_PLLSRC == RCC_CFGR_PLLSRC)
+#  if defined(CONFIG_STM32_VALUELINE) && (STM32_CFGR_PLLSRC == RCC_CFGR_PLLSRC)
 
-# if (STM32_CFGR_PLLXTPRE >> 17) != (STM32_CFGR2_PREDIV1 & 1)
-#  error STM32_CFGR_PLLXTPRE must match the LSB of STM32_CFGR2_PREDIV1
-# endif
+#    if (STM32_CFGR_PLLXTPRE >> 17) != (STM32_CFGR2_PREDIV1 & 1)
+#      error STM32_CFGR_PLLXTPRE must match the LSB of STM32_CFGR2_PREDIV1
+#    endif
 
   /* Set the HSE prescaler */
 
   regval = STM32_CFGR2_PREDIV1;
   putreg32(regval, STM32_RCC_CFGR2);
 
-# endif
+#  endif
 #endif
 
   /* Value-line devices don't implement flash prefetch/waitstates */
diff --git a/arch/arm/src/stm32/stm32f37xxx_rcc.c b/arch/arm/src/stm32/stm32f37xxx_rcc.c
index c3d2ded4f6..08f797d087 100644
--- a/arch/arm/src/stm32/stm32f37xxx_rcc.c
+++ b/arch/arm/src/stm32/stm32f37xxx_rcc.c
@@ -519,16 +519,16 @@ static void stm32_stdclockconfig(void)
 
   /* If this is a value-line part and we are using the HSE as the PLL */
 
-# if (STM32_CFGR_PLLXTPRE >> 17) != (STM32_CFGR2_PREDIV & 1)
-#  error STM32_CFGR_PLLXTPRE must match the LSB of STM32_CFGR2_PREDIV
-# endif
+#  if (STM32_CFGR_PLLXTPRE >> 17) != (STM32_CFGR2_PREDIV & 1)
+#    error STM32_CFGR_PLLXTPRE must match the LSB of STM32_CFGR2_PREDIV
+#  endif
 
   /* Set the HSE prescaler */
 
   regval = STM32_CFGR2_PREDIV;
   putreg32(regval, STM32_RCC_CFGR2);
 
-# endif
+#endif
 
   /* Enable FLASH prefetch buffer and set FLASH wait states */
 
diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/arch/arm/src/stm32/stm32f40xxx_i2c.c
index a8aa2dc770..ced6566a35 100644
--- a/arch/arm/src/stm32/stm32f40xxx_i2c.c
+++ b/arch/arm/src/stm32/stm32f40xxx_i2c.c
@@ -150,14 +150,14 @@
 
 #ifdef CONFIG_STM32_I2C_DMA
 
-# if defined(CONFIG_I2C_DMAPRIO)
-#   if (CONFIG_I2C_DMAPRIO & ~DMA_SCR_PL_MASK) != 0
-#     error "Illegal value for CONFIG_I2C_DMAPRIO"
-#   endif
-#   define I2C_DMA_PRIO     CONFIG_I2C_DMAPRIO
-# else
-#   define I2C_DMA_PRIO     DMA_SCR_PRIMED
-# endif
+#  if defined(CONFIG_I2C_DMAPRIO)
+#    if (CONFIG_I2C_DMAPRIO & ~DMA_SCR_PL_MASK) != 0
+#      error "Illegal value for CONFIG_I2C_DMAPRIO"
+#    endif
+#    define I2C_DMA_PRIO     CONFIG_I2C_DMAPRIO
+#  else
+#    define I2C_DMA_PRIO     DMA_SCR_PRIMED
+#  endif
 
 #endif
 
@@ -431,10 +431,10 @@ static const struct stm32_i2c_config_s stm32_i2c2_config =
   .reset_bit  = RCC_APB1RSTR_I2C2RST,
   .scl_pin    = GPIO_I2C2_SCL,
   .sda_pin    = GPIO_I2C2_SDA,
-#ifndef CONFIG_I2C_POLLED
+#  ifndef CONFIG_I2C_POLLED
   .ev_irq     = STM32_IRQ_I2C2EV,
   .er_irq     = STM32_IRQ_I2C2ER
-#endif
+#  endif
 };
 
 static struct stm32_i2c_priv_s stm32_i2c2_priv =
@@ -443,9 +443,9 @@ static struct stm32_i2c_priv_s stm32_i2c2_priv =
   .config     = &stm32_i2c2_config,
   .refs       = 0,
   .lock       = NXMUTEX_INITIALIZER,
-#ifndef CONFIG_I2C_POLLED
+#  ifndef CONFIG_I2C_POLLED
   .sem_isr    = SEM_INITIALIZER(0),
-#endif
+#  endif
   .intstate   = INTSTATE_IDLE,
   .msgc       = 0,
   .msgv       = NULL,
@@ -453,13 +453,13 @@ static struct stm32_i2c_priv_s stm32_i2c2_priv =
   .dcnt       = 0,
   .flags      = 0,
   .status     = 0,
-#ifdef CONFIG_STM32_I2C_DMA
-# ifndef CONFIG_STM32_DMA1
-#   error "I2C2 enabled with DMA but corresponding DMA controller 1 is not enabled!"
-# endif
+#  ifdef CONFIG_STM32_I2C_DMA
+#    ifndef CONFIG_STM32_DMA1
+#      error "I2C2 enabled with DMA but corresponding DMA controller 1 is not enabled!"
+#    endif
   .rxch       = DMAMAP_I2C2_RX,
   .txch       = DMAMAP_I2C2_TX,
-#endif
+#  endif
 };
 #endif
 
@@ -471,10 +471,10 @@ static const struct stm32_i2c_config_s stm32_i2c3_config =
   .reset_bit  = RCC_APB1RSTR_I2C3RST,
   .scl_pin    = GPIO_I2C3_SCL,
   .sda_pin    = GPIO_I2C3_SDA,
-#ifndef CONFIG_I2C_POLLED
+#  ifndef CONFIG_I2C_POLLED
   .ev_irq     = STM32_IRQ_I2C3EV,
   .er_irq     = STM32_IRQ_I2C3ER
-#endif
+#  endif
 };
 
 static struct stm32_i2c_priv_s stm32_i2c3_priv =
@@ -483,9 +483,9 @@ static struct stm32_i2c_priv_s stm32_i2c3_priv =
   .config     = &stm32_i2c3_config,
   .refs       = 0,
   .lock       = NXMUTEX_INITIALIZER,
-#ifndef CONFIG_I2C_POLLED
+#  ifndef CONFIG_I2C_POLLED
   .sem_isr    = SEM_INITIALIZER(0),
-#endif
+#  endif
   .intstate   = INTSTATE_IDLE,
   .msgc       = 0,
   .msgv       = NULL,
@@ -493,13 +493,13 @@ static struct stm32_i2c_priv_s stm32_i2c3_priv =
   .dcnt       = 0,
   .flags      = 0,
   .status     = 0,
-#ifdef CONFIG_STM32_I2C_DMA
-# ifndef CONFIG_STM32_DMA1
-#   error "I2C3 enabled with DMA but corresponding DMA controller 1 is not enabled!"
-# endif
+#  ifdef CONFIG_STM32_I2C_DMA
+#    ifndef CONFIG_STM32_DMA1
+#      error "I2C3 enabled with DMA but corresponding DMA controller 1 is not enabled!"
+#    endif
   .rxch       = DMAMAP_I2C3_RX,
   .txch       = DMAMAP_I2C3_TX,
-#endif
+#  endif
 };
 #endif
 
diff --git a/arch/arm/src/stm32/stm32f40xxx_rtcc.c b/arch/arm/src/stm32/stm32f40xxx_rtcc.c
index aacc475b71..c53f1f5a91 100644
--- a/arch/arm/src/stm32/stm32f40xxx_rtcc.c
+++ b/arch/arm/src/stm32/stm32f40xxx_rtcc.c
@@ -76,13 +76,13 @@
 
 /* Proxy definitions to make the same code work for all the STM32 series ****/
 
-# define STM32_RCC_XXX       STM32_RCC_BDCR
-# define RCC_XXX_YYYRST      RCC_BDCR_BDRST
-# define RCC_XXX_RTCEN       RCC_BDCR_RTCEN
-# define RCC_XXX_RTCSEL_MASK RCC_BDCR_RTCSEL_MASK
-# define RCC_XXX_RTCSEL_LSE  RCC_BDCR_RTCSEL_LSE
-# define RCC_XXX_RTCSEL_LSI  RCC_BDCR_RTCSEL_LSI
-# define RCC_XXX_RTCSEL_HSE  RCC_BDCR_RTCSEL_HSE
+#  define STM32_RCC_XXX       STM32_RCC_BDCR
+#  define RCC_XXX_YYYRST      RCC_BDCR_BDRST
+#  define RCC_XXX_RTCEN       RCC_BDCR_RTCEN
+#  define RCC_XXX_RTCSEL_MASK RCC_BDCR_RTCSEL_MASK
+#  define RCC_XXX_RTCSEL_LSE  RCC_BDCR_RTCSEL_LSE
+#  define RCC_XXX_RTCSEL_LSI  RCC_BDCR_RTCSEL_LSI
+#  define RCC_XXX_RTCSEL_HSE  RCC_BDCR_RTCSEL_HSE
 
 /* Time conversions */
 
diff --git a/arch/arm/src/stm32/stm32l15xxx_rtcc.c b/arch/arm/src/stm32/stm32l15xxx_rtcc.c
index 894df0b029..7cec587c5b 100644
--- a/arch/arm/src/stm32/stm32l15xxx_rtcc.c
+++ b/arch/arm/src/stm32/stm32l15xxx_rtcc.c
@@ -75,7 +75,7 @@
 #endif
 
 #if !defined(CONFIG_STM32_RTC_MAGIC)
-# define CONFIG_STM32_RTC_MAGIC           (0xfacefeed)
+#  define CONFIG_STM32_RTC_MAGIC          (0xfacefeed)
 #endif
 
 #if !defined(CONFIG_STM32_RTC_MAGIC_TIME_SET)
@@ -83,7 +83,7 @@
 #endif
 
 #if !defined(CONFIG_STM32_RTC_MAGIC_REG)
-# define CONFIG_STM32_RTC_MAGIC_REG       (0)
+#  define CONFIG_STM32_RTC_MAGIC_REG      (0)
 #endif
 
 #define RTC_MAGIC                         CONFIG_STM32_RTC_MAGIC
diff --git a/arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h b/arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h
index 9d198302dd..60766a7d7d 100644
--- a/arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h
+++ b/arch/arm/src/stm32f0l0g0/hardware/stm32_uart_v2.h
@@ -334,17 +334,17 @@
 
 #define USART_PRESC_SHIFT         (0)       /* Bits 0-3: Clock prescaler */
 #define USART_PRESC_MASK          (15 << USART_PRESC_SHIFT)
-# define USART_PRESC_NODIV        (0 << USART_PRESC_SHIFT)  /* Input clock not divided */
-# define USART_PRESC_DIV1         (1 << USART_PRESC_SHIFT)  /* Input clock divided by 2 */
-# define USART_PRESC_DIV4         (2 << USART_PRESC_SHIFT)  /* Input clock divided by 4 */
-# define USART_PRESC_DIV6         (3 << USART_PRESC_SHIFT)  /* Input clock divided by 6 */
-# define USART_PRESC_DIV8         (4 << USART_PRESC_SHIFT)  /* Input clock divided by 8 */
-# define USART_PRESC_DIV10        (5 << USART_PRESC_SHIFT)  /* Input clock divided by 10 */
-# define USART_PRESC_DIV12        (6 << USART_PRESC_SHIFT)  /* Input clock divided by 12 */
-# define USART_PRESC_DIV16        (7 << USART_PRESC_SHIFT)  /* Input clock divided by 16 */
-# define USART_PRESC_DIV32        (8 << USART_PRESC_SHIFT)  /* Input clock divided by 32 */
-# define USART_PRESC_DIV64        (9 << USART_PRESC_SHIFT)  /* Input clock divided by 64 */
-# define USART_PRESC_DIV128       (10 << USART_PRESC_SHIFT) /* Input clock divided by 128 */
-# define USART_PRESC_DIV256       (11 << USART_PRESC_SHIFT) /* Input clock divided by 256 */
+#  define USART_PRESC_NODIV       (0 << USART_PRESC_SHIFT)  /* Input clock not divided */
+#  define USART_PRESC_DIV1        (1 << USART_PRESC_SHIFT)  /* Input clock divided by 2 */
+#  define USART_PRESC_DIV4        (2 << USART_PRESC_SHIFT)  /* Input clock divided by 4 */
+#  define USART_PRESC_DIV6        (3 << USART_PRESC_SHIFT)  /* Input clock divided by 6 */
+#  define USART_PRESC_DIV8        (4 << USART_PRESC_SHIFT)  /* Input clock divided by 8 */
+#  define USART_PRESC_DIV10       (5 << USART_PRESC_SHIFT)  /* Input clock divided by 10 */
+#  define USART_PRESC_DIV12       (6 << USART_PRESC_SHIFT)  /* Input clock divided by 12 */
+#  define USART_PRESC_DIV16       (7 << USART_PRESC_SHIFT)  /* Input clock divided by 16 */
+#  define USART_PRESC_DIV32       (8 << USART_PRESC_SHIFT)  /* Input clock divided by 32 */
+#  define USART_PRESC_DIV64       (9 << USART_PRESC_SHIFT)  /* Input clock divided by 64 */
+#  define USART_PRESC_DIV128      (10 << USART_PRESC_SHIFT) /* Input clock divided by 128 */
+#  define USART_PRESC_DIV256      (11 << USART_PRESC_SHIFT) /* Input clock divided by 256 */
 
 #endif /* __ARCH_ARM_SRC_STM32F0L0G0_HARDWARE_STM32_UART_V2_H */
diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c b/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c
index b37b94fbe2..4b572fffea 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c
@@ -311,9 +311,9 @@ static const struct uart_ops_s g_uart_ops =
   .receive        = stm32serial_receive,
   .rxint          = stm32serial_rxint,
   .rxavailable    = stm32serial_rxavailable,
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
+#  ifdef CONFIG_SERIAL_IFLOWCONTROL
   .rxflowcontrol  = stm32serial_rxflowcontrol,
-#endif
+#  endif
   .send           = stm32serial_send,
   .txint          = stm32serial_txint,
   .txready        = stm32serial_txready,
@@ -332,9 +332,9 @@ static const struct uart_ops_s g_uart_dma_ops =
   .receive        = stm32serial_dmareceive,
   .rxint          = stm32serial_dmarxint,
   .rxavailable    = stm32serial_dmarxavailable,
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
+#  ifdef CONFIG_SERIAL_IFLOWCONTROL
   .rxflowcontrol  = stm32serial_rxflowcontrol,
-#endif
+#  endif
   .send           = stm32serial_send,
   .txint          = stm32serial_txint,
   .txready        = stm32serial_txready,
@@ -347,41 +347,41 @@ static const struct uart_ops_s g_uart_dma_ops =
 #ifdef CONFIG_STM32F0L0G0_USART1
 static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
 static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
-# ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
 static char g_usart1rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32F0L0G0_USART2
 static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
 static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
-# ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
 static char g_usart2rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32F0L0G0_USART3
 static char g_usart3rxbuffer[CONFIG_USART3_RXBUFSIZE];
 static char g_usart3txbuffer[CONFIG_USART3_TXBUFSIZE];
-# ifdef CONFIG_USART3_RXDMA
+#  ifdef CONFIG_USART3_RXDMA
 static char g_usart3rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32F0L0G0_USART4
 static char g_usart4rxbuffer[CONFIG_USART4_RXBUFSIZE];
 static char g_usart4txbuffer[CONFIG_USART4_TXBUFSIZE];
-# ifdef CONFIG_USART4_RXDMA
+#  ifdef CONFIG_USART4_RXDMA
 static char g_usart4rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32F0L0G0_USART5
 static char g_usart5rxbuffer[CONFIG_USART5_RXBUFSIZE];
 static char g_usart5txbuffer[CONFIG_USART5_TXBUFSIZE];
-# ifdef CONFIG_USART5_RXDMA
+#  ifdef CONFIG_USART5_RXDMA
 static char g_usart5rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 /* This describes the state of the STM32 USART1 ports. */
@@ -391,9 +391,9 @@ static struct stm32_serial_s g_usart1priv =
 {
   .dev =
     {
-#if CONSOLE_USART == 1
+#  if CONSOLE_USART == 1
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART1_RXBUFSIZE,
@@ -404,11 +404,11 @@ static struct stm32_serial_s g_usart1priv =
         .size    = CONFIG_USART1_TXBUFSIZE,
         .buffer  = g_usart1txbuffer,
       },
-#ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart1priv,
     },
 
@@ -421,27 +421,27 @@ static struct stm32_serial_s g_usart1priv =
   .usartbase     = STM32_USART1_BASE,
   .tx_gpio       = GPIO_USART1_TX,
   .rx_gpio       = GPIO_USART1_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART1_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART1_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART1_RTS,
-#endif
-#ifdef CONFIG_USART1_RXDMA
+#  endif
+#  ifdef CONFIG_USART1_RXDMA
   .rxdma_channel = DMAMAP_USART1_RX,
   .rxfifo        = g_usart1rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART1_RS485
+#  ifdef CONFIG_USART1_RS485
   .rs485_dir_gpio = GPIO_USART1_RS485_DIR,
-#  if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -452,9 +452,9 @@ static struct stm32_serial_s g_usart2priv =
 {
   .dev =
     {
-#if CONSOLE_USART == 2
+#  if CONSOLE_USART == 2
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART2_RXBUFSIZE,
@@ -465,11 +465,11 @@ static struct stm32_serial_s g_usart2priv =
         .size    = CONFIG_USART2_TXBUFSIZE,
         .buffer  = g_usart2txbuffer,
       },
-#ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart2priv,
     },
 
@@ -482,27 +482,27 @@ static struct stm32_serial_s g_usart2priv =
   .usartbase     = STM32_USART2_BASE,
   .tx_gpio       = GPIO_USART2_TX,
   .rx_gpio       = GPIO_USART2_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART2_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART2_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART2_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART2_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART2_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART2_RTS,
-#endif
-#ifdef CONFIG_USART2_RXDMA
+#  endif
+#  ifdef CONFIG_USART2_RXDMA
   .rxdma_channel = DMAMAP_USART2_RX,
   .rxfifo        = g_usart2rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART2_RS485
+#  ifdef CONFIG_USART2_RS485
   .rs485_dir_gpio = GPIO_USART2_RS485_DIR,
-#  if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -513,9 +513,9 @@ static struct stm32_serial_s g_usart3priv =
 {
   .dev =
     {
-#if CONSOLE_USART == 3
+#  if CONSOLE_USART == 3
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART3_RXBUFSIZE,
@@ -526,11 +526,11 @@ static struct stm32_serial_s g_usart3priv =
         .size    = CONFIG_USART3_TXBUFSIZE,
         .buffer  = g_usart3txbuffer,
       },
-#ifdef CONFIG_USART3_RXDMA
+#  ifdef CONFIG_USART3_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart3priv,
     },
 
@@ -543,27 +543,27 @@ static struct stm32_serial_s g_usart3priv =
   .usartbase     = STM32_USART3_BASE,
   .tx_gpio       = GPIO_USART3_TX,
   .rx_gpio       = GPIO_USART3_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART3_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART3_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART3_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART3_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART3_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART3_RTS,
-#endif
-#ifdef CONFIG_USART3_RXDMA
+#  endif
+#  ifdef CONFIG_USART3_RXDMA
   .rxdma_channel = DMAMAP_USART3_RX,
   .rxfifo        = g_usart3rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART3_RS485
+#  ifdef CONFIG_USART3_RS485
   .rs485_dir_gpio = GPIO_USART3_RS485_DIR,
-#  if (CONFIG_USART3_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART3_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -574,9 +574,9 @@ static struct stm32_serial_s g_usart4priv =
 {
   .dev =
     {
-#if CONSOLE_USART == 4
+#  if CONSOLE_USART == 4
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART4_RXBUFSIZE,
@@ -587,11 +587,11 @@ static struct stm32_serial_s g_usart4priv =
         .size    = CONFIG_USART4_TXBUFSIZE,
         .buffer  = g_usart4txbuffer,
       },
-#ifdef CONFIG_USART4_RXDMA
+#  ifdef CONFIG_USART4_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart4priv,
     },
 
@@ -599,36 +599,36 @@ static struct stm32_serial_s g_usart4priv =
   .parity        = CONFIG_USART4_PARITY,
   .bits          = CONFIG_USART4_BITS,
   .stopbits2     = CONFIG_USART4_2STOP,
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
+#  ifdef CONFIG_SERIAL_IFLOWCONTROL
   .iflow         = false,
-#endif
-#ifdef CONFIG_SERIAL_OFLOWCONTROL
+#  endif
+#  ifdef CONFIG_SERIAL_OFLOWCONTROL
   .oflow         = false,
-#endif
+#  endif
   .baud          = CONFIG_USART4_BAUD,
   .apbclock      = STM32_PCLK1_FREQUENCY,
   .usartbase     = STM32_USART4_BASE,
   .tx_gpio       = GPIO_USART4_TX,
   .rx_gpio       = GPIO_USART4_RX,
-#ifdef CONFIG_SERIAL_OFLOWCONTROL
+#  ifdef CONFIG_SERIAL_OFLOWCONTROL
   .cts_gpio      = 0,
-#endif
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
+#  endif
+#  ifdef CONFIG_SERIAL_IFLOWCONTROL
   .rts_gpio      = 0,
-#endif
-#ifdef CONFIG_USART4_RXDMA
+#  endif
+#  ifdef CONFIG_USART4_RXDMA
   .rxdma_channel = DMAMAP_USART4_RX,
   .rxfifo        = g_usart4rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART4_RS485
+#  ifdef CONFIG_USART4_RS485
   .rs485_dir_gpio = GPIO_USART4_RS485_DIR,
-#  if (CONFIG_USART4_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART4_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -639,9 +639,9 @@ static struct stm32_serial_s g_usart5priv =
 {
   .dev =
     {
-#if CONSOLE_USART == 5
+#  if CONSOLE_USART == 5
       .isconsole = true,
-#endif
+#  endif
       .recv     =
       {
         .size   = CONFIG_USART5_RXBUFSIZE,
@@ -652,11 +652,11 @@ static struct stm32_serial_s g_usart5priv =
         .size   = CONFIG_USART5_TXBUFSIZE,
         .buffer = g_usart5txbuffer,
       },
-#ifdef CONFIG_USART5_RXDMA
+#  ifdef CONFIG_USART5_RXDMA
       .ops      = &g_uart_dma_ops,
-#else
+#  else
       .ops      = &g_uart_ops,
-#endif
+#  endif
       .priv     = &g_usart5priv,
     },
 
@@ -664,36 +664,36 @@ static struct stm32_serial_s g_usart5priv =
   .parity         = CONFIG_USART5_PARITY,
   .bits           = CONFIG_USART5_BITS,
   .stopbits2      = CONFIG_USART5_2STOP,
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
+#  ifdef CONFIG_SERIAL_IFLOWCONTROL
   .iflow         = false,
-#endif
-#ifdef CONFIG_SERIAL_OFLOWCONTROL
+#  endif
+#  ifdef CONFIG_SERIAL_OFLOWCONTROL
   .oflow         = false,
-#endif
+#  endif
   .baud           = CONFIG_USART5_BAUD,
   .apbclock       = STM32_PCLK1_FREQUENCY,
   .usartbase      = STM32_USART5_BASE,
   .tx_gpio        = GPIO_USART5_TX,
   .rx_gpio        = GPIO_USART5_RX,
-#ifdef CONFIG_SERIAL_OFLOWCONTROL
+#  ifdef CONFIG_SERIAL_OFLOWCONTROL
   .cts_gpio      = 0,
-#endif
-#ifdef CONFIG_SERIAL_IFLOWCONTROL
+#  endif
+#  ifdef CONFIG_SERIAL_IFLOWCONTROL
   .rts_gpio      = 0,
-#endif
-#ifdef CONFIG_USART5_RXDMA
+#  endif
+#  ifdef CONFIG_USART5_RXDMA
   .rxdma_channel = DMAMAP_USART5_RX,
   .rxfifo        = g_usart5rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART5_RS485
+#  ifdef CONFIG_USART5_RS485
   .rs485_dir_gpio = GPIO_USART5_RS485_DIR,
-#  if (CONFIG_USART5_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART5_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
diff --git a/arch/arm/src/stm32f0l0g0/stm32_usbdev.c b/arch/arm/src/stm32f0l0g0/stm32_usbdev.c
index 7c5a86ddea..f681d58dae 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_usbdev.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_usbdev.c
@@ -353,9 +353,9 @@ static uint16_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint16_t val, uint32_t addr);
 static void stm32_dumpep(int epno);
 #else
-# define stm32_getreg(addr)      getreg16(addr)
-# define stm32_putreg(val,addr)  putreg16(val,addr)
-# define stm32_dumpep(epno)
+#  define stm32_getreg(addr)     getreg16(addr)
+#  define stm32_putreg(val,addr) putreg16(val,addr)
+#  define stm32_dumpep(epno)
 #endif
 
 /* Low-Level Helpers ********************************************************/
diff --git a/arch/arm/src/stm32f7/hardware/stm32_sai.h b/arch/arm/src/stm32f7/hardware/stm32_sai.h
index 85b9abd80e..755d194f81 100644
--- a/arch/arm/src/stm32f7/hardware/stm32_sai.h
+++ b/arch/arm/src/stm32f7/hardware/stm32_sai.h
@@ -127,12 +127,12 @@
                                              /* Bit 4: Reserved */
 #define SAI_CR1_DS_SHIFT           (5)       /* Bits 5-7: Data size */
 #define SAI_CR1_DS_MASK            (7 << SAI_CR1_DS_SHIFT)
-# define SAI_CR1_DS_8BITS          (2 << SAI_CR1_DS_SHIFT) /* 8 bits */
-# define SAI_CR1_DS_10BITS         (3 << SAI_CR1_DS_SHIFT) /* 10 bits */
-# define SAI_CR1_DS_16BITS         (4 << SAI_CR1_DS_SHIFT) /* 16 bits */
-# define SAI_CR1_DS_20BITS         (5 << SAI_CR1_DS_SHIFT) /* 20 bits */
-# define SAI_CR1_DS_24BITS         (6 << SAI_CR1_DS_SHIFT) /* 24 bits */
-# define SAI_CR1_DS_32BITS         (7 << SAI_CR1_DS_SHIFT) /* 32 bits */
+#  define SAI_CR1_DS_8BITS         (2 << SAI_CR1_DS_SHIFT) /* 8 bits */
+#  define SAI_CR1_DS_10BITS        (3 << SAI_CR1_DS_SHIFT) /* 10 bits */
+#  define SAI_CR1_DS_16BITS        (4 << SAI_CR1_DS_SHIFT) /* 16 bits */
+#  define SAI_CR1_DS_20BITS        (5 << SAI_CR1_DS_SHIFT) /* 20 bits */
+#  define SAI_CR1_DS_24BITS        (6 << SAI_CR1_DS_SHIFT) /* 24 bits */
+#  define SAI_CR1_DS_32BITS        (7 << SAI_CR1_DS_SHIFT) /* 32 bits */
 
 #define SAI_CR1_LSBFIRST           (1 << 8)  /* Bit 8:  Least significant bit first */
 #define SAI_CR1_CKSTR              (1 << 9)  /* Bit 9:  Clock strobing edge */
diff --git a/arch/arm/src/stm32f7/stm32_adc.c b/arch/arm/src/stm32f7/stm32_adc.c
index 0bfbef3582..1f918d21a3 100644
--- a/arch/arm/src/stm32f7/stm32_adc.c
+++ b/arch/arm/src/stm32f7/stm32_adc.c
@@ -156,13 +156,13 @@
 #define ADC_MAX_FADC 36000000
 
 #if STM32_PCLK2_FREQUENCY/2 <= ADC_MAX_FADC
-# define ADC_CCR_ADCPRE_DIV     ADC_CCR_ADCPRE_DIV2
+#  define ADC_CCR_ADCPRE_DIV    ADC_CCR_ADCPRE_DIV2
 #elif STM32_PCLK2_FREQUENCY/4 <= ADC_MAX_FADC
-# define ADC_CCR_ADCPRE_DIV     ADC_CCR_ADCPRE_DIV4
+#  define ADC_CCR_ADCPRE_DIV    ADC_CCR_ADCPRE_DIV4
 #elif STM32_PCLK2_FREQUENCY/6 <= ADC_MAX_FADC
-# define ADC_CCR_ADCPRE_DIV     ADC_CCR_ADCPRE_DIV6
+#  define ADC_CCR_ADCPRE_DIV    ADC_CCR_ADCPRE_DIV6
 #elif STM32_PCLK2_FREQUENCY/8 <= ADC_MAX_FADC
-# define ADC_CCR_ADCPRE_DIV     ADC_CCR_ADCPRE_DIV8
+#  define ADC_CCR_ADCPRE_DIV    ADC_CCR_ADCPRE_DIV8
 #else
 # error "PCLK2 too high - no divisor found "
 #endif
diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/arch/arm/src/stm32f7/stm32_ethernet.c
index 5116423e6d..d52ab837c3 100644
--- a/arch/arm/src/stm32f7/stm32_ethernet.c
+++ b/arch/arm/src/stm32f7/stm32_ethernet.c
@@ -681,9 +681,9 @@ static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t val, uint32_t addr);
 static void stm32_checksetup(void);
 #else
-# define stm32_getreg(addr)      getreg32(addr)
-# define stm32_putreg(val,addr)  putreg32(val,addr)
-# define stm32_checksetup()
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(val,addr) putreg32(val,addr)
+#  define stm32_checksetup()
 #endif
 
 /* Free buffer management */
diff --git a/arch/arm/src/stm32f7/stm32_lse.c b/arch/arm/src/stm32f7/stm32_lse.c
index ad934a42ce..0829686a82 100644
--- a/arch/arm/src/stm32f7/stm32_lse.c
+++ b/arch/arm/src/stm32f7/stm32_lse.c
@@ -35,17 +35,17 @@
 #define LSERDY_TIMEOUT (500 * CONFIG_BOARD_LOOPSPERMSEC)
 
 #ifdef CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY
-# if CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY < 0 || \
-     CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY > 3
-#  error "Invalid LSE drive capability setting"
-#endif
+#  if CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY < 0 || \
+      CONFIG_STM32F7_RTC_LSECLOCK_START_DRV_CAPABILITY > 3
+#    error "Invalid LSE drive capability setting"
+#  endif
 #endif
 
 #ifdef CONFIG_STM32F7_RTC_LSECLOCK_RUN_DRV_CAPABILITY
-# if CONFIG_STM32F7_RTC_LSECLOCK_RUN_DRV_CAPABILITY < 0 || \
-     CONFIG_STM32F7_RTC_LSECLOCK_RUN_DRV_CAPABILITY > 3
-#  error "Invalid LSE drive capability setting"
-#endif
+#  if CONFIG_STM32F7_RTC_LSECLOCK_RUN_DRV_CAPABILITY < 0 || \
+      CONFIG_STM32F7_RTC_LSECLOCK_RUN_DRV_CAPABILITY > 3
+#    error "Invalid LSE drive capability setting"
+#  endif
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/stm32f7/stm32_otghost.c b/arch/arm/src/stm32f7/stm32_otghost.c
index 568488aa10..9769ca98d4 100644
--- a/arch/arm/src/stm32f7/stm32_otghost.c
+++ b/arch/arm/src/stm32f7/stm32_otghost.c
@@ -276,8 +276,8 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t addr, uint32_t value);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(addr,val) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(addr,val) putreg32(val,addr)
 #endif
 
 static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
diff --git a/arch/arm/src/stm32f7/stm32_qspi.c b/arch/arm/src/stm32f7/stm32_qspi.c
index 20285f0d19..e8a7cab9a3 100644
--- a/arch/arm/src/stm32f7/stm32_qspi.c
+++ b/arch/arm/src/stm32f7/stm32_qspi.c
@@ -247,7 +247,7 @@ struct qspi_xctnspec_s
 static bool     qspi_checkreg(struct stm32f7_qspidev_s *priv, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        qspi_checkreg(priv,wr,value,address) (false)
+#  define       qspi_checkreg(priv,wr,value,address) (false)
 #endif
 
 static inline uint32_t qspi_getreg(struct stm32f7_qspidev_s *priv,
@@ -259,13 +259,13 @@ static inline void qspi_putreg(struct stm32f7_qspidev_s *priv,
 static void     qspi_dumpregs(struct stm32f7_qspidev_s *priv,
                   const char *msg);
 #else
-# define        qspi_dumpregs(priv,msg)
+#  define       qspi_dumpregs(priv,msg)
 #endif
 
 #if defined(CONFIG_DEBUG_SPI_INFO) && defined(CONFIG_DEBUG_GPIO)
 static void     qspi_dumpgpioconfig(const char *msg);
 #else
-# define        qspi_dumpgpioconfig(msg)
+#  define       qspi_dumpgpioconfig(msg)
 #endif
 
 /* Interrupts */
diff --git a/arch/arm/src/stm32f7/stm32_rtc.c b/arch/arm/src/stm32f7/stm32_rtc.c
index 5121ddb051..673994ad55 100644
--- a/arch/arm/src/stm32f7/stm32_rtc.c
+++ b/arch/arm/src/stm32f7/stm32_rtc.c
@@ -975,7 +975,7 @@ int up_rtc_initialize(void)
           modifyreg32(STM32_RCC_BDCR, 0, RCC_BDCR_BDRST);
           modifyreg32(STM32_RCC_BDCR, RCC_BDCR_BDRST, 0);
 
-# if RCC_BDCR_RTCSEL == RCC_BDCR_RTCSEL_LSE
+#if RCC_BDCR_RTCSEL == RCC_BDCR_RTCSEL_LSE
           /* Because of the Backup domain Reset - we must re enable the LSE
            * if it is used
            */
diff --git a/arch/arm/src/stm32f7/stm32_rtc.h b/arch/arm/src/stm32f7/stm32_rtc.h
index 1fff831cb9..0d13136e69 100644
--- a/arch/arm/src/stm32f7/stm32_rtc.h
+++ b/arch/arm/src/stm32f7/stm32_rtc.h
@@ -45,7 +45,7 @@
 #define STM32_RTC_PRESCALER_MIN             1      /* Maximum speed of 16384 Hz */
 
 #if !defined(CONFIG_STM32F7_RTC_MAGIC)
-# define CONFIG_STM32F7_RTC_MAGIC           (0xfacefeed)
+#  define CONFIG_STM32F7_RTC_MAGIC          (0xfacefeed)
 #endif
 
 #if !defined(CONFIG_STM32F7_RTC_MAGIC_TIME_SET)
@@ -53,7 +53,7 @@
 #endif
 
 #if !defined(CONFIG_STM32F7_RTC_MAGIC_REG)
-# define CONFIG_STM32F7_RTC_MAGIC_REG       (0)
+#  define CONFIG_STM32F7_RTC_MAGIC_REG      (0)
 #endif
 
 #define RTC_MAGIC                            CONFIG_STM32F7_RTC_MAGIC
diff --git a/arch/arm/src/stm32f7/stm32_serial.c b/arch/arm/src/stm32f7/stm32_serial.c
index 52fa4741a2..14b7c3cb14 100644
--- a/arch/arm/src/stm32f7/stm32_serial.c
+++ b/arch/arm/src/stm32f7/stm32_serial.c
@@ -381,7 +381,7 @@
  * blocked.
  */
 
-# if defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_IFLOWCONTROL)
+#  if defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_IFLOWCONTROL)
 #    warning "RXDMA and IFLOWCONTROL both enabled for USART1. \
               This combination can lead to data loss."
 #  endif
diff --git a/arch/arm/src/stm32f7/stm32_tim.c b/arch/arm/src/stm32f7/stm32_tim.c
index a08d097ab5..cf86149f52 100644
--- a/arch/arm/src/stm32f7/stm32_tim.c
+++ b/arch/arm/src/stm32f7/stm32_tim.c
@@ -1000,7 +1000,7 @@ static int stm32_tim_setchannel(struct stm32_tim_dev_s *dev,
             case 2:
               stm32_tim_gpioconfig(GPIO_TIM9_CH3OUT, mode);
               break;
-# endif
+#  endif
 #  if defined(GPIO_TIM9_CH4OUT)
             case 3:
               stm32_tim_gpioconfig(GPIO_TIM9_CH4OUT, mode);
diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h b/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h
index 44aa1e21c4..6a10fea0a2 100644
--- a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h
+++ b/arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h
@@ -222,11 +222,11 @@
 #define STM32_PWR_WKUPPUPD5_SHIFT   (24)      /* Bits 24-25: Wakeup pin pull config for WKUP5 */
 #define STM32_PWR_WKUPPUPD6_SHIFT   (26)      /* Bits 26-27: Wakeup pin pull config for WKUP6 */
 
-# define STM32_PWR_WKUPPUPD_NONE    (0)      /* No pull-up */
-# define STM32_PWR_WKUPPUPD_PULLUP  (1)      /* Pull-up enabled */
-# define STM32_PWR_WKUPPUPD_PULLDN  (2)      /* Pull-down enabled */
-                                             /* 3 is reserved */
-# define STM32_PWR_WKUPPUPD_MASK    (3)
-                                             /* Bits 28-31: Reserved */
+#  define STM32_PWR_WKUPPUPD_NONE   (0)       /* No pull-up */
+#  define STM32_PWR_WKUPPUPD_PULLUP (1)       /* Pull-up enabled */
+#  define STM32_PWR_WKUPPUPD_PULLDN (2)       /* Pull-down enabled */
+                                              /* 3 is reserved */
+#  define STM32_PWR_WKUPPUPD_MASK   (3)
+                                              /* Bits 28-31: Reserved */
 
 #endif /* __ARCH_ARM_SRC_STM32H7_HARDWARE_STM32H7X3XX_PWR_H */
diff --git a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h b/arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h
index 544d4c2e2c..cedfe52172 100644
--- a/arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h
+++ b/arch/arm/src/stm32h7/hardware/stm32h7x3xx_uart.h
@@ -397,18 +397,17 @@
 
 #define USART_PRESC_SHIFT         (0)       /* Bits 0-3: Clock prescaler */
 #define USART_PRESC_MASK          (15 << USART_PRESC_SHIFT)
-# define USART_PRESC_NODIV        (0 << USART_PRESC_SHIFT)  /* Input clock not divided */
-# define USART_PRESC_DIV1         (1 << USART_PRESC_SHIFT)  /* Input clock divided by 2 */
-# define USART_PRESC_DIV4         (2 << USART_PRESC_SHIFT)  /* Input clock divided by 4 */
-# define USART_PRESC_DIV6         (3 << USART_PRESC_SHIFT)  /* Input clock divided by 6 */
-# define USART_PRESC_DIV8         (4 << USART_PRESC_SHIFT)  /* Input clock divided by 8 */
-# define USART_PRESC_DIV10        (5 << USART_PRESC_SHIFT)  /* Input clock divided by 10 */
-# define USART_PRESC_DIV12        (6 << USART_PRESC_SHIFT)  /* Input clock divided by 12 */
-# define USART_PRESC_DIV16        (7 << USART_PRESC_SHIFT)  /* Input clock divided by 16 */
-# define USART_PRESC_DIV32        (8 << USART_PRESC_SHIFT)  /* Input clock divided by 32 */
-# define USART_PRESC_DIV64        (9 << USART_PRESC_SHIFT)  /* Input clock divided by 64 */
-# define USART_PRESC_DIV128       (10 << USART_PRESC_SHIFT) /* Input clock divided by 128 */
-# define USART_PRESC_DIV256       (11 << USART_PRESC_SHIFT) /* Input clock divided by 256 */
-
+#  define USART_PRESC_NODIV       (0 << USART_PRESC_SHIFT)  /* Input clock not divided */
+#  define USART_PRESC_DIV1        (1 << USART_PRESC_SHIFT)  /* Input clock divided by 2 */
+#  define USART_PRESC_DIV4        (2 << USART_PRESC_SHIFT)  /* Input clock divided by 4 */
+#  define USART_PRESC_DIV6        (3 << USART_PRESC_SHIFT)  /* Input clock divided by 6 */
+#  define USART_PRESC_DIV8        (4 << USART_PRESC_SHIFT)  /* Input clock divided by 8 */
+#  define USART_PRESC_DIV10       (5 << USART_PRESC_SHIFT)  /* Input clock divided by 10 */
+#  define USART_PRESC_DIV12       (6 << USART_PRESC_SHIFT)  /* Input clock divided by 12 */
+#  define USART_PRESC_DIV16       (7 << USART_PRESC_SHIFT)  /* Input clock divided by 16 */
+#  define USART_PRESC_DIV32       (8 << USART_PRESC_SHIFT)  /* Input clock divided by 32 */
+#  define USART_PRESC_DIV64       (9 << USART_PRESC_SHIFT)  /* Input clock divided by 64 */
+#  define USART_PRESC_DIV128      (10 << USART_PRESC_SHIFT) /* Input clock divided by 128 */
+#  define USART_PRESC_DIV256      (11 << USART_PRESC_SHIFT) /* Input clock divided by 256 */
 #endif /* CONFIG_STM32H7_STM32H7X3XX || CONFIG_STM32H7_STM32H7X7XX || CONFIG_STM32H7_STM32H7B3XX */
 #endif /* __ARCH_ARM_SRC_STM32H7_HARDWARE_STM32H7X3XX_UART_H */
diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c b/arch/arm/src/stm32h7/stm32_ethernet.c
index 4017a7410f..728dbacb87 100644
--- a/arch/arm/src/stm32h7/stm32_ethernet.c
+++ b/arch/arm/src/stm32h7/stm32_ethernet.c
@@ -684,9 +684,9 @@ static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t val, uint32_t addr);
 static void stm32_checksetup(void);
 #else
-# define stm32_getreg(addr)      getreg32(addr)
-# define stm32_putreg(val,addr)  putreg32(val,addr)
-# define stm32_checksetup()
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(val,addr) putreg32(val,addr)
+#  define stm32_checksetup()
 #endif
 
 /* Free buffer management */
diff --git a/arch/arm/src/stm32h7/stm32_iwdg.c b/arch/arm/src/stm32h7/stm32_iwdg.c
index b4227fc4b2..99fe68dae2 100644
--- a/arch/arm/src/stm32h7/stm32_iwdg.c
+++ b/arch/arm/src/stm32h7/stm32_iwdg.c
@@ -126,8 +126,8 @@ struct stm32_lowerhalf_s
 static uint16_t stm32_getreg(uint32_t addr);
 static void     stm32_putreg(uint16_t val, uint32_t addr);
 #else
-# define        stm32_getreg(addr)     getreg16(addr)
-# define        stm32_putreg(val,addr) putreg16(val,addr)
+#  define       stm32_getreg(addr)     getreg16(addr)
+#  define       stm32_putreg(val,addr) putreg16(val,addr)
 #endif
 
 static inline void stm32_setprescaler(struct stm32_lowerhalf_s *priv);
diff --git a/arch/arm/src/stm32h7/stm32_lse.c b/arch/arm/src/stm32h7/stm32_lse.c
index 0d9862d4d3..8f8446f366 100644
--- a/arch/arm/src/stm32h7/stm32_lse.c
+++ b/arch/arm/src/stm32h7/stm32_lse.c
@@ -36,17 +36,17 @@
 #define LSERDY_TIMEOUT (500 * CONFIG_BOARD_LOOPSPERMSEC)
 
 #ifdef CONFIG_STM32H7_RTC_LSECLOCK_START_DRV_CAPABILITY
-# if CONFIG_STM32H7_RTC_LSECLOCK_START_DRV_CAPABILITY < 0 || \
-     CONFIG_STM32H7_RTC_LSECLOCK_START_DRV_CAPABILITY > 3
-#  error "Invalid LSE drive capability setting"
-#endif
+#  if CONFIG_STM32H7_RTC_LSECLOCK_START_DRV_CAPABILITY < 0 || \
+      CONFIG_STM32H7_RTC_LSECLOCK_START_DRV_CAPABILITY > 3
+#    error "Invalid LSE drive capability setting"
+#  endif
 #endif
 
 #ifdef CONFIG_STM32H7_RTC_LSECLOCK_RUN_DRV_CAPABILITY
-# if CONFIG_STM32H7_RTC_LSECLOCK_RUN_DRV_CAPABILITY < 0 || \
-     CONFIG_STM32H7_RTC_LSECLOCK_RUN_DRV_CAPABILITY > 3
-#  error "Invalid LSE drive capability setting"
-#endif
+#  if CONFIG_STM32H7_RTC_LSECLOCK_RUN_DRV_CAPABILITY < 0 || \
+      CONFIG_STM32H7_RTC_LSECLOCK_RUN_DRV_CAPABILITY > 3
+#    error "Invalid LSE drive capability setting"
+#  endif
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/stm32h7/stm32_otgdev.c b/arch/arm/src/stm32h7/stm32_otgdev.c
index 80ef60ea1f..0fee200bb7 100644
--- a/arch/arm/src/stm32h7/stm32_otgdev.c
+++ b/arch/arm/src/stm32h7/stm32_otgdev.c
@@ -554,8 +554,8 @@ struct stm32_usbdev_s
 static uint32_t    stm32_getreg(uint32_t addr);
 static void        stm32_putreg(uint32_t val, uint32_t addr);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(val,addr) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Request queue operations *************************************************/
diff --git a/arch/arm/src/stm32h7/stm32_otghost.c b/arch/arm/src/stm32h7/stm32_otghost.c
index 888c1c11b5..13a52a881b 100644
--- a/arch/arm/src/stm32h7/stm32_otghost.c
+++ b/arch/arm/src/stm32h7/stm32_otghost.c
@@ -303,8 +303,8 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t stm32_getreg(uint32_t addr);
 static void stm32_putreg(uint32_t addr, uint32_t value);
 #else
-# define stm32_getreg(addr)     getreg32(addr)
-# define stm32_putreg(addr,val) putreg32(val,addr)
+#  define stm32_getreg(addr)     getreg32(addr)
+#  define stm32_putreg(addr,val) putreg32(val,addr)
 #endif
 
 static inline void stm32_modifyreg(uint32_t addr, uint32_t clrbits,
diff --git a/arch/arm/src/stm32h7/stm32_qspi.c b/arch/arm/src/stm32h7/stm32_qspi.c
index 2566d5ac3b..52f5261e6f 100644
--- a/arch/arm/src/stm32h7/stm32_qspi.c
+++ b/arch/arm/src/stm32h7/stm32_qspi.c
@@ -272,7 +272,7 @@ struct qspi_xctnspec_s
 static bool     qspi_checkreg(struct stm32h7_qspidev_s *priv, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        qspi_checkreg(priv,wr,value,address) (false)
+#  define       qspi_checkreg(priv,wr,value,address) (false)
 #endif
 
 static inline uint32_t qspi_getreg(struct stm32h7_qspidev_s *priv,
@@ -284,13 +284,13 @@ static inline void qspi_putreg(struct stm32h7_qspidev_s *priv,
 static void     qspi_dumpregs(struct stm32h7_qspidev_s *priv,
                   const char *msg);
 #else
-# define        qspi_dumpregs(priv,msg)
+#  define       qspi_dumpregs(priv,msg)
 #endif
 
 #if defined(CONFIG_DEBUG_SPI_INFO) && defined(CONFIG_DEBUG_GPIO)
 static void     qspi_dumpgpioconfig(const char *msg);
 #else
-# define        qspi_dumpgpioconfig(msg)
+#  define       qspi_dumpgpioconfig(msg)
 #endif
 
 /* Interrupts */
diff --git a/arch/arm/src/stm32h7/stm32_rtc.c b/arch/arm/src/stm32h7/stm32_rtc.c
index 82630a0b0f..3edad720a8 100644
--- a/arch/arm/src/stm32h7/stm32_rtc.c
+++ b/arch/arm/src/stm32h7/stm32_rtc.c
@@ -975,7 +975,7 @@ int up_rtc_initialize(void)
           modifyreg32(STM32_RCC_BDCR, 0, RCC_BDCR_BDRST);
           modifyreg32(STM32_RCC_BDCR, RCC_BDCR_BDRST, 0);
 
-# if RCC_BDCR_RTCSEL == RCC_BDCR_RTCSEL_LSE
+#if RCC_BDCR_RTCSEL == RCC_BDCR_RTCSEL_LSE
           /* Because of the Backup domain Reset - we must re enable the LSE
            * if it is used
            */
diff --git a/arch/arm/src/stm32h7/stm32_rtc.h b/arch/arm/src/stm32h7/stm32_rtc.h
index f5057b4598..bc4ed385c5 100644
--- a/arch/arm/src/stm32h7/stm32_rtc.h
+++ b/arch/arm/src/stm32h7/stm32_rtc.h
@@ -45,7 +45,7 @@
 #define STM32_RTC_PRESCALER_MIN             1      /* Maximum speed of 16384 Hz */
 
 #if !defined(CONFIG_STM32H7_RTC_MAGIC)
-# define CONFIG_STM32H7_RTC_MAGIC           (0xfacefeed)
+#  define CONFIG_STM32H7_RTC_MAGIC          (0xfacefeed)
 #endif
 
 #if !defined(CONFIG_STM32H7_RTC_MAGIC_TIME_SET)
@@ -53,7 +53,7 @@
 #endif
 
 #if !defined(CONFIG_STM32H7_RTC_MAGIC_REG)
-# define CONFIG_STM32H7_RTC_MAGIC_REG       (0)
+#  define CONFIG_STM32H7_RTC_MAGIC_REG      (0)
 #endif
 
 #define RTC_MAGIC                            CONFIG_STM32H7_RTC_MAGIC
diff --git a/arch/arm/src/stm32h7/stm32_serial.c b/arch/arm/src/stm32h7/stm32_serial.c
index 292c775e7e..4b8048ed58 100644
--- a/arch/arm/src/stm32h7/stm32_serial.c
+++ b/arch/arm/src/stm32h7/stm32_serial.c
@@ -528,7 +528,7 @@
  * blocked.
  */
 
-# if defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_IFLOWCONTROL)
+#  if defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_IFLOWCONTROL)
 #    warning "RXDMA and IFLOWCONTROL both enabled for USART1. \
               This combination can lead to data loss."
 #  endif
diff --git a/arch/arm/src/stm32h7/stm32_wwdg.c b/arch/arm/src/stm32h7/stm32_wwdg.c
index 339e58328e..11a77bfaaa 100644
--- a/arch/arm/src/stm32h7/stm32_wwdg.c
+++ b/arch/arm/src/stm32h7/stm32_wwdg.c
@@ -102,8 +102,8 @@ struct stm32_lowerhalf_s
 static uint16_t stm32_getreg(uint32_t addr);
 static void     stm32_putreg(uint16_t val, uint32_t addr);
 #else
-# define        stm32_getreg(addr)     getreg32(addr)
-# define        stm32_putreg(val,addr) putreg32(val,addr)
+#  define       stm32_getreg(addr)     getreg32(addr)
+#  define       stm32_putreg(val,addr) putreg32(val,addr)
 #endif
 static void     stm32_setwindow(struct stm32_lowerhalf_s *priv,
                   uint8_t window);
diff --git a/arch/arm/src/stm32l4/hardware/stm32l4_sai.h b/arch/arm/src/stm32l4/hardware/stm32l4_sai.h
index c01bf94d33..17cd5d620d 100644
--- a/arch/arm/src/stm32l4/hardware/stm32l4_sai.h
+++ b/arch/arm/src/stm32l4/hardware/stm32l4_sai.h
@@ -127,12 +127,12 @@
                                              /* Bit 4: Reserved */
 #define SAI_CR1_DS_SHIFT           (5)       /* Bits 5-7: Data size */
 #define SAI_CR1_DS_MASK            (7 << SAI_CR1_DS_SHIFT)
-# define SAI_CR1_DS_8BITS          (2 << SAI_CR1_DS_SHIFT) /* 8 bits */
-# define SAI_CR1_DS_10BITS         (3 << SAI_CR1_DS_SHIFT) /* 10 bits */
-# define SAI_CR1_DS_16BITS         (4 << SAI_CR1_DS_SHIFT) /* 16 bits */
-# define SAI_CR1_DS_20BITS         (5 << SAI_CR1_DS_SHIFT) /* 20 bits */
-# define SAI_CR1_DS_24BITS         (6 << SAI_CR1_DS_SHIFT) /* 24 bits */
-# define SAI_CR1_DS_32BITS         (7 << SAI_CR1_DS_SHIFT) /* 32 bits */
+#  define SAI_CR1_DS_8BITS         (2 << SAI_CR1_DS_SHIFT) /* 8 bits */
+#  define SAI_CR1_DS_10BITS        (3 << SAI_CR1_DS_SHIFT) /* 10 bits */
+#  define SAI_CR1_DS_16BITS        (4 << SAI_CR1_DS_SHIFT) /* 16 bits */
+#  define SAI_CR1_DS_20BITS        (5 << SAI_CR1_DS_SHIFT) /* 20 bits */
+#  define SAI_CR1_DS_24BITS        (6 << SAI_CR1_DS_SHIFT) /* 24 bits */
+#  define SAI_CR1_DS_32BITS        (7 << SAI_CR1_DS_SHIFT) /* 32 bits */
 
 #define SAI_CR1_LSBFIRST           (1 << 8)  /* Bit 8:  Least significant bit first */
 #define SAI_CR1_CKSTR              (1 << 9)  /* Bit 9:  Clock strobing edge */
diff --git a/arch/arm/src/stm32l4/stm32l4_iwdg.c b/arch/arm/src/stm32l4/stm32l4_iwdg.c
index a2cb7ca8cb..316909ac88 100644
--- a/arch/arm/src/stm32l4/stm32l4_iwdg.c
+++ b/arch/arm/src/stm32l4/stm32l4_iwdg.c
@@ -106,8 +106,8 @@ struct stm32l4_lowerhalf_s
 static uint16_t stm32l4_getreg(uint32_t addr);
 static void     stm32l4_putreg(uint16_t val, uint32_t addr);
 #else
-# define        stm32l4_getreg(addr)     getreg16(addr)
-# define        stm32l4_putreg(val,addr) putreg16(val,addr)
+#  define       stm32l4_getreg(addr)     getreg16(addr)
+#  define       stm32l4_putreg(val,addr) putreg16(val,addr)
 #endif
 
 static inline void
diff --git a/arch/arm/src/stm32l4/stm32l4_lptim.c b/arch/arm/src/stm32l4/stm32l4_lptim.c
index 7f77de935b..79b18f71c9 100644
--- a/arch/arm/src/stm32l4/stm32l4_lptim.c
+++ b/arch/arm/src/stm32l4/stm32l4_lptim.c
@@ -310,21 +310,21 @@ static int stm32l4_lptim_get_gpioconfig(struct stm32l4_lptim_dev_s *dev,
       case STM32L4_LPTIM1_BASE:
         switch (channel)
           {
-# if defined(GPIO_LPTIM1_OUT_1)
+#  if defined(GPIO_LPTIM1_OUT_1)
             case 1:
               *cfg = GPIO_LPTIM1_OUT_1;
               break;
-# endif
-# if defined(GPIO_LPTIM1_OUT_2)
+#  endif
+#  if defined(GPIO_LPTIM1_OUT_2)
             case 2:
               *cfg = GPIO_LPTIM1_OUT_2;
               break;
-# endif
-# if defined(GPIO_LPTIM1_OUT_3)
+#  endif
+#  if defined(GPIO_LPTIM1_OUT_3)
             case 3:
               *cfg = GPIO_LPTIM1_OUT_3;
               break;
-# endif
+#  endif
             default:
               return ERROR;
           }
@@ -335,21 +335,21 @@ static int stm32l4_lptim_get_gpioconfig(struct stm32l4_lptim_dev_s *dev,
       case STM32L4_LPTIM2_BASE:
         switch (channel)
           {
-# if defined(GPIO_LPTIM2_OUT_1)
+#  if defined(GPIO_LPTIM2_OUT_1)
             case 1:
               *cfg = GPIO_LPTIM2_OUT_1;
               break;
-# endif
-# if defined(GPIO_LPTIM2_OUT_2)
+#  endif
+#  if defined(GPIO_LPTIM2_OUT_2)
             case 2:
               *cfg = GPIO_LPTIM2_OUT_2;
               break;
-# endif
-# if defined(GPIO_LPTIM2_OUT_3)
+#  endif
+#  if defined(GPIO_LPTIM2_OUT_3)
             case 3:
               *cfg = GPIO_LPTIM2_OUT_3;
               break;
-# endif
+#  endif
             default:
               return ERROR;
           }
diff --git a/arch/arm/src/stm32l4/stm32l4_lse.c b/arch/arm/src/stm32l4/stm32l4_lse.c
index 05290066ec..61ea594d6c 100644
--- a/arch/arm/src/stm32l4/stm32l4_lse.c
+++ b/arch/arm/src/stm32l4/stm32l4_lse.c
@@ -34,17 +34,17 @@
  ****************************************************************************/
 
 #ifdef CONFIG_STM32L4_RTC_LSECLOCK_START_DRV_CAPABILITY
-# if CONFIG_STM32L4_RTC_LSECLOCK_START_DRV_CAPABILITY < 0 || \
-     CONFIG_STM32L4_RTC_LSECLOCK_START_DRV_CAPABILITY > 3
-#  error "Invalid LSE drive capability setting"
-#endif
+#  if CONFIG_STM32L4_RTC_LSECLOCK_START_DRV_CAPABILITY < 0 || \
+      CONFIG_STM32L4_RTC_LSECLOCK_START_DRV_CAPABILITY > 3
+#    error "Invalid LSE drive capability setting"
+#  endif
 #endif
 
 #ifdef CONFIG_STM32L4_RTC_LSECLOCK_RUN_DRV_CAPABILITY
-# if CONFIG_STM32L4_RTC_LSECLOCK_RUN_DRV_CAPABILITY < 0 || \
-     CONFIG_STM32L4_RTC_LSECLOCK_RUN_DRV_CAPABILITY > 3
-#  error "Invalid LSE drive capability setting"
-#endif
+#  if CONFIG_STM32L4_RTC_LSECLOCK_RUN_DRV_CAPABILITY < 0 || \
+      CONFIG_STM32L4_RTC_LSECLOCK_RUN_DRV_CAPABILITY > 3
+#    error "Invalid LSE drive capability setting"
+#  endif
 #endif
 
 /****************************************************************************
diff --git a/arch/arm/src/stm32l4/stm32l4_otgfsdev.c b/arch/arm/src/stm32l4/stm32l4_otgfsdev.c
index b57b6a9473..410ec497d3 100644
--- a/arch/arm/src/stm32l4/stm32l4_otgfsdev.c
+++ b/arch/arm/src/stm32l4/stm32l4_otgfsdev.c
@@ -550,8 +550,8 @@ struct stm32l4_usbdev_s
 static uint32_t    stm32l4_getreg(uint32_t addr);
 static void        stm32l4_putreg(uint32_t val, uint32_t addr);
 #else
-# define stm32l4_getreg(addr)     getreg32(addr)
-# define stm32l4_putreg(val,addr) putreg32(val,addr)
+#  define stm32l4_getreg(addr)     getreg32(addr)
+#  define stm32l4_putreg(val,addr) putreg32(val,addr)
 #endif
 
 /* Request queue operations *************************************************/
@@ -5417,22 +5417,22 @@ static void stm32l4_hwinitialize(struct stm32l4_usbdev_s *priv)
 
   regval  = OTGFS_GCCFG_PWRDWN;
 
-# ifdef CONFIG_USBDEV_VBUSSENSING
+#ifdef CONFIG_USBDEV_VBUSSENSING
   /* Enable Vbus sensing */
 
   regval |= OTGFS_GCCFG_VBDEN;
-# endif
+#endif
 
   stm32l4_putreg(regval, STM32L4_OTGFS_GCCFG);
   up_mdelay(20);
 
   /* When VBUS sensing is not used we need to force the B session valid */
 
-# ifndef CONFIG_USBDEV_VBUSSENSING
+#ifndef CONFIG_USBDEV_VBUSSENSING
   regval  =  stm32l4_getreg(STM32L4_OTGFS_GOTGCTL);
   regval |= (OTGFS_GOTGCTL_BVALOEN | OTGFS_GOTGCTL_BVALOVAL);
   stm32l4_putreg(regval, STM32L4_OTGFS_GOTGCTL);
-# endif
+#endif
 
   /* Force Device Mode */
 
diff --git a/arch/arm/src/stm32l4/stm32l4_otgfshost.c b/arch/arm/src/stm32l4/stm32l4_otgfshost.c
index c5933feb65..c29be2175f 100644
--- a/arch/arm/src/stm32l4/stm32l4_otgfshost.c
+++ b/arch/arm/src/stm32l4/stm32l4_otgfshost.c
@@ -273,8 +273,8 @@ static void stm32l4_checkreg(uint32_t addr, uint32_t val, bool iswrite);
 static uint32_t stm32l4_getreg(uint32_t addr);
 static void stm32l4_putreg(uint32_t addr, uint32_t value);
 #else
-# define stm32l4_getreg(addr)     getreg32(addr)
-# define stm32l4_putreg(addr,val) putreg32(val,addr)
+#  define stm32l4_getreg(addr)     getreg32(addr)
+#  define stm32l4_putreg(addr,val) putreg32(val,addr)
 #endif
 
 static inline void stm32l4_modifyreg(uint32_t addr, uint32_t clrbits,
diff --git a/arch/arm/src/stm32l4/stm32l4_qspi.c b/arch/arm/src/stm32l4/stm32l4_qspi.c
index 05c3b8bd8c..39b6655073 100644
--- a/arch/arm/src/stm32l4/stm32l4_qspi.c
+++ b/arch/arm/src/stm32l4/stm32l4_qspi.c
@@ -245,7 +245,7 @@ struct qspi_xctnspec_s
 static bool     qspi_checkreg(struct stm32l4_qspidev_s *priv, bool wr,
                   uint32_t value, uint32_t address);
 #else
-# define        qspi_checkreg(priv,wr,value,address) (false)
+#  define       qspi_checkreg(priv,wr,value,address) (false)
 #endif
 
 static inline uint32_t qspi_getreg(struct stm32l4_qspidev_s *priv,
@@ -257,13 +257,13 @@ static inline void qspi_putreg(struct stm32l4_qspidev_s *priv,
 static void     qspi_dumpregs(struct stm32l4_qspidev_s *priv,
                   const char *msg);
 #else
-# define        qspi_dumpregs(priv,msg)
+#  define       qspi_dumpregs(priv,msg)
 #endif
 
 #if defined(CONFIG_DEBUG_SPI_INFO) && defined(CONFIG_DEBUG_GPIO)
 static void     qspi_dumpgpioconfig(const char *msg);
 #else
-# define        qspi_dumpgpioconfig(msg)
+#  define       qspi_dumpgpioconfig(msg)
 #endif
 
 /* Interrupts */
diff --git a/arch/arm/src/stm32l4/stm32l4_rtc.h b/arch/arm/src/stm32l4/stm32l4_rtc.h
index 8836539239..a1802aa4bb 100644
--- a/arch/arm/src/stm32l4/stm32l4_rtc.h
+++ b/arch/arm/src/stm32l4/stm32l4_rtc.h
@@ -37,18 +37,18 @@
  ****************************************************************************/
 
 #define STM32L4_RTC_PRESCALER_SECOND         32767  /* Default prescaler to get a second base */
-#define STM32L4_RTC_PRESCALER_MIN             1     /* Maximum speed of 16384 Hz */
+#define STM32L4_RTC_PRESCALER_MIN            1      /* Maximum speed of 16384 Hz */
 
 #if !defined(CONFIG_STM32L4_RTC_MAGIC)
-# define CONFIG_STM32L4_RTC_MAGIC           (0xfacefeee)
+#  define CONFIG_STM32L4_RTC_MAGIC           (0xfacefeee)
 #endif
 
 #if !defined(CONFIG_STM32L4_RTC_MAGIC_TIME_SET)
-#  define CONFIG_STM32L4_RTC_MAGIC_TIME_SET (0xf00dface)
+#  define CONFIG_STM32L4_RTC_MAGIC_TIME_SET  (0xf00dface)
 #endif
 
 #if !defined(CONFIG_STM32L4_RTC_MAGIC_REG)
-# define CONFIG_STM32L4_RTC_MAGIC_REG       (0)
+#  define CONFIG_STM32L4_RTC_MAGIC_REG       (0)
 #endif
 
 #define RTC_MAGIC                           CONFIG_STM32L4_RTC_MAGIC
diff --git a/arch/arm/src/stm32l4/stm32l4_serial.c b/arch/arm/src/stm32l4/stm32l4_serial.c
index 6392b7c1a1..c6b4c90345 100644
--- a/arch/arm/src/stm32l4/stm32l4_serial.c
+++ b/arch/arm/src/stm32l4/stm32l4_serial.c
@@ -390,49 +390,49 @@ static const struct uart_ops_s g_uart_dma_ops =
 #ifdef CONFIG_STM32L4_LPUART1_SERIALDRIVER
 static char g_lpuart1rxbuffer[CONFIG_LPUART1_RXBUFSIZE];
 static char g_lpuart1txbuffer[CONFIG_LPUART1_TXBUFSIZE];
-# ifdef CONFIG_LPUART1_RXDMA
+#  ifdef CONFIG_LPUART1_RXDMA
 static char g_lpuart1rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32L4_USART1_SERIALDRIVER
 static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
 static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
-# ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
 static char g_usart1rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32L4_USART2_SERIALDRIVER
 static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
 static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
-# ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
 static char g_usart2rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32L4_USART3_SERIALDRIVER
 static char g_usart3rxbuffer[CONFIG_USART3_RXBUFSIZE];
 static char g_usart3txbuffer[CONFIG_USART3_TXBUFSIZE];
-# ifdef CONFIG_USART3_RXDMA
+#  ifdef CONFIG_USART3_RXDMA
 static char g_usart3rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32L4_UART4_SERIALDRIVER
 static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE];
 static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
-# ifdef CONFIG_UART4_RXDMA
+#  ifdef CONFIG_UART4_RXDMA
 static char g_uart4rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 #ifdef CONFIG_STM32L4_UART5_SERIALDRIVER
 static char g_uart5rxbuffer[CONFIG_UART5_RXBUFSIZE];
 static char g_uart5txbuffer[CONFIG_UART5_TXBUFSIZE];
-# ifdef CONFIG_UART5_RXDMA
+#  ifdef CONFIG_UART5_RXDMA
 static char g_uart5rxfifo[RXDMA_BUFFER_SIZE];
-# endif
+#  endif
 #endif
 
 /* This describes the state of the STM32 LPUART1 port. */
@@ -442,9 +442,9 @@ static struct stm32l4_serial_s g_lpuart1priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 1
+#  if CONSOLE_UART == 1
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_LPUART1_RXBUFSIZE,
@@ -455,11 +455,11 @@ static struct stm32l4_serial_s g_lpuart1priv =
         .size    = CONFIG_LPUART1_TXBUFSIZE,
         .buffer  = g_lpuart1txbuffer,
       },
-#ifdef CONFIG_LPUART1_RXDMA
+#  ifdef CONFIG_LPUART1_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_lpuart1priv,
     },
 
@@ -472,27 +472,27 @@ static struct stm32l4_serial_s g_lpuart1priv =
   .usartbase     = STM32L4_LPUART1_BASE,
   .tx_gpio       = GPIO_LPUART1_TX,
   .rx_gpio       = GPIO_LPUART1_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_LPUART1_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_LPUART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_LPUART1_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_LPUART1_RTS,
-#endif
-#ifdef CONFIG_LPUART1_RXDMA
+#  endif
+#  ifdef CONFIG_LPUART1_RXDMA
   .rxdma_channel = DMAMAP_LPUART1_RX,
   .rxfifo        = g_lpuart1rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_LPUART1_RS485
+#  ifdef CONFIG_LPUART1_RS485
   .rs485_dir_gpio = GPIO_LPUART1_RS485_DIR,
-#  if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -503,9 +503,9 @@ static struct stm32l4_serial_s g_usart1priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 2
+#  if CONSOLE_UART == 2
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART1_RXBUFSIZE,
@@ -516,11 +516,11 @@ static struct stm32l4_serial_s g_usart1priv =
         .size    = CONFIG_USART1_TXBUFSIZE,
         .buffer  = g_usart1txbuffer,
       },
-#ifdef CONFIG_USART1_RXDMA
+#  ifdef CONFIG_USART1_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart1priv,
     },
 
@@ -533,27 +533,27 @@ static struct stm32l4_serial_s g_usart1priv =
   .usartbase     = STM32L4_USART1_BASE,
   .tx_gpio       = GPIO_USART1_TX,
   .rx_gpio       = GPIO_USART1_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART1_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART1_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART1_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART1_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART1_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART1_RTS,
-#endif
-#ifdef CONFIG_USART1_RXDMA
+#  endif
+#  ifdef CONFIG_USART1_RXDMA
   .rxdma_channel = DMAMAP_USART1_RX,
   .rxfifo        = g_usart1rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART1_RS485
+#  ifdef CONFIG_USART1_RS485
   .rs485_dir_gpio = GPIO_USART1_RS485_DIR,
-#  if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -564,9 +564,9 @@ static struct stm32l4_serial_s g_usart2priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 3
+#  if CONSOLE_UART == 3
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART2_RXBUFSIZE,
@@ -577,11 +577,11 @@ static struct stm32l4_serial_s g_usart2priv =
         .size    = CONFIG_USART2_TXBUFSIZE,
         .buffer  = g_usart2txbuffer,
       },
-#ifdef CONFIG_USART2_RXDMA
+#  ifdef CONFIG_USART2_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart2priv,
     },
 
@@ -594,27 +594,27 @@ static struct stm32l4_serial_s g_usart2priv =
   .usartbase     = STM32L4_USART2_BASE,
   .tx_gpio       = GPIO_USART2_TX,
   .rx_gpio       = GPIO_USART2_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART2_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART2_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART2_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART2_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART2_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART2_RTS,
-#endif
-#ifdef CONFIG_USART2_RXDMA
+#  endif
+#  ifdef CONFIG_USART2_RXDMA
   .rxdma_channel = DMAMAP_USART2_RX,
   .rxfifo        = g_usart2rxfifo,
-#endif
+#  endif
 
-#ifdef CONFIG_USART2_RS485
+#  ifdef CONFIG_USART2_RS485
   .rs485_dir_gpio = GPIO_USART2_RS485_DIR,
-#  if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
+#    if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
   .rs485_dir_polarity = false,
-#  else
+#    else
   .rs485_dir_polarity = true,
+#    endif
 #  endif
-#endif
 };
 #endif
 
@@ -625,9 +625,9 @@ static struct stm32l4_serial_s g_usart3priv =
 {
   .dev =
     {
-#if CONSOLE_UART == 4
+#  if CONSOLE_UART == 4
       .isconsole = true,
-#endif
+#  endif
       .recv      =
       {
         .size    = CONFIG_USART3_RXBUFSIZE,
@@ -638,11 +638,11 @@ static struct stm32l4_serial_s g_usart3priv =
         .size    = CONFIG_USART3_TXBUFSIZE,
         .buffer  = g_usart3txbuffer,
       },
-#ifdef CONFIG_USART3_RXDMA
+#  ifdef CONFIG_USART3_RXDMA
       .ops       = &g_uart_dma_ops,
-#else
+#  else
       .ops       = &g_uart_ops,
-#endif
+#  endif
       .priv      = &g_usart3priv,
     },
 
@@ -655,27 +655,27 @@ static struct stm32l4_serial_s g_usart3priv =
   .usartbase     = STM32L4_USART3_BASE,
   .tx_gpio       = GPIO_USART3_TX,
   .rx_gpio       = GPIO_USART3_RX,
-#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART3_OFLOWCONTROL)
+#  if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART3_OFLOWCONTROL)
   .oflow         = true,
   .cts_gpio      = GPIO_USART3_CTS,
-#endif
-#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART3_IFLOWCONTROL)
+#  endif
+#  if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART3_IFLOWCONTROL)
   .iflow         = true,
   .rts_gpio      = GPIO_USART3_RTS,
-#endif
-#ifdef CONFIG_USART3_RXDMA
+#  endif
+#  ifdef CONFIG_USART3_RXDMA
   .rxdma_channel = DMAMAP_USART3_RX,
... 8126 lines suppressed ...