mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
soc: qcom: smem: Fix incompatible types in comparison
[ Upstream commit5f908786cf] 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:20bb6c9de1("soc: qcom: smem: map only partitions used by local HOST") Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> Link: https://lore.kernel.org/r/20230801094807.4146779-1-chenjiahao16@huawei.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3b1f1999a3
commit
0cd481c27b
@@ -723,7 +723,7 @@ EXPORT_SYMBOL(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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user