Skip to contentSkip to conversation

Fix line over 80 characters warnings

PATCH In review Jamal Shareef 2 participants 4 messages Oct 15, 2019

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

cover Fix line over 80 characters warnings

This patchset addresses "line over 80 characters" warnings from checkpatch.

The patches were split mainly for ease of review, however
- Patch 1 fixes mainly function calls exceeding the 80 character limit
- Patch 2 fixes block comments and variables over the limit

Jamal Shareef (2):
staging: sm750fb: Fix lines over 80 characters
staging: sm750fb: Fix comments and assignments over 80 chars

 drivers/staging/sm750fb/ddk750_display.c |  4 +-
 drivers/staging/sm750fb/ddk750_mode.c    |  5 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 28 ++++++----
 drivers/staging/sm750fb/ddk750_sii164.h  | 11 ++--
 drivers/staging/sm750fb/sm750.c          | 22 +++++---
 drivers/staging/sm750fb/sm750_accel.c    | 69 ++++++++++++++++++------
 drivers/staging/sm750fb/sm750_accel.h    | 51 ++++++++++++++----
 7 files changed, 139 insertions(+), 51 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 staging: sm750fb: Fix lines over 80 characters

Fix lines over 80 character warnings. Issue found
by checkpatch.

---
 drivers/staging/sm750fb/ddk750_display.c |  4 ++--
 drivers/staging/sm750fb/ddk750_mode.c    |  5 +++--
 drivers/staging/sm750fb/ddk750_sii164.c  | 28 ++++++++++++++++--------
 drivers/staging/sm750fb/ddk750_sii164.h  | 11 ++++++----
 4 files changed, 31 insertions(+), 17 deletions(-)
drivers/staging/sm750fb/ddk750_display.c +2 -2
index 887ea8aef43f..172624ff98b0 100644
@@ -147,8 +147,8 @@ void ddk750_set_logical_disp_out(enum disp_output output)
 
 	if (output & PNL_SEQ_USAGE) {
 		/* set  panel sequence */
-		sw_panel_power_sequence((output & PNL_SEQ_MASK) >> PNL_SEQ_OFFSET,
-		4);
+		sw_panel_power_sequence((output & PNL_SEQ_MASK) >>
+					PNL_SEQ_OFFSET, 4);
 	}
 
 	if (output & DAC_USAGE)
drivers/staging/sm750fb/ddk750_mode.c +3 -2
index e0230f4ffc8b..e00a6cb31947 100644
@@ -13,8 +13,9 @@
  * HW only supports 7 predefined pixel clocks, and clock select is
  * in bit 29:27 of Display Control register.
  */
-static unsigned long displayControlAdjust_SM750LE(struct mode_parameter *pModeParam,
-						  unsigned long dispControl)
+static unsigned long
+displayControlAdjust_SM750LE(struct mode_parameter *pModeParam,
+			     unsigned long dispControl)
 {
 	unsigned long x, y;
 
drivers/staging/sm750fb/ddk750_sii164.c +19 -9
index c8e856c13912..bee58edc84e7 100644
@@ -39,8 +39,10 @@ unsigned short sii164GetVendorID(void)
 {
 	unsigned short vendorID;
 
-	vendorID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS, SII164_VENDOR_ID_HIGH) << 8) |
-		    (unsigned short)i2cReadReg(SII164_I2C_ADDRESS, SII164_VENDOR_ID_LOW);
+	vendorID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
+					       SII164_VENDOR_ID_HIGH) << 8) |
+		   (unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
+					      SII164_VENDOR_ID_LOW);
 
 	return vendorID;
 }
@@ -56,13 +58,18 @@ unsigned short sii164GetDeviceID(void)
 {
 	unsigned short deviceID;
 
-	deviceID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS, SII164_DEVICE_ID_HIGH) << 8) |
-		    (unsigned short)i2cReadReg(SII164_I2C_ADDRESS, SII164_DEVICE_ID_LOW);
+	deviceID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
+					       SII164_DEVICE_ID_HIGH) << 8) |
+		   (unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
+					      SII164_DEVICE_ID_LOW);
 
 	return deviceID;
 }
 
-/* DVI.C will handle all SiI164 chip stuffs and try it best to make code minimal and useful */
+/*
+ *  DVI.C will handle all SiI164 chip stuffs and try its best to make code
+ *  minimal and useful
+ */
 
 /*
  *  sii164InitChip
@@ -133,7 +140,8 @@ long sii164InitChip(unsigned char edge_select,
 #endif
 
 	/* Check if SII164 Chip exists */
-	if ((sii164GetVendorID() == SII164_VENDOR_ID) && (sii164GetDeviceID() == SII164_DEVICE_ID)) {
+	if ((sii164GetVendorID() == SII164_VENDOR_ID) &&
+			(sii164GetDeviceID() == SII164_DEVICE_ID)) {
 		/*
 		 *  Initialize SII164 controller chip.
 		 */
@@ -254,7 +262,9 @@ void sii164ResetChip(void)
 
 /*
  * sii164GetChipString
- *      This function returns a char string name of the current DVI Controller chip.
+ *      This function returns a char string name of the current DVI Controller
+ *      chip.
+ *
  *      It's convenient for application need to display the chip name.
  */
 char *sii164GetChipString(void)
@@ -330,8 +340,8 @@ void sii164EnableHotPlugDetection(unsigned char enableHotPlug)
 
 	detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
 
-	/* Depending on each DVI controller, need to enable the hot plug based on each
-	 * individual chip design.
+	/* Depending on each DVI controller, need to enable the hot plug based
+	 * on each individual chip design.
 	 */
 	if (enableHotPlug != 0)
 		sii164SelectHotPlugDetectionMode(SII164_HOTPLUG_USE_MDI);
drivers/staging/sm750fb/ddk750_sii164.h +7 -4
index 862e7bf27353..d940cb729066 100644
@@ -6,10 +6,13 @@
 
 /* Hot Plug detection mode structure */
 enum sii164_hot_plug_mode {
-	SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-	SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-	SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-	SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0,	/* Disable Hot Plug output bit
+					 * (always high).
+					 */
+
+	SII164_HOTPLUG_USE_MDI,         /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,        /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG        /* Use Hot Plug detect bit. */
 };
 
 /* Silicon Image SiI164 chip prototype */
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 staging: sm750fb: Fix comments and assignments over 80 chars

In reply to Jamal Shareef

Fixes block comments and variable assignments
that were over 80 characters in length. Issue
found by checkpatch.

Fix typo "mean" to "means". Add comment for
ROP value in sm750_accel.h as it is in
sm750_accel.c file.

---
 drivers/staging/sm750fb/sm750.c       | 22 +++++----
 drivers/staging/sm750fb/sm750_accel.c | 69 ++++++++++++++++++++-------
 drivers/staging/sm750fb/sm750_accel.h | 51 ++++++++++++++++----
 3 files changed, 108 insertions(+), 34 deletions(-)
drivers/staging/sm750fb/sm750.c +14 -8
index 59568d18ce23..7eb3f7b0a86b 100644
@@ -133,13 +133,15 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
 		/* get the 16bit color of kernel means */
 		u16 fg, bg;
 
-		fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
-		     ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
-		     ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
+		fg =
+		((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
+		((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
+		((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
 
-		bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) |
-		     ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) |
-		     ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11);
+		bg =
+		((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) |
+		((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) |
+		((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11);
 
 		sm750_hw_cursor_setColor(cursor, fg, bg);
 	}
@@ -695,7 +697,9 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
 		} else {
 			output->paths = sm750_crt;
 			crtc->channel = sm750_secondary;
-			/* not consider of padding stuffs for oScreen,need fix */
+			/* not consider of padding stuffs for oScreen,
+			 * need fix
+			 */
 			crtc->oScreen = sm750_dev->vidmem_size >> 1;
 			crtc->vScreen = sm750_dev->pvMem + crtc->oScreen;
 		}
@@ -709,7 +713,9 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
 		} else {
 			output->paths = sm750_crt;
 			crtc->channel = sm750_primary;
-			/* not consider of padding stuffs for oScreen,need fix */
+			/* not consider of padding stuffs for oScreen,
+			 * need fix
+			 */
 			crtc->oScreen = sm750_dev->vidmem_size >> 1;
 			crtc->vScreen = sm750_dev->pvMem + crtc->oScreen;
 		}
drivers/staging/sm750fb/sm750_accel.c +53 -16

91 lines not on this page · raw message

drivers/staging/sm750fb/sm750_accel.h +41 -10

58 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer
#3 lore raw

Re: [Outreachy kernel] [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars

Quoted 20 lines · Jamal Shareef

Fixes block comments and variable assignments
that were over 80 characters in length. Issue
found by checkpatch.

Fix typo "mean" to "means". Add comment for
ROP value in sm750_accel.h as it is in
sm750_accel.c file.

---
 drivers/staging/sm750fb/sm750.c       | 22 +++++----
 drivers/staging/sm750fb/sm750_accel.c | 69 ++++++++++++++++++++-------
 drivers/staging/sm750fb/sm750_accel.h | 51 ++++++++++++++++----
 3 files changed, 108 insertions(+), 34 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -0
index 59568d18ce23..7eb3f7b0a86b 100644

drivers/staging/sm750fb/sm750.c static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) · line 139

Quoted 10 lines
drivers/staging/sm750fb/sm750.c +4 -3
@@ -133,13 +133,15 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
 		/* get the 16bit color of kernel means */
 		u16 fg, bg;
 
-		fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
-		     ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
-		     ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
+		fg =
+		((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
+		((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
+		((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);

No, never indent this far to the left for these lines. You just made this code harder to understand, the original is fine.

thanks,

greg k-h