On Fri, Apr 08, 2005 at 08:13:51AM +0100, Christoph Hellwig wrote:
> > + u32 temp = le32_to_cpu(psg->sg[i-1].count) -
> > + (byte_count - scsicmd->request_bufflen);
> > + psg->sg[i-1].count = cpu_to_le32(temp);
>
> You really want {be,le}*_{add,sub} helpers. I needed them on various
> occasions, too. Al, what do you think about adding these helpers to a
> common header somewhere?
*shrug*
Are you asking for suggestions regarding the suitable place for such
helpers? include/linux/byteorder/generic.h would be the obvious
candidate...
> > +#define LE32_ALL_ONES ((__force __le32)0xffffffff)
>
> I don't like having this in an actual driver. It might make sense to
> either have this in a common header or actually allowing to assign all
> ones to __l32*/__be* variables. Al?
It doesn't make sense, period. Use cpu_to_le32(~0U) - calculations will
be done at compile time and it's self-documenting. Definition above
is not more efficient or easier to type, so...
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html