Skip to contentSkip to conversation

cleanup fbtft/fb_ssd1351.c

PATCH New Gargi Sharma 1 participant 3 messages Sep 15, 2016

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

cover cleanup fbtft/fb_ssd1351.c

This patchset fixes two checkpatch issues.

Patch 1 fixes the checkpatch issue, logical continuations should be in previous line.

Patch 2 fixes the checkpatch issue, spaces are preferred around '<<'.

Gargi Sharma (2):
staging: fbtft: move && operator for logical continuation
staging: fbtft: add spaces around <<

 drivers/staging/fbtft/fb_ssd1351.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.9.2
#1 lore raw

PATCH 1/2 staging: fbtft: move && operator for logical continuation

Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line.

---
 drivers/staging/fbtft/fb_ssd1351.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_ssd1351.c +4 -4
index 8267bbbc..ab1a31d 100644
@@ -25,8 +25,8 @@ static void register_onboard_backlight(struct fbtft_par *par);
 
 static int init_display(struct fbtft_par *par)
 {
-	if (par->pdata
-		&& par->pdata->display.backlight == FBTFT_ONBOARD_BACKLIGHT) {
+	if (par->pdata &&
+	    par->pdata->display.backlight == FBTFT_ONBOARD_BACKLIGHT) {
 		/* module uses onboard GPIO for panel power */
 		par->fbtftops.register_backlight = register_onboard_backlight;
 	}
@@ -189,8 +189,8 @@ static int update_onboard_backlight(struct backlight_device *bd)
 		"%s: power=%d, fb_blank=%d\n",
 		__func__, bd->props.power, bd->props.fb_blank);
 
-	on = (bd->props.power == FB_BLANK_UNBLANK)
-		&& (bd->props.fb_blank == FB_BLANK_UNBLANK);
+	on = (bd->props.power == FB_BLANK_UNBLANK) &&
+	     (bd->props.fb_blank == FB_BLANK_UNBLANK);
 	/* Onboard backlight connected to GPIO0 on SSD1351, GPIO1 unused */
 	write_reg(par, 0xB5, on ? 0x03 : 0x02);
 
Signature · 1 line
2.9.2
#2 lore raw

PATCH 2/2 staging: fbtft: add spaces around <<

In reply to Gargi Sharma

add spaces around << to fix the checkpatch issue, spaces preferred around that '<<'.

---
 drivers/staging/fbtft/fb_ssd1351.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fbtft/fb_ssd1351.c +2 -2
index ab1a31d..200aa9b 100644
@@ -80,10 +80,10 @@ static int set_var(struct fbtft_par *par)
 
 	switch (par->info->var.rotate) {
 	case 0:
-		write_reg(par, 0xA0, remap | 0x00 | 1<<4);
+		write_reg(par, 0xA0, remap | 0x00 | 1 << 4);
 		break;
 	case 270:
-		write_reg(par, 0xA0, remap | 0x03 | 1<<4);
+		write_reg(par, 0xA0, remap | 0x03 | 1 << 4);
 		break;
 	case 180:
 		write_reg(par, 0xA0, remap | 0x02);
Signature · 1 line
2.9.2