Patch "soc: qcom: smem: Fix incompatible types in comparison" has been added to the 6.5-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

    soc: qcom: smem: Fix incompatible types in comparison

to the 6.5-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:
     soc-qcom-smem-fix-incompatible-types-in-comparison.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 185ef016ae4323f57c63351b8821a95ecfb82076
Author: Chen Jiahao <chenjiahao16@xxxxxxxxxx>
Date:   Tue Aug 1 17:48:07 2023 +0800

    soc: qcom: smem: Fix incompatible types in comparison
    
    [ Upstream commit 5f908786cf44fcb397cfe0f322ef2f41b0909e2a ]
    
    This patch fixes the following sparse error:
    
    drivers/soc/qcom/smem.c:738:30: error: incompatible types in comparison expression (different add        ress spaces):
    drivers/soc/qcom/smem.c:738:30:    void *
    drivers/soc/qcom/smem.c:738:30:    void [noderef] __iomem *
    
    In addr_in_range(), "base" is of type void __iomem *, converting
    void *addr to the same type to fix above sparse error.
    
    Fixes: 20bb6c9de1b7 ("soc: qcom: smem: map only partitions used by local HOST")
    Signed-off-by: Chen Jiahao <chenjiahao16@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230801094807.4146779-1-chenjiahao16@xxxxxxxxxx
    Signed-off-by: Bjorn Andersson <andersson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index b0d59e815c3b7..a516b8b5efac9 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -724,7 +724,7 @@ EXPORT_SYMBOL_GPL(qcom_smem_get_free_space);
 
 static bool addr_in_range(void __iomem *base, size_t size, void *addr)
 {
-	return base && (addr >= base && addr < base + size);
+	return base && ((void __iomem *)addr >= base && (void __iomem *)addr < base + size);
 }
 
 /**



[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