Re: recent IDE regression

From: Bartlomiej Zolnierkiewicz
Date: Sat Jul 26 2008 - 08:18:50 EST


On Friday 25 July 2008, David Miller wrote:

[...]

> Something like this:
>
> endian: Always evaluate arguments.
>
> Changeset 7fa897b91a3ea0f16c2873b869d7a0eef05acff4
> ("ide: trivial sparse annotations") created an IDE bootup
> regression on big-endian systems. In drivers/ide/ide-iops.c,
> function ide_fixstring() we now have the loop:
>
> for (p = end ; p != s;)
> be16_to_cpus((u16 *)(p -= 2));
>
> which will never terminate on big-endian because in such
> a configuration be16_to_cpus() evaluates to "do { } while (0)"
>
> Therefore, always evaluate the arguments to nop endian transformation
> operations.
>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>

Thanks David.

PS We need more big-endian users testing linux-next (this particular patch
despite being trivial has been put there just-in-case for a week)

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