summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSomya Anand <somyaanand214@gmail.com>2015-03-21 18:20:25 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-23 22:13:50 +0100
commit5fb0acb435c92760c4157df134e88103f1461b32 (patch)
tree350a93ea023a191eabd6ea22825d23a1ee570389
parent28b9d6f14d30eae2d600a3f6deac625f26591820 (diff)
downloadlinux-5fb0acb435c92760c4157df134e88103f1461b32.tar.bz2
Staging: lustre: Convert macro class_export_rpc_dec into static inline function
This patch converts the macro class_export_rpc_dec into static inline function. This is possible because the types of arguments at all the call sites are same. So, the type of parameter is compatible with the types of the arguments at all of the call sites. Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/include/obd_class.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
index 9f528d44287f..3565660e0630 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -229,13 +229,13 @@ static inline void class_export_rpc_inc(struct obd_export *exp)
(exp), atomic_read(&(exp)->exp_rpc_count));
}
-#define class_export_rpc_dec(exp) \
-({ \
- LASSERT_ATOMIC_POS(&exp->exp_rpc_count); \
- atomic_dec(&(exp)->exp_rpc_count); \
- CDEBUG(D_INFO, "RPC PUTting export %p : new rpc_count %d\n", \
- (exp), atomic_read(&(exp)->exp_rpc_count)); \
-})
+static inline void class_export_rpc_dec(struct obd_export *exp)
+{
+ LASSERT_ATOMIC_POS(&exp->exp_rpc_count);
+ atomic_dec(&(exp)->exp_rpc_count);
+ CDEBUG(D_INFO, "RPC PUTting export %p : new rpc_count %d\n",
+ (exp), atomic_read(&(exp)->exp_rpc_count));
+}
#define class_export_lock_get(exp, lock) \
({ \