diff options
author | Bharat Jauhari <bjauhari@habana.ai> | 2022-09-27 14:38:38 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-11-23 16:13:40 +0200 |
commit | 0502df9bbea0bd0e77c4a283e4cc34801038899a (patch) | |
tree | 5f4856a921f76a335740bfa1b527044896a5b661 | |
parent | 52d5e5469526216bcc418f26a2796d5af6226023 (diff) | |
download | linux-stable-0502df9bbea0bd0e77c4a283e4cc34801038899a.tar.gz linux-stable-0502df9bbea0bd0e77c4a283e4cc34801038899a.tar.bz2 linux-stable-0502df9bbea0bd0e77c4a283e4cc34801038899a.zip |
habanalabs: use lower_32_bits()
This fixes sparse warning on doing cast to 32-bits
Signed-off-by: Bharat Jauhari <bjauhari@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
-rw-r--r-- | drivers/misc/habanalabs/common/habanalabs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/habanalabs/common/habanalabs.h b/drivers/misc/habanalabs/common/habanalabs.h index cdc50c2c4de8..f4b3fa4b0976 100644 --- a/drivers/misc/habanalabs/common/habanalabs.h +++ b/drivers/misc/habanalabs/common/habanalabs.h @@ -2528,7 +2528,7 @@ void hl_wreg(struct hl_device *hdev, u32 reg, u32 val); break; \ (val) = __elbi_read; \ } else {\ - (val) = RREG32((u32)(addr)); \ + (val) = RREG32(lower_32_bits(addr)); \ } \ if (cond) \ break; \ @@ -2539,7 +2539,7 @@ void hl_wreg(struct hl_device *hdev, u32 reg, u32 val); break; \ (val) = __elbi_read; \ } else {\ - (val) = RREG32((u32)(addr)); \ + (val) = RREG32(lower_32_bits(addr)); \ } \ break; \ } \ @@ -2594,7 +2594,7 @@ void hl_wreg(struct hl_device *hdev, u32 reg, u32 val); if (__rc) \ break; \ } else { \ - __read_val = RREG32((u32)(addr_arr)[__arr_idx]); \ + __read_val = RREG32(lower_32_bits(addr_arr[__arr_idx])); \ } \ if (__read_val == (expected_val)) \ __elem_bitmask &= ~BIT_ULL(__arr_idx); \ |