Skip to contentSkip to conversation

Staging: media/bcm2048: Fix line over 80 characters warning as detected by checkpatch.pl

PATCH In review Shah, Yash (Y.) 3 participants 3 messages Aug 12, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: media/bcm2048: Fix line over 80 characters warning as detected by checkpatch.pl

From: Yash Shah <[email protected]>

Fix line over 80 characters warning as detected by checkpatch.pl

---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/media/bcm2048/radio-bcm2048.c +2 -1
index 8bc68e2..d36350e 100644
@@ -2243,7 +2243,8 @@ 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;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 14 lines · Yash (Y.)

From: Yash Shah <[email protected]>

Fix line over 80 characters warning as detected by checkpatch.pl

---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/media/bcm2048/radio-bcm2048.c +0 -0
index 8bc68e2..d36350e 100644

drivers/staging/media/bcm2048/radio-bcm2048.c static ssize_t bcm2048_fops_read(struct file *file, char __user *buf, · line 2250

Quoted 9 lines
drivers/staging/media/bcm2048/radio-bcm2048.c +2 -1
@@ -2243,7 +2243,8 @@ 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;

Hi! I think that code after this change is less readable as before.

Signature · 2 lines
Pali Rohár
[email protected]
#2 lore raw
Quoted 16 lines · Pali Rohár
Quoted 15 lines · Yash (Y.)

From: Yash Shah <[email protected]>

Fix line over 80 characters warning as detected by checkpatch.pl

---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/media/bcm2048/radio-bcm2048.c +0 -0
index 8bc68e2..d36350e 100644
@@ -2243,7 +2243,8 @@ static ssize_t bcm2048_fops_read(struct file *file, char __user *buf,
 
Quoted 10 lines

drivers/staging/media/bcm2048/radio-bcm2048.c static ssize_t bcm2048_fops_read(struct file *file, char __user *buf, · line 2250

Quoted 8 lines
drivers/staging/media/bcm2048/radio-bcm2048.c +2 -1
              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;

Hi! I think that code after this change is less readable as before.

I agree. I would do something about 'bdev->rds_info.radio_text' instead and shorten all three lines.

Frans