diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2015-03-04 07:33:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-06 15:22:42 -0800 |
commit | 9eb9e69536ba00d2dbe4f481b20ced67053a6c08 (patch) | |
tree | 82337373a7b673f1b6876e6b09f09282c6a23e5c /drivers/staging/rtl8192u/r8192U_core.c | |
parent | 0c401c1dc9739580d758dfa88ec568897c2e2dfd (diff) | |
download | linux-9eb9e69536ba00d2dbe4f481b20ced67053a6c08.tar.bz2 |
staging: rtl8192u: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The cases handled are when the resultant value is assigned to
a variable or when a shift operation is carried out for a function
argument. The issues were detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Some coding style issues were handled manually to avoid
checkpatch warnings and errors.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 9de4412da3b3..bab7751a7636 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2310,11 +2310,11 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) } if (bLoad_From_EEPOM) { - tmpValue = eprom_read(dev, (EEPROM_VID>>1)); + tmpValue = eprom_read(dev, EEPROM_VID>>1); priv->eeprom_vid = endian_swap(&tmpValue); - priv->eeprom_pid = eprom_read(dev, (EEPROM_PID>>1)); - tmpValue = eprom_read(dev, (EEPROM_ChannelPlan>>1)); - priv->eeprom_ChannelPlan = ((tmpValue&0xff00)>>8); + priv->eeprom_pid = eprom_read(dev, EEPROM_PID>>1); + tmpValue = eprom_read(dev, EEPROM_ChannelPlan>>1); + priv->eeprom_ChannelPlan = (tmpValue & 0xff00)>>8; priv->btxpowerdata_readfromEEPORM = true; priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >>8; } else { @@ -2397,7 +2397,8 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) } } else if (priv->EEPROM_Def_Ver == 1) { if (bLoad_From_EEPOM) { - tmpValue = eprom_read(dev, (EEPROM_TxPwIndex_CCK_V1>>1)); + tmpValue = eprom_read(dev, + EEPROM_TxPwIndex_CCK_V1 >> 1); tmpValue = (tmpValue & 0xff00) >> 8; } else { tmpValue = 0x10; @@ -2410,7 +2411,8 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) tmpValue = 0x1010; *((u16 *)(&priv->EEPROMTxPowerLevelCCK_V1[1])) = tmpValue; if (bLoad_From_EEPOM) - tmpValue = eprom_read(dev, (EEPROM_TxPwIndex_OFDM_24G_V1>>1)); + tmpValue = eprom_read(dev, + EEPROM_TxPwIndex_OFDM_24G_V1 >> 1); else tmpValue = 0x1010; *((u16 *)(&priv->EEPROMTxPowerLevelOFDM24G[0])) = tmpValue; @@ -2453,7 +2455,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) // Antenna B gain offset to antenna A, bit0~3 priv->AntennaTxPwDiff[0] = (priv->EEPROMTxPowerDiff & 0xf); // Antenna C gain offset to antenna A, bit4~7 - priv->AntennaTxPwDiff[1] = ((priv->EEPROMTxPowerDiff & 0xf0)>>4); + priv->AntennaTxPwDiff[1] = (priv->EEPROMTxPowerDiff & 0xf0)>>4; // CrystalCap, bit12~15 priv->CrystalCap = priv->EEPROMCrystalCap; // ThermalMeter, bit0~3 for RFIC1, bit4~7 for RFIC2 |