All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix line over 80 characters warnings
@ 2019-10-15  3:12 Jamal Shareef
  2019-10-15  3:12 ` [PATCH 1/2] staging: sm750fb: Fix lines over 80 characters Jamal Shareef
  2019-10-15  3:12 ` [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars Jamal Shareef
  0 siblings, 2 replies; 4+ messages in thread
From: Jamal Shareef @ 2019-10-15  3:12 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel,
	jamal.k.shareef

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(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] staging: sm750fb: Fix lines over 80 characters
  2019-10-15  3:12 [PATCH 0/2] Fix line over 80 characters warnings Jamal Shareef
@ 2019-10-15  3:12 ` Jamal Shareef
  2019-10-15  3:12 ` [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars Jamal Shareef
  1 sibling, 0 replies; 4+ messages in thread
From: Jamal Shareef @ 2019-10-15  3:12 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel,
	jamal.k.shareef

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

Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
---
 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(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index 887ea8aef43f..172624ff98b0 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -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)
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index e0230f4ffc8b..e00a6cb31947 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -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;
 
diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c
index c8e856c13912..bee58edc84e7 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.c
+++ b/drivers/staging/sm750fb/ddk750_sii164.c
@@ -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);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index 862e7bf27353..d940cb729066 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -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 */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars
  2019-10-15  3:12 [PATCH 0/2] Fix line over 80 characters warnings Jamal Shareef
  2019-10-15  3:12 ` [PATCH 1/2] staging: sm750fb: Fix lines over 80 characters Jamal Shareef
@ 2019-10-15  3:12 ` Jamal Shareef
  2019-10-15 16:44   ` [Outreachy kernel] " Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Jamal Shareef @ 2019-10-15  3:12 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel,
	jamal.k.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.

Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
---
 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(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 59568d18ce23..7eb3f7b0a86b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -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;
 		}
diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index dbcbbd1055da..d523df58d067 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -148,10 +148,14 @@ unsigned int rop2)   /* ROP value */
 	unsigned int nDirection, de_ctrl;
 
 	nDirection = LEFT_TO_RIGHT;
-	/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
+	/* Direction of ROP2 operation: 1 = Left to Right,
+	 *                             (-1) = Right to Left
+	 */
 	de_ctrl = 0;
 
-	/* If source and destination are the same surface, need to check for overlay cases */
+	/* If source and destination are the same surface,
+	 * need to check for overlay cases.
+	 */
 	if (sBase == dBase && sPitch == dPitch) {
 		/* Determine direction of operation */
 		if (sy < dy) {
@@ -289,19 +293,51 @@ static unsigned int deGetTransparency(struct lynx_accel *accel)
 }
 
 int sm750_hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
-		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
-		 u32 bytePerPixel,      /* Color depth of destination surface */
+		 const char *pSrcbuf,   /* pointer to start of source buffer
+					 * in system memory
+					 */
+
+		 u32 srcDelta,		/* Pitch value (in bytes) of the
+					 * source buffer, +ive means top down
+					 * and -ive means button up
+					 */
+
+		 u32 startBit,		/* Mono data can start at any bit in a
+					 * byte, this value should be 0 to 7
+					 */
+
+		 u32 dBase,		/* Address of destination: offset in
+					 * frame buffer
+					 */
+
+		 u32 dPitch,		/* Pitch value of destination surface
+					 * in BYTE
+					 */
+
+		 u32 bytePerPixel,	/* Color depth of destination surface */
+
 		 u32 dx,
-		 u32 dy,       /* Starting coordinate of destination surface */
+		 u32 dy,		/* Starting coordinate of destination
+					 * surface
+					 */
+
 		 u32 width,
-		 u32 height,   /* width and height of rectangle in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
-		 u32 rop2)     /* ROP value */
+		 u32 height,		/* width and height of rectangle in
+					 * pixel value
+					 */
+
+		 u32 fColor,		/* Foreground color
+					 * (corresponding to a 1 in the
+					 * monochrome data)
+					 */
+
+		 u32 bColor,		/* Background color
+					 * (corresponding to a 0 in the
+					 * monochrome data)
+					 */
+
+		 u32 rop2)	      /* ROP value */
+
 {
 	unsigned int ulBytesPerScan;
 	unsigned int ul4BytesPerScan;
@@ -379,9 +415,10 @@ int sm750_hw_imageblit(struct lynx_accel *accel,
 	/* Write MONO data (line by line) to 2D Engine data port */
 	for (i = 0; i < height; i++) {
 		/* For each line, send the data in chunks of 4 bytes */
-		for (j = 0; j < (ul4BytesPerScan / 4); j++)
-			write_dpPort(accel, *(unsigned int *)(pSrcbuf + (j * 4)));
-
+		for (j = 0; j < (ul4BytesPerScan / 4); j++) {
+			write_dpPort(accel,
+				     *(unsigned int *)(pSrcbuf + (j * 4)));
+		}
 		if (ulBytesRemain) {
 			memcpy(ajRemain, pSrcbuf + ul4BytesPerScan,
 			       ulBytesRemain);
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index c4f42002a50f..9ce8dd8e44c5 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -210,17 +210,48 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int sm750_hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
-		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
+		 const char *pSrcbuf,	/* pointer to start of source buffer in
+					 * system memory
+					 */
+
+		 u32 srcDelta,          /* Pitch value (in bytes) of the source
+					 * buffer, +ive means top down and
+					 * -ive means button up
+					 */
+
+		 u32 startBit,		/* Mono data can start at any bit
+					 * in a byte, this value should
+					 * be 0 to 7
+					 */
+
+		 u32 dBase,		/* Address of destination: offset in
+					 * frame buffer
+					 */
+
+		 u32 dPitch,		/* Pitch value of destination surface
+					 * in BYTE
+					 */
+
 		 u32 bytePerPixel,      /* Color depth of destination surface */
+
 		 u32 dx,
-		 u32 dy,       /* Starting coordinate of destination surface */
+		 u32 dy,		/* Starting coordinate of destination
+					 * surface
+					 */
 		 u32 width,
-		 u32 height,   /* width and height of rectangle in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
-		 u32 rop2);
+		 u32 height,		/* width and height of rectangle
+					 * in pixel value
+					 */
+
+		 u32 fColor,		/* Foreground color
+					 * (corresponding to a 1 in the
+					 * monochrome data
+					 */
+
+		 u32 bColor,		/* Background color
+					 * (corresponding to a 0 in the
+					 * monochrome data
+					 */
+
+		 u32 rop2);		/* ROP value */
 #endif
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars
  2019-10-15  3:12 ` [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars Jamal Shareef
@ 2019-10-15 16:44   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-10-15 16:44 UTC (permalink / raw)
  To: Jamal Shareef
  Cc: boqun.feng, andrea.parri, sudipm.mukherjee, teddy.wang,
	outreachy-kernel

On Mon, Oct 14, 2019 at 08:12:13PM -0700, Jamal Shareef wrote:
> 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.
> 
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
>  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(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 59568d18ce23..7eb3f7b0a86b 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-15 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15  3:12 [PATCH 0/2] Fix line over 80 characters warnings Jamal Shareef
2019-10-15  3:12 ` [PATCH 1/2] staging: sm750fb: Fix lines over 80 characters Jamal Shareef
2019-10-15  3:12 ` [PATCH 2/2] staging: sm750fb: Fix comments and assignments over 80 chars Jamal Shareef
2019-10-15 16:44   ` [Outreachy kernel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.