RE: [PATCH 2/2] infiniband: Use unsigned for bit index

2015-02-02 Thread Selvin Xavier
s Villemoes; linux-r...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: [PATCH 2/2] infiniband: Use unsigned for bit index > > In the expressions idx/32 and idx%32, both idx and 32 have signed type, and > unfortunately the C standard prescribes rounding to 0, so unles

RE: [PATCH 2/2] infiniband: Use unsigned for bit index

2015-02-02 Thread Selvin Xavier
: Rasmus Villemoes; linux-r...@vger.kernel.org; linux- ker...@vger.kernel.org Subject: [PATCH 2/2] infiniband: Use unsigned for bit index In the expressions idx/32 and idx%32, both idx and 32 have signed type, and unfortunately the C standard prescribes rounding to 0, so unless gcc can prove

[PATCH 2/2] infiniband: Use unsigned for bit index

2015-01-16 Thread Rasmus Villemoes
In the expressions idx/32 and idx%32, both idx and 32 have signed type, and unfortunately the C standard prescribes rounding to 0, so unless gcc can prove that idx is non-negative, these cannot be implemented as simple shift respectively mask operations. Help gcc by changing the type of idx to

[PATCH 2/2] infiniband: Use unsigned for bit index

2015-01-16 Thread Rasmus Villemoes
In the expressions idx/32 and idx%32, both idx and 32 have signed type, and unfortunately the C standard prescribes rounding to 0, so unless gcc can prove that idx is non-negative, these cannot be implemented as simple shift respectively mask operations. Help gcc by changing the type of idx to