Patch "remoteproc: stm32: Fix incorrect type in assignment for va" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    remoteproc: stm32: Fix incorrect type in assignment for va

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     remoteproc-stm32-fix-incorrect-type-in-assignment-fo.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fd1bbf946367013743274aac6729e68ef0dadafe
Author: Arnaud Pouliquen <arnaud.pouliquen@xxxxxxxxxxx>
Date:   Wed Jan 17 14:53:11 2024 +0100

    remoteproc: stm32: Fix incorrect type in assignment for va
    
    [ Upstream commit 32381bbccba4c21145c571701f8f7fb1d9b3a92e ]
    
    The sparse tool complains about the attribute conversion between
    a _iomem void * and a void *:
    
    stm32_rproc.c:122:12: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *va @@     got void [noderef] __iomem * @@
    stm32_rproc.c:122:12: sparse:     expected void *va
    stm32_rproc.c:122:12: sparse:     got void [noderef] __iomem *
    
    Add '__force' to explicitly specify that the cast is intentional.
    This conversion is necessary to cast to virtual addresses pointer,used,
    by the remoteproc core.
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Closes: https://lore.kernel.org/oe-kbuild-all/202312150052.HCiNKlqB-lkp@xxxxxxxxx/
    Fixes: 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver")
    Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240117135312.3381936-2-arnaud.pouliquen@xxxxxxxxxxx
    Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index 43715594bd801..e48dce98936ad 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -119,7 +119,7 @@ static int stm32_rproc_mem_alloc(struct rproc *rproc,
 	void *va;
 
 	dev_dbg(dev, "map memory: %pad+%zx\n", &mem->dma, mem->len);
-	va = ioremap_wc(mem->dma, mem->len);
+	va = (__force void *)ioremap_wc(mem->dma, mem->len);
 	if (IS_ERR_OR_NULL(va)) {
 		dev_err(dev, "Unable to map memory region: %pad+0x%zx\n",
 			&mem->dma, mem->len);
@@ -136,7 +136,7 @@ static int stm32_rproc_mem_release(struct rproc *rproc,
 				   struct rproc_mem_entry *mem)
 {
 	dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
-	iounmap(mem->va);
+	iounmap((__force __iomem void *)mem->va);
 
 	return 0;
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux