Whamcloud - gitweb
LU-6068 misc: update old URLs to hpdd.intel.com
[fs/lustre-release.git] / lnet / lnet / router_proc.c
index edbc0ec..0fe5a3f 100644 (file)
@@ -3,8 +3,7 @@
  *
  * Copyright (c) 2011, 2013, Intel Corporation.
  *
- *   This file is part of Portals
- *   http://sourceforge.net/projects/sandiaportals/
+ *   This file is part of Lustre, https://wiki.hpdd.intel.com/
  *
  *   Portals is free software; you can redistribute it and/or
  *   modify it under the terms of version 2 of the GNU General Public
@@ -25,8 +24,6 @@
 #include <libcfs/libcfs.h>
 #include <lnet/lib-lnet.h>
 
-#if defined(__KERNEL__) && defined(LNET_ROUTER)
-
 /* This is really lnet_proc.c. You might need to update sanity test 215
  * if any file format is changed. */
 
@@ -80,7 +77,7 @@ static struct ctl_table_header *lnet_table_header = NULL;
 #define LNET_PROC_VERSION(v)   ((unsigned int)((v) & LNET_PROC_VER_MASK))
 
 static int __proc_lnet_stats(void *data, int write,
-                             loff_t pos, void *buffer, int nob)
+                            loff_t pos, void __user *buffer, int nob)
 {
         int              rc;
         lnet_counters_t *ctrs;
@@ -568,7 +565,7 @@ proc_lnet_peers(struct ctl_table *table, int write, void __user *buffer,
 }
 
 static int __proc_lnet_buffers(void *data, int write,
-                               loff_t pos, void *buffer, int nob)
+                              loff_t pos, void __user *buffer, int nob)
 {
        char            *s;
        char            *tmpstr;
@@ -790,10 +787,8 @@ static struct lnet_portal_rotors   portal_rotors[] = {
        },
 };
 
-extern int portal_rotor;
-
 static int __proc_lnet_portal_rotor(void *data, int write,
-                                   loff_t pos, void *buffer, int nob)
+                                   loff_t pos, void __user *buffer, int nob)
 {
        const int       buf_len = 128;
        char            *buf;
@@ -840,8 +835,8 @@ static int __proc_lnet_portal_rotor(void *data, int write,
        rc = -EINVAL;
        lnet_res_lock(0);
        for (i = 0; portal_rotors[i].pr_name != NULL; i++) {
-               if (cfs_strncasecmp(portal_rotors[i].pr_name, tmp,
-                                   strlen(portal_rotors[i].pr_name)) == 0) {
+               if (strncasecmp(portal_rotors[i].pr_name, tmp,
+                               strlen(portal_rotors[i].pr_name)) == 0) {
                        portal_rotor = portal_rotors[i].pr_value;
                        rc = 0;
                        break;
@@ -943,17 +938,3 @@ lnet_proc_fini(void)
        lnet_table_header = NULL;
 #endif
 }
-
-#else
-
-void
-lnet_proc_init(void)
-{
-}
-
-void
-lnet_proc_fini(void)
-{
-}
-
-#endif