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:
parent
f25a72b8b9
commit
0c819c9a04
|
@ -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; \
|
||||
} \
|
||||
|
|
Loading…
Reference in New Issue