RDMA/ocrdma: 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 that idx is non-negative, these cannot be implemented as simple shift respectively mask operations. Help gcc by changing the type of idx to unsigned - this cuts another few instructions from the generated code. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
Showing
想要评论请 注册 或 登录