[PATCH 3/5] habanalabs/gaudi: use correct type in assignment

From: Oded Gabbay
Date: Fri Jun 24 2022 - 10:04:47 EST


packets are defined as LE so we need to convert before assigning
values to them.

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

diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index 8cf3382fa039..9ecae3da9133 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -5772,7 +5772,7 @@ static void gaudi_add_end_of_cb_packets(struct hl_device *hdev, void *kernel_add
cq_pkt = kernel_address + len - (sizeof(struct packet_msg_prot) * 2);

while ((void *)cq_padding < (void *)cq_pkt) {
- cq_padding->ctl = FIELD_PREP(GAUDI_PKT_CTL_OPCODE_MASK, PACKET_NOP);
+ cq_padding->ctl = cpu_to_le32(FIELD_PREP(GAUDI_PKT_CTL_OPCODE_MASK, PACKET_NOP));
cq_padding++;
}

--
2.25.1