Skip to content

Commit 2441beb

Browse files
committed
Fix renamed variable in debug message (previous compilation error).
1 parent 09b0939 commit 2441beb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

recipes-kernel/kernel-modules/x8h7/x8h7_can.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ static void x8h7_can_hw_tx(struct x8h7_can_priv *priv, struct can_frame *frame)
532532
{
533533
union x8h7_can_frame_message x8h7_can_msg;
534534
#ifdef DEBUG
535-
char data_str[X8H7_CAN_FRAME_MAX_DATA_LEN * 4] = {0};
535+
char data_str[X8H7_CAN_FRAME_MAX_DATA_LEN * 4];
536536
int i;
537537
int len;
538538
#endif
@@ -549,11 +549,11 @@ static void x8h7_can_hw_tx(struct x8h7_can_priv *priv, struct can_frame *frame)
549549

550550
#ifdef DEBUG
551551
i = 0; len = 0;
552-
for (i = 0; (i < frame->can_dlc) && (len < sizeof(data_str)); i++)
552+
for (i = 0; (i < x8h7_can_msg.field.len) && (len < sizeof(data_str)); i++)
553553
{
554-
len += snprintf(data_str + len, sizeof(data_str) - len, " %02X", can_msg.field.data[i]);
554+
len += snprintf(data_str + len, sizeof(data_str) - len, " %02X", x8h7_can_msg.field.data[i]);
555555
}
556-
DBG_PRINT("Send CAN frame to H7: id = %08X, len = %d, data = [%s ]\n", can_msg.field.id, can_msg.field.len, data_str);
556+
DBG_PRINT("Send CAN frame to H7: id = %08X, len = %d, data = [%s ]\n", x8h7_can_msg.field.id, x8h7_can_msg.field.len, data_str);
557557
#endif
558558

559559
x8h7_pkt_enq(priv->periph,

0 commit comments

Comments
 (0)