Skip to content

arch/arm: remove undefined CONFIG_SPI_DMAPRIO references - #20773

Merged
acassis merged 1 commit into
apache:masterfrom
Swatantra-66:fix/arm-spi-dmaprio-cleanup
Oct 19, 2026
Merged

acassis merged 1 commit into
apache:masterfrom
Swatantra-66:fix/arm-spi-dmaprio-cleanup

Conversation

@Swatantra-66

@Swatantra-66 Swatantra-66 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • Fixes a missing closing parenthesis on #elif defined(CONFIG_STM32_STM32WL5XXX_CPU1) in stm32wl5_spi.c.
  • Cleans up legacy formatting and coding style issues (such as switch/case indentations and missing blank lines after declarations) in the touched files to ensure full compliance with NuttX nxstyle.

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 14 affected files:
    • 0 errors, 0 warnings across all 14 files.
  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.

@github-actions github-actions Bot added Arch: arm Issues related to ARM (32-bit) architecture Size: M The size of the change in this PR is medium labels Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@Swatantra-66
Swatantra-66 force-pushed the fix/arm-spi-dmaprio-cleanup branch from ebb1972 to 5767c3a Compare October 18, 2026 14:10
@Swatantra-66
Swatantra-66 force-pushed the fix/arm-spi-dmaprio-cleanup branch from 5767c3a to 809b7ea Compare October 18, 2026 14:50
@github-actions github-actions Bot added Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. and removed Size: M The size of the change in this PR is medium labels Oct 18, 2026
@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@Swatantra-66 please drop the merge patch.

As identified in issue apache#11932, 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 patch 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. Also fixes a missing closing
parenthesis in stm32wl5_spi.c.

Fixes apache#11932.

Signed-off-by: Swatantra Yadav <[email protected]>
@Swatantra-66
Swatantra-66 force-pushed the fix/arm-spi-dmaprio-cleanup branch from cdcd626 to c3909d2 Compare October 18, 2026 19:24
@Swatantra-66

Swatantra-66 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Done @xiaoxiang781216 , I mistakenly clicked the Update branch button on the GitHub UI which created that merge commit.

I have dropped the merge patch and rebased the branch cleanly on top of apache:master

@acassis
acassis merged commit 7e652be into apache:master Oct 19, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There are many references to CONFIG_SPI_DMAPRIO in the kernel but it is not defined in none Kconfig or source file

3 participants