lkml.org 
[lkml]   [2011]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] staging: ft1000: Fix coding style in write_blk_fifo() function.
You didn't introduce it but do you know what the code is trying to do
here?

byte_length = word_length * 4;

if (byte_length % 4)
aligncnt = 4 - (byte_length % 4);
else
aligncnt = 0;
byte_length += aligncnt;

if (byte_length && ((byte_length % 64) == 0))
byte_length += 4;

if (byte_length < 64)
byte_length = 68;


Apparently the stuff has to be aligned to 4 bytes, but it can't be
aligned at 64 bytes and it can't be less than 68 bytes long. The
part that especially confuses me is why it can't be aligned at 64 bytes.

regards,
dan carpenter


\
 
 \ /
  Last update: 2011-01-26 14:09    [W:0.076 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site