Re: WARNING: do not add new typedefs - is that for real?

From: Christoph Hellwig
Date: Wed Jan 02 2008 - 05:09:09 EST


On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote:
> I have this code:
>
> <c_code>
> /*
> * osd-r10 4.12.5 Data-In and Data-Out buffer offsets
> * byte offset = mantissa * (2^(exponent+8))
> */
> typedef __be32 osd_cdb_offset;

Given that you can't do normal arithmetic on this type it should't
really be a __be32 but it's own __bitwise type with proper accessors.

But yes, this is one of the rare cases where a typedef makes sense,
but Í'd call it osd_off_t or something like that.

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