diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2015-03-04 07:30:49 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-06 15:22:42 -0800 |
commit | 11d6e5c5623a1cdbee1560f4957c070b0ea76b22 (patch) | |
tree | 7c8e407cdb840ac9f9119a8eb31705a09d65670e /drivers/staging/media/bcm2048 | |
parent | a354e0d8d2ce4beb61097eeac6069b41c0797ed3 (diff) |
staging: media: bcm2048: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The case handled here is when the resultant value is assigned to
a variable. The issue was 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
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/bcm2048')
-rw-r--r-- | drivers/staging/media/bcm2048/radio-bcm2048.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 538250667918..116251b4e317 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2245,8 +2245,7 @@ static ssize_t bcm2048_fops_read(struct file *file, char __user *buf, tmpbuf[i] = bdev->rds_info.radio_text[bdev->rd_index+i+2]; tmpbuf[i+1] = bdev->rds_info.radio_text[bdev->rd_index+i+1]; - tmpbuf[i+2] = ((bdev->rds_info.radio_text[bdev->rd_index+i] - & 0xf0) >> 4); + tmpbuf[i+2] = (bdev->rds_info.radio_text[bdev->rd_index + i] & 0xf0) >> 4; if ((bdev->rds_info.radio_text[bdev->rd_index+i] & BCM2048_RDS_CRC_MASK) == BCM2048_RDS_CRC_UNRECOVARABLE) tmpbuf[i+2] |= 0x80; |