lkml.org 
[lkml]   [2012]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 03/10] qnx4fs: use memweight()
From
2012/5/21 Anders Larsen <al@alarsen.net>:

>> @@ -44,13 +27,16 @@ unsigned long qnx4_count_free_blocks(struct
>> super_block *sb)
>>        struct buffer_head *bh;
>>
>>        while (total < size) {
>> +               int bytes = min(size - total, QNX4_BLOCK_SIZE);
>> +
>>                if ((bh = sb_bread(sb, start + offset)) == NULL) {
>>                        printk(KERN_ERR "qnx4: I/O error in counting free
>> blocks\n");
>>                        break;
>>                }
>> -               count_bits(bh->b_data, size - total, &total_free);
>> +               total_free += bytes * BITS_PER_BYTE-
>
>
> due to the missing whitespace after the macro I had to read that statement
> three times to comprehend it (which was probably good, since that's the beef
> ;)

Oh, checkpatch.pl also couldn't detect it.

>> +                               memweight(bh->b_data, bytes);
>>                brelse(bh);
>> -               total += QNX4_BLOCK_SIZE;
>> +               total += bytes;
>>                offset++;
>>        }
>
>
> Other than that,
> Acked-by: Anders Larsen <al@alarsen.net>

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-05-21 14:21    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site