Re: drivers/block/ub.c

From: Oliver Neukum
Date: Sun Jun 27 2004 - 00:04:35 EST


Am Sonntag, 27. Juni 2004 01:08 schrieb Andries Brouwer:
> >> Yes, we have macros. Using those macros would not at all be an improvement here.
> >
> > How do you arrive at that unusual conclusion?
>
> The above writes clearly and simply what one wants.
> I expect that you propose writing
>
>         *((u32 *)(cmd->cdb + 2)) = cpu_to_be32(block);
>
> or some similar unspeakable ugliness.
> If you had something else in mind, please reveal what.

That "ugliness" has the unspeakable advantage of producing sane code
on big endian architectures.
If you want eye candy, then go and use a structured data type rather
than an array of bytes.

Regards
Oliver

-
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/