aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorStephane Grosjean <s.grosjean@peak-system.com>2018-06-21 15:23:26 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2018-07-27 10:40:18 +0200
commit0cccf0abf2daeff3c97c3912049ed175d17df559 (patch)
tree6e1dcceb78b55f46f8c3babcbb3d9f19fdf76b8a /drivers/net/can
parentcan: peak_usb: mark expected switch fall-throughs (diff)
downloadlinux-dev-0cccf0abf2daeff3c97c3912049ed175d17df559.tar.xz
linux-dev-0cccf0abf2daeff3c97c3912049ed175d17df559.zip
can: peak_canfd: improves 32-bit alignment
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>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/peak_canfd/peak_canfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/peak_canfd/peak_canfd.c b/drivers/net/can/peak_canfd/peak_canfd.c
index ed8561d4a90f..5696d7e80751 100644
--- a/drivers/net/can/peak_canfd/peak_canfd.c
+++ b/drivers/net/can/peak_canfd/peak_canfd.c
@@ -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)