From: Oleg Drokin Date: Tue, 16 Feb 2016 05:47:13 +0000 (-0500) Subject: staging/lustre/libcfs: Get rid of multiple assignments X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=34ec7f895a0813831a568dd8b83f1adcee1a00a4;p=openwrt%2Fstaging%2Fblogic.git staging/lustre/libcfs: Get rid of multiple assignments They make checkpatch unhappy, and I guess overall might confuse people too. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c b/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c index 7396d664eb96..c5a6951516ed 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c @@ -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); diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c index 4a2c83b7f2c7..09ab0e497a23 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c @@ -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);