Whamcloud - gitweb
LU-11658 lov: cl_cache could miss initialize
[fs/lustre-release.git] / lustre / fid / lproc_fid.c
index 70224b4..11ae1b6 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,7 +23,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -67,8 +63,9 @@ static int
 lprocfs_fid_write_common(const char __user *buffer, size_t count,
                                struct lu_seq_range *range)
 {
-       struct lu_seq_range tmp = { 0, };
-       int rc;
+       struct lu_seq_range tmp = {
+               .lsr_start = 0,
+       };
        char kernbuf[MAX_FID_RANGE_STRLEN];
        ENTRY;
 
@@ -88,9 +85,9 @@ lprocfs_fid_write_common(const char __user *buffer, size_t count,
        }
 
        /* of the form "[0x0000000240000400 - 0x000000028000400]" */
-       rc = sscanf(kernbuf, "[%llx - %llx]\n",
-                   (long long unsigned *)&tmp.lsr_start,
-                   (long long unsigned *)&tmp.lsr_end);
+       sscanf(kernbuf, "[%llx - %llx]\n",
+              (long long unsigned *)&tmp.lsr_start,
+              (long long unsigned *)&tmp.lsr_end);
        if (!lu_seq_range_is_sane(&tmp) || lu_seq_range_is_zero(&tmp) ||
            tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end)
                RETURN(-EINVAL);