Commit 1d06bb4e authored by Jiayi Ye's avatar Jiayi Ye Committed by Greg Kroah-Hartman

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: default avatarJiayi Ye <yejiayily@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e3f878f
...@@ -2411,7 +2411,7 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev) ...@@ -2411,7 +2411,7 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)
goto out; goto out;
} }
mr_size = (1ULL << hdev->ibh_mr_shift); mr_size = 1ULL << hdev->ibh_mr_shift;
mm_size = (unsigned long)high_memory - PAGE_OFFSET; mm_size = (unsigned long)high_memory - PAGE_OFFSET;
hdev->ibh_nmrs = (int)((mm_size + mr_size - 1) >> hdev->ibh_mr_shift); hdev->ibh_nmrs = (int)((mm_size + mr_size - 1) >> hdev->ibh_mr_shift);
......
...@@ -265,7 +265,7 @@ static void ldlm_pool_recalc_slv(struct ldlm_pool *pl) ...@@ -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 * SLV. And the opposite, the more grant plan is over-consumed
* (load time) the faster drops SLV. * (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); do_div(slv_factor, limit);
slv = slv * slv_factor; slv = slv * slv_factor;
slv = dru(slv, LDLM_POOL_SLV_SHIFT, round_up); slv = dru(slv, LDLM_POOL_SLV_SHIFT, round_up);
......
...@@ -412,7 +412,7 @@ int libcfs_debug_init(unsigned long bufsize) ...@@ -412,7 +412,7 @@ int libcfs_debug_init(unsigned long bufsize)
max = TCD_MAX_PAGES; max = TCD_MAX_PAGES;
} else { } else {
max = (max / num_possible_cpus()); max = (max / num_possible_cpus());
max = (max << (20 - PAGE_CACHE_SHIFT)); max = max << (20 - PAGE_CACHE_SHIFT);
} }
rc = cfs_tracefile_init(max); rc = cfs_tracefile_init(max);
......
...@@ -145,7 +145,7 @@ static struct ll_cl_context *ll_cl_init(struct file *file, ...@@ -145,7 +145,7 @@ static struct ll_cl_context *ll_cl_init(struct file *file,
*/ */
io->ci_lockreq = CILR_NEVER; io->ci_lockreq = CILR_NEVER;
pos = (vmpage->index << PAGE_CACHE_SHIFT); pos = vmpage->index << PAGE_CACHE_SHIFT;
/* Create a temp IO to serve write. */ /* Create a temp IO to serve write. */
result = cl_io_rw_init(env, io, CIT_WRITE, pos, PAGE_CACHE_SIZE); result = cl_io_rw_init(env, io, CIT_WRITE, pos, PAGE_CACHE_SIZE);
......
...@@ -633,7 +633,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width, ...@@ -633,7 +633,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width,
if (!(val % 2)) { if (!(val % 2)) {
h1 = val; h1 = val;
} else { } else {
val = (input_width << 7); val = input_width << 7;
val -= rsz >> 1; val -= rsz >> 1;
val /= rsz << 1; val /= rsz << 1;
val <<= 1; val <<= 1;
......
...@@ -326,7 +326,7 @@ static int omap24xxcam_vbq_alloc_mmap_buffer(struct videobuf_buffer *vb) ...@@ -326,7 +326,7 @@ static int omap24xxcam_vbq_alloc_mmap_buffer(struct videobuf_buffer *vb)
dma->sglen++; dma->sglen++;
i++; i++;
alloc_size = (PAGE_SIZE << order); alloc_size = PAGE_SIZE << order;
/* clear pages before giving them to user space */ /* clear pages before giving them to user space */
memset(page_address(page), 0, alloc_size); memset(page_address(page), 0, alloc_size);
......
...@@ -2032,11 +2032,11 @@ static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex) ...@@ -2032,11 +2032,11 @@ static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex)
break; break;
case USB_PORT_FEAT_C_CONNECTION: case USB_PORT_FEAT_C_CONNECTION:
oz_dbg(HUB, "USB_PORT_FEAT_C_CONNECTION\n"); oz_dbg(HUB, "USB_PORT_FEAT_C_CONNECTION\n");
clear_bits = (USB_PORT_STAT_C_CONNECTION << 16); clear_bits = USB_PORT_STAT_C_CONNECTION << 16;
break; break;
case USB_PORT_FEAT_C_ENABLE: case USB_PORT_FEAT_C_ENABLE:
oz_dbg(HUB, "USB_PORT_FEAT_C_ENABLE\n"); oz_dbg(HUB, "USB_PORT_FEAT_C_ENABLE\n");
clear_bits = (USB_PORT_STAT_C_ENABLE << 16); clear_bits = USB_PORT_STAT_C_ENABLE << 16;
break; break;
case USB_PORT_FEAT_C_SUSPEND: case USB_PORT_FEAT_C_SUSPEND:
oz_dbg(HUB, "USB_PORT_FEAT_C_SUSPEND\n"); oz_dbg(HUB, "USB_PORT_FEAT_C_SUSPEND\n");
...@@ -2046,7 +2046,7 @@ static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex) ...@@ -2046,7 +2046,7 @@ static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex)
break; break;
case USB_PORT_FEAT_C_RESET: case USB_PORT_FEAT_C_RESET:
oz_dbg(HUB, "USB_PORT_FEAT_C_RESET\n"); oz_dbg(HUB, "USB_PORT_FEAT_C_RESET\n");
clear_bits = (USB_PORT_FEAT_C_RESET << 16); clear_bits = USB_PORT_FEAT_C_RESET << 16;
break; break;
case USB_PORT_FEAT_TEST: case USB_PORT_FEAT_TEST:
oz_dbg(HUB, "USB_PORT_FEAT_TEST\n"); oz_dbg(HUB, "USB_PORT_FEAT_TEST\n");
......
...@@ -1673,7 +1673,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) ...@@ -1673,7 +1673,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
pRegToSet = RegToSet_Normal; /* 0xb972a841; */ pRegToSet = RegToSet_Normal; /* 0xb972a841; */
FactorToSet = *((u8 *)val); FactorToSet = *((u8 *)val);
if (FactorToSet <= 3) { if (FactorToSet <= 3) {
FactorToSet = (1<<(FactorToSet + 2)); FactorToSet = 1 << (FactorToSet + 2);
if (FactorToSet > 0xf) if (FactorToSet > 0xf)
FactorToSet = 0xf; FactorToSet = 0xf;
......
...@@ -463,7 +463,7 @@ void rtl8723a_set_ampdu_factor(struct rtw_adapter *padapter, u8 FactorToSet) ...@@ -463,7 +463,7 @@ void rtl8723a_set_ampdu_factor(struct rtw_adapter *padapter, u8 FactorToSet)
MaxAggNum = 0xF; MaxAggNum = 0xF;
if (FactorToSet <= 3) { if (FactorToSet <= 3) {
FactorToSet = (1 << (FactorToSet + 2)); FactorToSet = 1 << (FactorToSet + 2);
if (FactorToSet > MaxAggNum) if (FactorToSet > MaxAggNum)
FactorToSet = MaxAggNum; FactorToSet = MaxAggNum;
......
...@@ -358,7 +358,7 @@ device_receive_frame( ...@@ -358,7 +358,7 @@ device_receive_frame(
if ((*pbyRsr & RSR_CRCOK) != 0) if ((*pbyRsr & RSR_CRCOK) != 0)
pDevice->byBasicMap |= 0x01; pDevice->byBasicMap |= 0x01;
dwDuration = (FrameSize << 4); dwDuration = FrameSize << 4;
dwDuration /= acbyRxRate[*pbyRxRate%MAX_RATE]; dwDuration /= acbyRxRate[*pbyRxRate%MAX_RATE];
if (*pbyRxRate <= RATE_11M) { if (*pbyRxRate <= RATE_11M) {
if (*pbyRxSts & 0x01) { if (*pbyRxSts & 0x01) {
......
...@@ -4135,7 +4135,7 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, ...@@ -4135,7 +4135,7 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex,
tempax -= 1; tempax -= 1;
temp = (tempax & 0xFF00) >> 8; temp = (tempax & 0xFF00) >> 8;
temp = ((temp & 0x0003) << 4); temp = (temp & 0x0003) << 4;
xgifb_reg_set(pVBInfo->Part4Port, 0x1E, temp); xgifb_reg_set(pVBInfo->Part4Port, 0x1E, temp);
temp = (tempax & 0x00FF); temp = (tempax & 0x00FF);
xgifb_reg_set(pVBInfo->Part4Port, 0x1D, temp); xgifb_reg_set(pVBInfo->Part4Port, 0x1D, temp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment