From: Aya Mahfouz Date: Thu, 26 Feb 2015 09:45:03 +0000 (+0200) Subject: staging: lustre: libcfs: rewrite the right hand side of an assignment X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c8e4d70e001f7528be9d06739ecd28736396867;p=openwrt%2Fstaging%2Fblogic.git staging: lustre: libcfs: rewrite the right hand side of an assignment 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 --- diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index 76c62e87a415..54352368ac14 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);