lkml.org 
[lkml]   [2022]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/5] habanalabs/gaudi: use correct type in assignment
Date
packets are defined as LE so we need to convert before assigning
values to them.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
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
\
 
 \ /
  Last update: 2022-06-24 16:05    [W:0.030 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site