提交 964308a6 编写于 作者: H Haneen Mohammed 提交者: Greg Kroah-Hartman

Staging: ft1000: Remove parentheses around right side an assignment

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: NHaneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8126e17f
...@@ -276,8 +276,8 @@ u16 hdr_checksum(struct pseudo_hdr *pHdr) ...@@ -276,8 +276,8 @@ u16 hdr_checksum(struct pseudo_hdr *pHdr)
u16 *usPtr = (u16 *)pHdr; u16 *usPtr = (u16 *)pHdr;
u16 chksum; u16 chksum;
chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^ chksum = (((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
usPtr[4]) ^ usPtr[5]) ^ usPtr[6]); usPtr[4]) ^ usPtr[5]) ^ usPtr[6];
return chksum; return chksum;
} }
......
...@@ -1295,9 +1295,9 @@ static int ft1000_parse_dpram_msg(struct net_device *dev) ...@@ -1295,9 +1295,9 @@ static int ft1000_parse_dpram_msg(struct net_device *dev)
2) >> 8) & 0xff; 2) >> 8) & 0xff;
} else { } else {
portid = portid =
(ft1000_read_dpram_mag_16 ft1000_read_dpram_mag_16
(dev, FT1000_MAG_PORT_ID, (dev, FT1000_MAG_PORT_ID,
FT1000_MAG_PORT_ID_INDX) & 0xff); FT1000_MAG_PORT_ID_INDX) & 0xff;
} }
pr_debug("DSP_QID = 0x%x\n", portid); pr_debug("DSP_QID = 0x%x\n", portid);
......
...@@ -301,7 +301,7 @@ static int ft1000_open(struct inode *inode, struct file *file) ...@@ -301,7 +301,7 @@ static int ft1000_open(struct inode *inode, struct file *file)
struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private;
int i, num; int i, num;
num = (MINOR(inode->i_rdev) & 0xf); num = MINOR(inode->i_rdev) & 0xf;
pr_debug("minor number=%d\n", num); pr_debug("minor number=%d\n", num);
info = file->private_data = netdev_priv(dev->net); info = file->private_data = netdev_priv(dev->net);
......
...@@ -368,8 +368,8 @@ static u16 hdr_checksum(struct pseudo_hdr *pHdr) ...@@ -368,8 +368,8 @@ static u16 hdr_checksum(struct pseudo_hdr *pHdr)
u16 chksum; u16 chksum;
chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^ chksum = (((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
usPtr[4]) ^ usPtr[5]) ^ usPtr[6]); usPtr[4]) ^ usPtr[5]) ^ usPtr[6];
return chksum; return chksum;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册