staging/lustre/libcfs: Get rid of multiple assignments
authorOleg Drokin <green@linuxhacker.ru>
Tue, 16 Feb 2016 05:47:13 +0000 (00:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:33:11 +0000 (14:33 -0800)
They make checkpatch unhappy, and I guess overall might confuse
people too.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/libcfs_mem.c
drivers/staging/lustre/lustre/libcfs/libcfs_string.c

index 7396d66..c5a6951 100644 (file)
@@ -82,9 +82,10 @@ cfs_percpt_alloc(struct cfs_cpt_table *cptab, unsigned int size)
        if (!arr)
                return NULL;
 
-       arr->va_size    = size = L1_CACHE_ALIGN(size);
-       arr->va_count   = count;
-       arr->va_cptab   = cptab;
+       size = L1_CACHE_ALIGN(size);
+       arr->va_size = size;
+       arr->va_count = count;
+       arr->va_cptab = cptab;
 
        for (i = 0; i < count; i++) {
                LIBCFS_CPT_ALLOC(arr->va_ptrs[i], cptab, i, size);
index 4a2c83b..09ab0e4 100644 (file)
@@ -337,8 +337,10 @@ cfs_range_expr_print(char *buffer, int count, struct cfs_range_expr *expr,
        char s[] = "[";
        char e[] = "]";
 
-       if (bracketed)
-               s[0] = e[0] = '\0';
+       if (bracketed) {
+               s[0] = '\0';
+               e[0] = '\0';
+       }
 
        if (expr->re_lo == expr->re_hi)
                i = scnprintf(buffer, count, "%u", expr->re_lo);