Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:
@rule1@
identifier x, y, z;
expression E1, E2;
@@
(
x = (y == z);
|
x = (E1 == E2);
|
x =
-(
...
-)
;
)
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK;
} else {
/* immediate ack & 64 buffer size */
- BA_para_set = (0x1002 | ((status & 0xf) << 2));
+ BA_para_set = 0x1002 | ((status & 0xf) << 2);
}
put_unaligned_le16(BA_para_set,
if (!pcmd_obj)
return;
- cmdsz = (sizeof(struct survey_event) + sizeof(struct C2HEvent_Header));
+ cmdsz = sizeof(struct survey_event) + sizeof(struct C2HEvent_Header);
pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
if (!pevtcmd) {
kfree(pcmd_obj);
if (!pcmd_obj)
return;
- cmdsz = (sizeof(struct surveydone_event) + sizeof(struct C2HEvent_Header));
+ cmdsz = sizeof(struct surveydone_event) + sizeof(struct C2HEvent_Header);
pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
if (!pevtcmd) {
kfree(pcmd_obj);
if (!pcmd_obj)
return;
- cmdsz = (sizeof(struct joinbss_event) + sizeof(struct C2HEvent_Header));
+ cmdsz = sizeof(struct joinbss_event) + sizeof(struct C2HEvent_Header);
pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
if (!pevtcmd) {
kfree(pcmd_obj);
if (!pcmd_obj)
return;
- cmdsz = (sizeof(struct stadel_event) + sizeof(struct C2HEvent_Header));
+ cmdsz = sizeof(struct stadel_event) + sizeof(struct C2HEvent_Header);
pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
if (!pevtcmd) {
kfree(pcmd_obj);
if (psta)
mac_id = (int)psta->mac_id;
else
- mac_id = (-1);
+ mac_id = -1;
pdel_sta_evt->mac_id = mac_id;
if (!pcmd_obj)
return;
- cmdsz = (sizeof(struct stassoc_event) + sizeof(struct C2HEvent_Header));
+ cmdsz = sizeof(struct stassoc_event) + sizeof(struct C2HEvent_Header);
pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
if (!pevtcmd) {
kfree(pcmd_obj);
/* 0~3 for default key, cmd_id = macid + 3,
macid = aid+1; */
- cam_id = (psta->mac_id + 3);
+ cam_id = psta->mac_id + 3;
DBG_8723A("Write CAM, mac_addr =%x:%x:%x:%x:%x:%x, "
"cam_entry =%d\n", pparm->addr[0],
/* update value of signal_strength, rssi, signal_qual */
if (!check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY)) {
- tmp_s = (avg_signal_strength + (_alpha - 1) *
- recvpriv->signal_strength);
+ tmp_s = avg_signal_strength + (_alpha - 1) *
+ recvpriv->signal_strength;
if (tmp_s %_alpha)
tmp_s = tmp_s / _alpha + 1;
else
pBtDbg->dbgHciInfo.hciCmdCntDisconnectPhyLink++;
PLH = *((u8 *)pHciCmd->Data);
- PhysLinkDisconnectReason = (*((u8 *)pHciCmd->Data+1));
+ PhysLinkDisconnectReason = *((u8 *)pHciCmd->Data+1);
RTPRINT(FIOCTL, IOCTL_BT_HCICMD, ("HCI_DISCONNECT_PHYSICAL_LINK PhyHandle = 0x%x, Reason = 0x%x\n",
PLH, PhysLinkDisconnectReason));
continue;
offset |= ((efuseExtHdr & 0xF0) >> 1);
- wden = (efuseExtHdr & 0x0F);
+ wden = efuseExtHdr & 0x0F;
} else {
- offset = ((efuseHeader >> 4) & 0x0f);
- wden = (efuseHeader & 0x0f);
+ offset = (efuseHeader >> 4) & 0x0f;
+ wden = efuseHeader & 0x0f;
}
if (offset < EFUSE_MAX_SECTION_8723A) {
continue;
offset |= ((efuseExtHdr & 0xF0) >> 1);
- wden = (efuseExtHdr & 0x0F);
+ wden = efuseExtHdr & 0x0F;
} else {
- offset = ((efuseHeader >> 4) & 0x0f);
- wden = (efuseHeader & 0x0f);
+ offset = (efuseHeader >> 4) & 0x0f;
+ wden = efuseHeader & 0x0f;
}
if (offset < EFUSE_BT_MAX_SECTION) {
if (BitMask != bMaskDWord) {/* if not "double word" write */
OriginalValue = rtl8723au_read32(Adapter, RegAddr);
BitShift = phy_CalculateBitShift(BitMask);
- Data = ((OriginalValue & (~BitMask)) | (Data << BitShift));
+ Data = (OriginalValue & (~BitMask)) | (Data << BitShift);
}
rtl8723au_write32(Adapter, RegAddr, Data);
if (BitMask != bRFRegOffsetMask) {
Original_Value = phy_RFSerialRead(Adapter, eRFPath, RegAddr);
BitShift = phy_CalculateBitShift(BitMask);
- Data = ((Original_Value & (~BitMask)) | (Data << BitShift));
+ Data = (Original_Value & (~BitMask)) | (Data << BitShift);
}
phy_RFSerialWrite(Adapter, eRFPath, RegAddr, Data);
break;
case 2: /* Better regulatory */
/* don't increase any power diff */
- writeVal = ((index < 2) ? powerBase0[rf] :
- powerBase1[rf]);
+ writeVal = (index < 2) ? powerBase0[rf] :
+ powerBase1[rf];
break;
case 3: /* Customer defined power diff. */
chnlGroup = 0;
bool matchbssid = false;
u8 *bssid;
- matchbssid = (!ieee80211_is_ctl(hdr->frame_control) &&
- !pattrib->icv_err && !pattrib->crc_err);
+ matchbssid = !ieee80211_is_ctl(hdr->frame_control) &&
+ !pattrib->icv_err && !pattrib->crc_err;
if (matchbssid) {
switch (hdr->frame_control &
rtl8723a_InitHalDm(Adapter);
- val8 = ((WiFiNavUpperUs + HAL_8723A_NAV_UPPER_UNIT - 1) /
- HAL_8723A_NAV_UPPER_UNIT);
+ val8 = (WiFiNavUpperUs + HAL_8723A_NAV_UPPER_UNIT - 1) /
+ HAL_8723A_NAV_UPPER_UNIT;
rtl8723au_write8(Adapter, REG_NAV_UPPER, val8);
/* 2011/03/09 MH debug only, UMC-B cut pass 2500 S5 test, but we need to fin root cause. */