[PATCH 8/9] habanalabs/goya: add '__force' attribute to suppress false alarm

From: Oded Gabbay
Date: Mon Jun 14 2021 - 08:51:55 EST


From: Koby Elbaz <kelbaz@xxxxxxxxx>

fix (suppress) the following sparse warnings:
'warning: cast removes address space of expression'

Signed-off-by: Koby Elbaz <kelbaz@xxxxxxxxx>
Reviewed-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
Signed-off-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
---
drivers/misc/habanalabs/goya/goya.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index e91b730baebd..5a837c0b4d76 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -2937,7 +2937,7 @@ void *goya_get_int_queue_base(struct hl_device *hdev, u32 queue_id,

*dma_handle = hdev->asic_prop.sram_base_address;

- base = (void *) hdev->pcie_bar[SRAM_CFG_BAR_ID];
+ base = (__force void *) hdev->pcie_bar[SRAM_CFG_BAR_ID];

switch (queue_id) {
case GOYA_QUEUE_ID_MME:
--
2.25.1