staging: lustre: libcfs: rewrite the right hand side of an assignment
Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a b);
to be:
a = b;
where = << | >>.
This issue was detected and resolved using the following
coccinelle script:
@@
identifier i;
expression e;
@@
-i = (i >> e);
+i >>= e;
@@
identifier i;
expression e;
@@
-i = (i << e);
+i <<= e;
Signed-off-by: Aya Mahfouz
Signed-off-by: Greg Kroah-Hartman
---
drivers/staging/lustre/lustre/libcfs/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index 76c62e8..5435236 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -410,7 +410,7 @@ int libcfs_debug_init(unsigned long bufsize)
max = TCD_MAX_PAGES;
} else {
max = (max / num_possible_cpus());
- max = max << (20 - PAGE_CACHE_SHIFT);
+ max <<= (20 - PAGE_CACHE_SHIFT);
}
rc = cfs_tracefile_init(max); |
---
drivers/staging/lustre/lustre/libcfs/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index 76c62e8..5435236 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -410,7 +410,7 @@ int libcfs_debug_init(unsigned long bufsize)
max = TCD_MAX_PAGES;
} else {
max = (max / num_possible_cpus());
- max = max << (20 - PAGE_CACHE_SHIFT);
+ max <<= (20 - PAGE_CACHE_SHIFT);
}
rc = cfs_tracefile_init(max);