Swatantra-66 opened a new pull request, #20773:
URL: https://github.com/apache/nuttx/pull/20773

   ## Summary
   As discussed in issue #11932 by @acassis, @raiden00pl, and @patacongo, 
`CONFIG_SPI_DMAPRIO` was an artifact cloned from the SDIO driver into STM32 SPI 
in 2012, but was never defined in any Kconfig file. Subsequent ARM SPI drivers 
(STM32 variants and AT32) copied the block verbatim, leaving dead `#if 
defined(CONFIG_SPI_DMAPRIO)` checks and dead `#error "Illegal value for 
CONFIG_SPI_DMAPRIO"` directives.
   
   Because `CONFIG_SPI_DMAPRIO` was never defined in Kconfig, drivers always 
fell back to the default DMA priorities (e.g., `DMA_CCR_PRIMED` or 
`DMA_SCR_PRILO`).
   
   This PR removes the dead `#if` checks and dead `#error` directives across 
all 14 affected SPI and I2S driver files, directly assigning the appropriate 
default DMA priority. It also fixes a missing closing parenthesis on `#elif 
defined(CONFIG_STM32_STM32WL5XXX_CPU1` in `stm32wl5_spi.c`.
   
   Fixes #11932.
   
   ## Impact
   - **Is new feature added?**: No
   - **Impact on user**: None. Eliminates orphaned Kconfig symbols and dead 
`#error` directives.
   - **Impact on build**: Cleans up preprocessor logic across 14 ARM SPI/I2S 
drivers; fixes syntax error in `stm32wl5_spi.c`.
   - **Impact on hardware**: None. All boards continue to use their default DMA 
priority as they have for 14 years.
   - **Impact on documentation**: None.
   - **Impact on security**: None.
   - **Impact on compatibility**: 100% backward compatible.
   
   ## Testing
   I confirm that changes are verified on local setup:
   - **Build Host**: Windows 11 (WSL2 Ubuntu 24.04), x86_64, GCC
   - **Target(s)**: arch/arm (STM32, AT32)
   
   ### Verification Details:
   1. Ran `tools/nxstyle` on all modified line ranges across all 14 files:
      - **0 errors, 0 warnings**.
   2. Preprocessor symbol audit:
      - `git grep CONFIG_SPI_DMAPRIO` confirms 0 remaining references across 
the entire repository.
   3. Verified strict 78-character line limit and zero trailing whitespace 
across all modified lines.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to