]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: dw-edma: Fix readq_ch() return value truncation
authorBaikal Electronics <support@baikalelectronics.ru>
Wed, 25 Jan 2023 15:19:00 +0000 (18:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:38 +0000 (09:33 +0100)
commit49a0099aa60fdbcbb4cb68d58eb82e7550d627ec
treeffa8c2d5110401f7b8397d5a3817defe52498727
parentf8fdfedb507363910a518927dfcd1703a200f872
dmaengine: dw-edma: Fix readq_ch() return value truncation

[ Upstream commit 306eb9b9d1be8aa14e678c60994b239225a4d486 ]

Previously, readq_ch() did a 64-bit readq(), but truncated the result by
storing it in the u32 "value".  Change "value" to u64 to avoid the
truncation.

Note: the method is currently unused, so the bug hasn't caused any problem
so far.

Fixes: c7dc51543b85 ("dmaengine: dw-edma: Add writeq() and readq() for 64 bits architectures")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/dw-edma/dw-edma-v0-core.c