[PATCH 41/45] staging/lustre/libcfs: Get rid of multiple assignments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Oleg Drokin <green@xxxxxxxxxxxxxx>

They make checkpatch unhappy, and I guess overall might confuse
people too.

Signed-off-by: Oleg Drokin <green@xxxxxxxxxxxxxx>
---
 drivers/staging/lustre/lustre/libcfs/libcfs_mem.c    | 7 ++++---
 drivers/staging/lustre/lustre/libcfs/libcfs_string.c | 6 ++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c b/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c
index 7396d66..c5a6951 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 4a2c83b..09ab0e4 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);
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux