Skip to content

drivers: spi_ll_stm32: Add LOG to indicate that DMA cannot be enabled #91202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

Freey0
Copy link
Contributor

@Freey0 Freey0 commented Jun 6, 2025

Add LOG to indicate the reason why DMA cannot be enabled

When using the stm32h7 and W5500 network card driver, configuring CONFIG_SPI_STM32_DMA will silently fail.

JarmouniA
JarmouniA previously approved these changes Jun 6, 2025
@JarmouniA
Copy link
Collaborator

JarmouniA commented Jun 6, 2025

CI compliance issues to be fixed

LONG_LINE_STRING: line length of 102 exceeds 100 columns
File:drivers/spi/spi_ll_stm32.c

UC5 Commit title exceeds max length (79>75): "drivers: spi_ll_stm32: Add LOG to indicate the reason why DMA cannot be enabled"

author email ([email protected]) needs to match one of the signed-off-by entries.
Compliance error, check for error messages in the "Run Compliance Tests" step

You can run this step locally with the ./scripts/ci/check_compliance.py script.

@Freey0
Copy link
Contributor Author

Freey0 commented Jun 6, 2025

CI compliance issues to be fixed

LONG_LINE_STRING: line length of 102 exceeds 100 columns
File:drivers/spi/spi_ll_stm32.c

UC5 Commit title exceeds max length (79>75): "drivers: spi_ll_stm32: Add LOG to indicate the reason why DMA cannot be enabled"

author email ([email protected]) needs to match one of the signed-off-by entries.
Compliance error, check for error messages in the "Run Compliance Tests" step

You can run this step locally with the ./scripts/ci/check_compliance.py script.

Fixed CI compliance issues

@JarmouniA
Copy link
Collaborator

Squash the 2nd commit

JarmouniA
JarmouniA previously approved these changes Jun 7, 2025
@JarmouniA JarmouniA added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Jun 7, 2025
GeorgeCGV
GeorgeCGV previously approved these changes Jun 8, 2025
gautierg-st
gautierg-st previously approved these changes Jun 9, 2025
Comment on lines 1124 to 1125
LOG_ERR("SPI buffers are not in non-cacheable memory,"
" SPI DMA transfer is not supported");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_ERR("SPI buffers are not in non-cacheable memory,"
" SPI DMA transfer is not supported");
LOG_ERR("SPI buffers are not in non-cacheable memory, SPI DMA transfer is not supported");

Prefer trace message in a single line so that one can easier grep the message in the source file tree, see Linux kernel coding style directives:

However, never break user-visible strings such as printk messages because that breaks the ability to grep for them.

Maybe trace message can be shortened, e.g.:

		LOG_ERR("SPI DMA transfers not supported on cached memory");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Accept the suggestion and use short messages.

FRASTM
FRASTM previously approved these changes Jun 9, 2025
Add LOG to indicate the reason why DMA cannot be enabled

Signed-off-by: Wenbin Zhang <[email protected]>
Copy link

sonarqubecloud bot commented Jun 9, 2025

@kartben kartben merged commit b9ec30f into zephyrproject-rtos:main Jun 10, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus platform: STM32 ST Micro STM32 size: XS A PR changing only a single line of code Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants