[PATCH] for readability in raid5.c

whiting@mit.edu
Wed, 11 Aug 1999 17:16:41 EDT


This line is a little unclear. Also, this will only be one division instead
of two (unless gcc already optimizes to this).

Also, is there any chance of a problem from rounding? Or is the buffer
always going to be a multiple of 8*sizeof(long)?

--- /tmp/raid5.c Fri May 8 03:17:13 1998
+++ drivers/block/raid5.c Wed Aug 11 16:55:49 1999
@@ -750,7 +750,7 @@
#else
static void xor_block(struct buffer_head *dest, struct buffer_head *source)
{
- long lines = dest->b_size / (sizeof (long)) / 8, i;
+ long lines = dest->b_size / ( 8 * (sizeof (long)) ), i;
long *destp = (long *) dest->b_data, *sourcep = (long *) source->b_data;

for (i = lines; i > 0; i--) {

James

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