On Wed, Aug 07, 2013 at 01:56:58PM +0300, Ville Syrjälä wrote:
On Tue, Aug 06, 2013 at 08:32:16PM +0100, Damien Lespiau wrote:
If the user if this API is providing a bigger buffer than the infoframe size, it could be for a could reason. For instance it could be because it gives the buffer that will be written to the hardware, up to the maximum of an infoframe size.
Instead of just zeroing up to the infoframe size, let's zero the whole incoming buffer as those extra bytes are also used to compute the ECC and need to be 0.
Signed-off-by: Damien Lespiau damien.lespiau@intel.com
One concern that came to mind was someone needing to preserve the buffer contents beyond the infoframe. But I guess if someone really needs to do that, they can go and figure out the exact length of the infoframe and pass that.
Right, that was my thinking as well. We even have a macro for that now.