diff options
author | Hoang-Nam Nguyen <hnguyen@de.ibm.com> | 2007-07-12 17:49:02 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-17 18:37:39 -0700 |
commit | a1a6ff11006c3a056cda9e8b13e7388fba3e69a1 (patch) | |
tree | 7741708bf408ff3fbbf01d75f5ab30b73a1db583 /drivers/infiniband/hw/ehca/ehca_tools.h | |
parent | 3df78f81e070c0e3330ae1bd40385e2f0d6fea2c (diff) |
IB/ehca: Use common error code mapping instead of specific ones
Instead of one error mapping function for each potential error source
in ehca_mrmw.c, use a centralized function that handles all cases,
saving a three-figure line count.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_tools.h')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_tools.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_tools.h b/drivers/infiniband/hw/ehca/ehca_tools.h index 03b185f873d..fd8238b3215 100644 --- a/drivers/infiniband/hw/ehca/ehca_tools.h +++ b/drivers/infiniband/hw/ehca/ehca_tools.h @@ -161,8 +161,11 @@ static inline int ehca2ib_return_code(u64 ehca_rc) switch (ehca_rc) { case H_SUCCESS: return 0; + case H_RESOURCE: /* Resource in use */ case H_BUSY: return -EBUSY; + case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */ + case H_CONSTRAINED: /* resource constraint */ case H_NO_MEM: return -ENOMEM; default: |