Thread (2 messages) 2 messages, 2 authors, 2025-12-23

Re: [PATCH v2] dmaengine: stm32-mdma: initialize m2m_hw_period and ccr to fix warnings

From: Vinod Koul <vkoul@kernel.org>
Date: 2025-12-23 11:28:28
Also in: dmaengine, lkml

On Wed, 17 Dec 2025 09:15:03 +0100, Amelie Delaunay wrote:
m2m_hw_period is initialized only when chan_config->m2m_hw is true. This
triggers a warning:
‘m2m_hw_period’ may be used uninitialized [-Wmaybe-uninitialized]
Although m2m_hw_period is only used when chan_config->m2m_hw is true and
ignored otherwise, initialize it unconditionally to 0.

ccr is initialized by stm32_mdma_set_xfer_param() when the sg list is not
empty. This triggers a warning:
‘ccr’ may be used uninitialized [-Wmaybe-uninitialized]
Indeed, it could be used uninitialized if the sg list is empty. Initialize
it to 0.

[...]
Applied, thanks!

[1/1] dmaengine: stm32-mdma: initialize m2m_hw_period and ccr to fix warnings
      commit: aaf3bc0265744adbc2d364964ef409cf118d193d

Best regards,
-- 
~Vinod


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help