Whamcloud - gitweb
LU-8066 lnet: properly isolate kernel_param_ops
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index 4c8decc..55d2779 100644 (file)
@@ -85,13 +85,13 @@ MODULE_PARM_DESC(lnet_numa_range,
  */
 unsigned int lnet_health_sensitivity = 0;
 static int sensitivity_set(const char *val, cfs_kernel_param_arg_t *kp);
+#ifdef HAVE_KERNEL_PARAM_OPS
 static struct kernel_param_ops param_ops_health_sensitivity = {
        .set = sensitivity_set,
        .get = param_get_int,
 };
 #define param_check_health_sensitivity(name, p) \
                __param_check(name, p, int)
-#ifdef HAVE_KERNEL_PARAM_OPS
 module_param(lnet_health_sensitivity, health_sensitivity, S_IRUGO|S_IWUSR);
 #else
 module_param_call(lnet_health_sensitivity, sensitivity_set, param_get_int,
@@ -106,13 +106,13 @@ MODULE_PARM_DESC(lnet_health_sensitivity,
  */
 unsigned int lnet_recovery_interval = 1;
 static int recovery_interval_set(const char *val, cfs_kernel_param_arg_t *kp);
+#ifdef HAVE_KERNEL_PARAM_OPS
 static struct kernel_param_ops param_ops_recovery_interval = {
        .set = recovery_interval_set,
        .get = param_get_int,
 };
 #define param_check_recovery_interval(name, p) \
                __param_check(name, p, int)
-#ifdef HAVE_KERNEL_PARAM_OPS
 module_param(lnet_recovery_interval, recovery_interval, S_IRUGO|S_IWUSR);
 #else
 module_param_call(lnet_recovery_interval, recovery_interval_set, param_get_int,
@@ -162,6 +162,7 @@ MODULE_PARM_DESC(lnet_peer_discovery_disabled,
 
 unsigned lnet_transaction_timeout = 50;
 static int transaction_to_set(const char *val, cfs_kernel_param_arg_t *kp);
+#ifdef HAVE_KERNEL_PARAM_OPS
 static struct kernel_param_ops param_ops_transaction_timeout = {
        .set = transaction_to_set,
        .get = param_get_int,
@@ -169,7 +170,6 @@ static struct kernel_param_ops param_ops_transaction_timeout = {
 
 #define param_check_transaction_timeout(name, p) \
                __param_check(name, p, int)
-#ifdef HAVE_KERNEL_PARAM_OPS
 module_param(lnet_transaction_timeout, transaction_timeout, S_IRUGO|S_IWUSR);
 #else
 module_param_call(lnet_transaction_timeout, transaction_to_set, param_get_int,
@@ -180,6 +180,7 @@ MODULE_PARM_DESC(lnet_transaction_timeout,
 
 unsigned lnet_retry_count = 0;
 static int retry_count_set(const char *val, cfs_kernel_param_arg_t *kp);
+#ifdef HAVE_KERNEL_PARAM_OPS
 static struct kernel_param_ops param_ops_retry_count = {
        .set = retry_count_set,
        .get = param_get_int,
@@ -187,7 +188,6 @@ static struct kernel_param_ops param_ops_retry_count = {
 
 #define param_check_retry_count(name, p) \
                __param_check(name, p, int)
-#ifdef HAVE_KERNEL_PARAM_OPS
 module_param(lnet_retry_count, retry_count, S_IRUGO|S_IWUSR);
 #else
 module_param_call(lnet_retry_count, retry_count_set, param_get_int,