ehca: Make ehca2ib_return_code() non-inline
PATCH 3/5 ehca: Make ehca2ib_return_code() non-inline
From: Joachim Fenkes <[email protected]>
Date: Thu, 19 Jul 2007 21:13:57 +0200
Subject: [PATCH 3/5] IB/ehca: Make ehca2ib_return_code() non-inline
It's nowhere in the main path and making it non-inline saves ~1.5K of code.
Signed-off-by Joachim Fenkes <[email protected]>
--- drivers/infiniband/hw/ehca/ehca_main.c | 17 +++++++++++++++++ drivers/infiniband/hw/ehca/ehca_tools.h | 19 +------------------ 2 files changed, 18 insertions(+), 18 deletions(-)
drivers/infiniband/hw/ehca/ehca_main.c +17 -0
@@ -130,6 +130,23 @@ void ehca_free_fw_ctrlblock(void *ptr) }#endif +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 : +return -EINVAL ; + } +} +static int ehca_create_slab_caches (void ) {int ret;
drivers/infiniband/hw/ehca/ehca_tools.h +1 -18
@@ -154,24 +154,7 @@ extern int ehca_debug_level;#define EHCA_BMASK_GET (mask, value) \ (EHCA_BMASK_MASK(mask) & (((u64)(value)) >> EHCA_BMASK_SHIFTPOS(mask))) -/* Converts ehca to ib return code */ -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 : -return -EINVAL ; - } -} - +int ehca2ib_return_code (u64 ehca_rc);#endif /* EHCA_TOOLS_H */
Signature · 1 line
1.5.2
Roland Dreier
Appliedthanks, applied