Skip to content

Commit

Permalink
can: peak_canfd: improves 32-bit alignment
Browse files Browse the repository at this point in the history
The embedded firmware aligns its messages on 32-bit boundaries.
This patch makes sure to browse through the list of received messages
while respecting 32-bit alignment.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Stephane Grosjean authored and Marc Kleine-Budde committed Jul 27, 2018
1 parent f805ed8 commit 0cccf0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/peak_canfd/peak_canfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ int peak_canfd_handle_msgs_list(struct peak_canfd_priv *priv,
if (msg_size <= 0)
break;

msg_ptr += msg_size;
msg_ptr += ALIGN(msg_size, 4);
}

if (msg_size < 0)
Expand Down

0 comments on commit 0cccf0a

Please sign in to comment.