diff options
author | Jiayi Ye <yejiayily@gmail.com> | 2014-10-25 10:58:28 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-27 10:33:06 +0800 |
commit | 1d06bb4e9df30162d8690a26792611a141676279 (patch) | |
tree | 95b2d79fa25de4ceaac0af530173241450a35852 /drivers/staging/lustre | |
parent | 3e3f878f4d38c0724e51e192f232e1726daffd89 (diff) | |
download | op-kernel-dev-1d06bb4e9df30162d8690a26792611a141676279.zip op-kernel-dev-1d06bb4e9df30162d8690a26792611a141676279.tar.gz |
staging: remove unneeded parentheses around the right hand side of an assignment
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.
@r@
identifier x;
expression e1, e2;
@@
- x = (e1 << e2);
+ x = e1 << e2;
Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/debug.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/rw.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 8f5cdd5..045f2be 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -2411,7 +2411,7 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev) goto out; } - mr_size = (1ULL << hdev->ibh_mr_shift); + mr_size = 1ULL << hdev->ibh_mr_shift; mm_size = (unsigned long)high_memory - PAGE_OFFSET; hdev->ibh_nmrs = (int)((mm_size + mr_size - 1) >> hdev->ibh_mr_shift); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index 6054eee..3822e0f 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -265,7 +265,7 @@ static void ldlm_pool_recalc_slv(struct ldlm_pool *pl) * SLV. And the opposite, the more grant plan is over-consumed * (load time) the faster drops SLV. */ - slv_factor = (grant_usage << LDLM_POOL_SLV_SHIFT); + slv_factor = grant_usage << LDLM_POOL_SLV_SHIFT; do_div(slv_factor, limit); slv = slv * slv_factor; slv = dru(slv, LDLM_POOL_SLV_SHIFT, round_up); diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index ba43b30..2c15a9e 100644 --- a/drivers/staging/lustre/lustre/libcfs/debug.c +++ b/drivers/staging/lustre/lustre/libcfs/debug.c @@ -412,7 +412,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 = max << (20 - PAGE_CACHE_SHIFT); } rc = cfs_tracefile_init(max); diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c index 1f53b98..613d772 100644 --- a/drivers/staging/lustre/lustre/llite/rw.c +++ b/drivers/staging/lustre/lustre/llite/rw.c @@ -145,7 +145,7 @@ static struct ll_cl_context *ll_cl_init(struct file *file, */ io->ci_lockreq = CILR_NEVER; - pos = (vmpage->index << PAGE_CACHE_SHIFT); + pos = vmpage->index << PAGE_CACHE_SHIFT; /* Create a temp IO to serve write. */ result = cl_io_rw_init(env, io, CIT_WRITE, pos, PAGE_CACHE_SIZE); |