diff options
author | Chen Jiahao | 2023-08-01 17:48:07 +0800 |
---|---|---|
committer | Bjorn Andersson | 2023-08-03 08:07:20 -0700 |
commit | 5f908786cf44fcb397cfe0f322ef2f41b0909e2a (patch) | |
tree | 0af24e3ba28083c33a3106f368d0aebf15f45b25 /drivers/soc | |
parent | 4d6e0a1bf8f7a6b44d20162e29a87d0bd9526bb0 (diff) |
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>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/smem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index aa4a199efefb..d4a89d2bb43b 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -735,7 +735,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); } /** |