Skip to content

Commit 5f90878

Browse files
Chen Jiahaoandersson
authored andcommitted
soc: qcom: smem: Fix incompatible types in comparison
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: 20bb6c9 ("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>
1 parent 4d6e0a1 commit 5f90878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/qcom/smem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ EXPORT_SYMBOL_GPL(qcom_smem_get_free_space);
735735

736736
static bool addr_in_range(void __iomem *base, size_t size, void *addr)
737737
{
738-
return base && (addr >= base && addr < base + size);
738+
return base && ((void __iomem *)addr >= base && (void __iomem *)addr < base + size);
739739
}
740740

741741
/**

0 commit comments

Comments
 (0)