From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C808D3B8926; Sat, 28 Feb 2026 17:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300343; cv=none; b=jk+cpYKnIcjkbY/wgNgh4MEVtIP7q2cJrYQQtSbE+RxcR9qGMN/pxpNRV/n+xl8JF9bNrp4SwwHKA7IzKd3VsU4EU6z2ZqoDFPXnNi3i2cKcqEIRJgIqIjIdnpJq1Bj8fymNegApB77YVBrO0tkWLlBvifowzsUYEVXj/T1Fd2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300343; c=relaxed/simple; bh=HdA84fezaPdN0UlF5lqo0bMf88YR7QriDE+7rE1Cuwc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XYx4Pv3DLg+u7WpYeo3s5V6OWaBUPSM4BJ+c+VV/jzw1L+l7rSIZaZmT5L+nesFJSY5U348Tk8LePYY2koV+yQPOgk6U9nHGU8Fjwam+lXsxUXOcfHrzhk4nvOdNp+zq0Ca0GGt6yv7KJpc7LfaLos3nWx9rVz6w1xS/AqQo/C4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aQ3lACcK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aQ3lACcK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F45DC2BC87; Sat, 28 Feb 2026 17:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300343; bh=HdA84fezaPdN0UlF5lqo0bMf88YR7QriDE+7rE1Cuwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aQ3lACcKjVeN319k4yhgR0ya9eNNdJH/uM4PWvBIGDL2F/eRYQ5/Zu/XLyUMoHRw+ 4ll9oTYe8f5H4WnWdy56z774BtCC9Y2Hzw7VH49oJZBVAeTbMZ4nrNLpiKR7KX991R g4g+Ps7bw45v2Mc+Vl5vrp0YSyqdfZ9IQvX9+wgDdMbyAJkzfnyJHqhpwCFIs/lZBU DMIL8B/tfvc16xdnQ3/DVWAMPCQDK6N/oOtZJBCkk86yErGnqJzJ3DeyB/QYG5lHQu EpSRdplCg7xAz6BUr2tPMvT1d2vr+jKwW96k3Wq2ESQlto9aPMiCUAc7lsI+jAI1V8 3bZjq1k/ovFlg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Le=20Goffic?= , =?UTF-8?q?Cl=C3=A9ment=20Le=20Goffic?= , Amelie Delaunay , Vinod Koul , Sasha Levin Subject: [PATCH 6.19 376/844] dmaengine: stm32-mdma: initialize m2m_hw_period and ccr to fix warnings Date: Sat, 28 Feb 2026 12:24:49 -0500 Message-ID: <20260228173244.1509663-377-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Clément Le Goffic [ Upstream commit aaf3bc0265744adbc2d364964ef409cf118d193d ] 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. Signed-off-by: Clément Le Goffic Reviewed-by: Clément Le Goffic Signed-off-by: Amelie Delaunay Link: https://patch.msgid.link/20251217-mdma_warnings_fix-v2-1-340200e0bb55@foss.st.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/stm32/stm32-mdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/stm32/stm32-mdma.c b/drivers/dma/stm32/stm32-mdma.c index 080c1c725216c..b87d41b234df1 100644 --- a/drivers/dma/stm32/stm32-mdma.c +++ b/drivers/dma/stm32/stm32-mdma.c @@ -731,7 +731,7 @@ static int stm32_mdma_setup_xfer(struct stm32_mdma_chan *chan, struct stm32_mdma_chan_config *chan_config = &chan->chan_config; struct scatterlist *sg; dma_addr_t src_addr, dst_addr; - u32 m2m_hw_period, ccr, ctcr, ctbr; + u32 m2m_hw_period = 0, ccr = 0, ctcr, ctbr; int i, ret = 0; if (chan_config->m2m_hw) -- 2.51.0