Re: [PATCH] aacraid 2.6: Address sparse warnings

2005-04-11 Thread Mark Haverkamp
On Fri, 2005-04-08 at 08:13 +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}

Re: [PATCH] aacraid 2.6: Address sparse warnings

2005-04-08 Thread Christoph Hellwig
+ 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

Re: [PATCH] aacraid 2.6: Address sparse warnings

2005-04-08 Thread Al Viro
On Fri, Apr 08, 2005 at 02:41:58PM -0400, Salyzyn, Mark wrote: As long as this is guaranteed on all platforms to do the right thing ... paranoid about compiler optimizations. MarkH, this should be an easy regroup :-) Well, let's see. cpu_to_le32(~0U) - __cpu_to_le32(~0U) - [on little-endian]

[PATCH] aacraid 2.6: Address sparse warnings

2005-04-07 Thread Mark Haverkamp
This patch addresses the sparse -Wbitwise warnings that Christoph wanted me to eliminate. This mostly consisted of making data structure elements of hardware associated structures the __le* equivalent. Although there were a couple places where there was mixing of cpu and le variable math. These