IB/ehca: Replace modulus operations in flush error completion path
authorStefan Roscher <ossrosch@linux.vnet.ibm.com>
Fri, 5 Dec 2008 19:25:38 +0000 (11:25 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 5 Dec 2008 19:25:38 +0000 (11:25 -0800)
commit1c721940ddd6496508f1f2fde5167b1c898b419b
treed0ea3b596a617a6bdacbe0a23946808be80ba732
parent75c21ae9aa75b0452318d05f737ea838672137f5
IB/ehca: Replace modulus operations in flush error completion path

With the latest flush error completion patch we introduced modulus
operation to calculate the next index within a qmap.  Based on
comments from other mailing lists we decided to optimize this
operation by using an addition and an if-statement instead of modulus,
even though this is on the error path.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_qp.c
drivers/infiniband/hw/ehca/ehca_reqs.c