[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <24ad57a6-bee8-1dad-8e74-7f68918aa81e@hartkopp.net>
Date: Mon, 25 Dec 2017 12:58:56 +0100
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Luu An Phu <phu.luuan@....com>, wg@...ndegger.com,
mkl@...gutronix.de
Cc: linux-can@...r.kernel.org, netdev@...r.kernel.org,
stefan-gabriel.mirea@....com
Subject: Re: [PATCH] flex_can: Fix checking can_dlc
Answering myself after reading my own comment once more:
In fact the code fix seems to be correct but the commit comment was
completely wrong which lead to my answer ...
can_dlc can hold values from 0 .. 8.
The first 4 bytes are placed in data[0..3]. When we have more(!) than 4
bytes in can_dlc, the bytes 5..8 are placed in data[4..7].
The good thing was, that the current check was more conservative than
your suggestion so that we did not detect any data loss.
Please send a V2 patch with corrected commit message.
Thanks,
Oliver
ps.
>> From: "phu.luuan" <phu.luuan@....com>
>> + * Copyright 2017 NXP
A one-liner contribution like this tiny fix usually does not lead to an
attribution in the copyrights. Your contribution is already perfectly
recorded by the Signed-off-by tag.
Powered by blists - more mailing lists