]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: lustre: Convert macro class_export_rpc_dec into static inline function
authorSomya Anand <somyaanand214@gmail.com>
Sat, 21 Mar 2015 12:50:25 +0000 (18:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2015 21:13:50 +0000 (22:13 +0100)
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>
drivers/staging/lustre/lustre/include/obd_class.h

index 9f528d44287fd19b71be08f48e099b2d33d3c4f7..3565660e0630710dbe1f8abfce8612adb0f4f123 100644 (file)
@@ -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)                               \
 ({                                                                   \