habanalabs: wrap macro arg with parentheses

The macro argument <val> is cast-ed to u32 in some of the places.
Because this arg can be some arithmetic computation (e.g. address +
offset) the cast should be on the whole expression.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
Ohad Sharabi 2022-07-18 22:02:13 +03:00 committed by Oded Gabbay
parent f25a72b8b9
commit 0c819c9a04
1 changed files with 2 additions and 2 deletions

View File

@ -2506,7 +2506,7 @@ void hl_wreg(struct hl_device *hdev, u32 reg, u32 val);
break; \
(val) = __elbi_read; \
} else {\
(val) = RREG32((u32)addr); \
(val) = RREG32((u32)(addr)); \
} \
if (cond) \
break; \
@ -2517,7 +2517,7 @@ void hl_wreg(struct hl_device *hdev, u32 reg, u32 val);
break; \
(val) = __elbi_read; \
} else {\
(val) = RREG32((u32)addr); \
(val) = RREG32((u32)(addr)); \
} \
break; \
} \