Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 20bb6c9de1b7 ("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>

authored by

Chen Jiahao and committed by
Bjorn Andersson
5f908786 4d6e0a1b

+1 -1
+1 -1
drivers/soc/qcom/smem.c
··· 735 735 736 736 static bool addr_in_range(void __iomem *base, size_t size, void *addr) 737 737 { 738 - return base && (addr >= base && addr < base + size); 738 + return base && ((void __iomem *)addr >= base && (void __iomem *)addr < base + size); 739 739 } 740 740 741 741 /**