All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavle Rohalj <pavle.rohalj@gmail.com>
To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v2 20/49] staging: sm750fb: Update function parameter names to snake case
Date: Tue, 6 Apr 2021 23:43:34 -0700	[thread overview]
Message-ID: <80a0c8c1d020da11e458d197d155a6296c090ad5.1617776878.git.pavle.rohalj@gmail.com> (raw)
In-Reply-To: <cover.1617776878.git.pavle.rohalj@gmail.com>

Fix "Avoid CamelCase" checkpatch.pl checks for function
parameter names in sm750_accel.c.

Signed-off-by: Pavle Rohalj <pavle.rohalj@gmail.com>
---
 drivers/staging/sm750fb/sm750_accel.c | 92 +++++++++++++--------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index 8faa601c700b..4327bda871e1 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -18,9 +18,9 @@
 
 #include "sm750.h"
 #include "sm750_accel.h"
-static inline void write_dpr(struct lynx_accel *accel, int offset, u32 regValue)
+static inline void write_dpr(struct lynx_accel *accel, int offset, u32 reg_value)
 {
-	writel(regValue, accel->dprBase + offset);
+	writel(reg_value, accel->dprBase + offset);
 }
 
 static inline u32 read_dpr(struct lynx_accel *accel, int offset)
@@ -86,7 +86,7 @@ void sm750_hw_set2dformat(struct lynx_accel *accel, int fmt)
 }
 
 int sm750_hw_fillrect(struct lynx_accel *accel,
-		      u32 base, u32 pitch, u32 Bpp,
+		      u32 base, u32 pitch, u32 bpp,
 		      u32 x, u32 y, u32 width, u32 height,
 		      u32 color, u32 rop)
 {
@@ -103,14 +103,14 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
 
 	write_dpr(accel, DE_WINDOW_DESTINATION_BASE, base); /* dpr40 */
 	write_dpr(accel, DE_PITCH,
-		  ((pitch / Bpp << DE_PITCH_DESTINATION_SHIFT) &
+		  ((pitch / bpp << DE_PITCH_DESTINATION_SHIFT) &
 		   DE_PITCH_DESTINATION_MASK) |
-		  (pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
+		  (pitch / bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
 
 	write_dpr(accel, DE_WINDOW_WIDTH,
-		  ((pitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
+		  ((pitch / bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
 		   DE_WINDOW_WIDTH_DST_MASK) |
-		   (pitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr44 */
+		   (pitch / bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr44 */
 
 	write_dpr(accel, DE_FOREGROUND, color); /* DPR14 */
 
@@ -132,13 +132,13 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
 
 /**
  * sm750_hm_copyarea
- * @sBase: Address of source: offset in frame buffer
- * @sPitch: Pitch value of source surface in BYTE
+ * @s_base: Address of source: offset in frame buffer
+ * @s_pitch: Pitch value of source surface in BYTE
  * @sx: Starting x coordinate of source surface
  * @sy: Starting y coordinate of source surface
- * @dBase: Address of destination: offset in frame buffer
- * @dPitch: Pitch value of destination surface in BYTE
- * @Bpp: Color depth of destination surface
+ * @d_base: Address of destination: offset in frame buffer
+ * @d_pitch: Pitch value of destination surface in BYTE
+ * @bpp: Color depth of destination surface
  * @dx: Starting x coordinate of destination surface
  * @dy: Starting y coordinate of destination surface
  * @width: width of rectangle in pixel value
@@ -146,10 +146,10 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
  * @rop2: ROP value
  */
 int sm750_hw_copyarea(struct lynx_accel *accel,
-		      unsigned int sBase, unsigned int sPitch,
+		      unsigned int s_base, unsigned int s_pitch,
 		      unsigned int sx, unsigned int sy,
-		      unsigned int dBase, unsigned int dPitch,
-		      unsigned int Bpp, unsigned int dx, unsigned int dy,
+		      unsigned int d_base, unsigned int d_pitch,
+		      unsigned int bpp, unsigned int dx, unsigned int dy,
 		      unsigned int width, unsigned int height,
 		      unsigned int rop2)
 {
@@ -160,7 +160,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 	de_ctrl = 0;
 
 	/* If source and destination are the same surface, need to check for overlay cases */
-	if (sBase == dBase && sPitch == dPitch) {
+	if (s_base == d_base && s_pitch == d_pitch) {
 		/* Determine direction of operation */
 		if (sy < dy) {
 			/*  +----------+
@@ -234,14 +234,14 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 	 * It is an address offset (128 bit aligned)
 	 * from the beginning of frame buffer.
 	 */
-	write_dpr(accel, DE_WINDOW_SOURCE_BASE, sBase); /* dpr40 */
+	write_dpr(accel, DE_WINDOW_SOURCE_BASE, s_base); /* dpr40 */
 
 	/*
 	 * 2D Destination Base.
 	 * It is an address offset (128 bit aligned)
 	 * from the beginning of frame buffer.
 	 */
-	write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dBase); /* dpr44 */
+	write_dpr(accel, DE_WINDOW_DESTINATION_BASE, d_base); /* dpr44 */
 
 	/*
 	 * Program pitch (distance between the 1st points of two adjacent lines).
@@ -249,9 +249,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 	 * pixel values. Need Byte to pixel conversion.
 	 */
 	write_dpr(accel, DE_PITCH,
-		  ((dPitch / Bpp << DE_PITCH_DESTINATION_SHIFT) &
+		  ((d_pitch / bpp << DE_PITCH_DESTINATION_SHIFT) &
 		   DE_PITCH_DESTINATION_MASK) |
-		  (sPitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
+		  (s_pitch / bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
 
 	/*
 	 * Screen Window width in Pixels.
@@ -259,9 +259,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 	 * for a given point.
 	 */
 	write_dpr(accel, DE_WINDOW_WIDTH,
-		  ((dPitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
+		  ((d_pitch / bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
 		   DE_WINDOW_WIDTH_DST_MASK) |
-		  (sPitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */
+		  (s_pitch / bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */
 
 	if (accel->de_wait() != 0)
 		return -1;
@@ -298,26 +298,26 @@ static unsigned int deGetTransparency(struct lynx_accel *accel)
 
 /**
  * sm750_hw_imageblit
- * @pSrcbuf: pointer to start of source buffer in system memory
- * @srcDelta: Pitch value (in bytes) of the source buffer, +ive means top down
+ * @src_buf: pointer to start of source buffer in system memory
+ * @src_delta: Pitch value (in bytes) of the source buffer, +ive means top down
  *	      and -ive mean button up
- * @startBit: Mono data can start at any bit in a byte, this value should be
+ * @start_bit: Mono data can start at any bit in a byte, this value should be
  *	      0 to 7
- * @dBase: Address of destination: offset in frame buffer
- * @dPitch: Pitch value of destination surface in BYTE
- * @bytePerPixel: Color depth of destination surface
+ * @d_base: Address of destination: offset in frame buffer
+ * @d_pitch: Pitch value of destination surface in BYTE
+ * @byte_per_pixel: Color depth of destination surface
  * @dx: Starting x coordinate of destination surface
  * @dy: Starting y coordinate of destination surface
  * @width: width of rectangle in pixel value
  * @height: height of rectangle in pixel value
  * @fColor: Foreground color (corresponding to a 1 in the monochrome data
- * @bColor: Background color (corresponding to a 0 in the monochrome data
+ * @b_olor: Background color (corresponding to a 0 in the monochrome data
  * @rop2: ROP value
  */
-int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
-		       u32 srcDelta, u32 startBit, u32 dBase, u32 dPitch,
-		       u32 bytePerPixel, u32 dx, u32 dy, u32 width,
-		       u32 height, u32 fColor, u32 bColor, u32 rop2)
+int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf,
+		       u32 src_delta, u32 start_bit, u32 d_base, u32 d_pitch,
+		       u32 byte_per_pixel, u32 dx, u32 dy, u32 width,
+		       u32 height, u32 fColor, u32 b_olor, u32 rop2)
 {
 	unsigned int ulBytesPerScan;
 	unsigned int ul4BytesPerScan;
@@ -326,8 +326,8 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
 	unsigned char ajRemain[4];
 	int i, j;
 
-	startBit &= 7; /* Just make sure the start bit is within legal range */
-	ulBytesPerScan = (width + startBit + 7) / 8;
+	start_bit &= 7; /* Just make sure the start bit is within legal range */
+	ulBytesPerScan = (width + start_bit + 7) / 8;
 	ul4BytesPerScan = ulBytesPerScan & ~3;
 	ulBytesRemain = ulBytesPerScan & 3;
 
@@ -344,7 +344,7 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
 	 * It is an address offset (128 bit aligned)
 	 * from the beginning of frame buffer.
 	 */
-	write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dBase);
+	write_dpr(accel, DE_WINDOW_DESTINATION_BASE, d_base);
 
 	/*
 	 * Program pitch (distance between the 1st points of two adjacent
@@ -352,9 +352,9 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
 	 * register uses pixel values. Need Byte to pixel conversion.
 	 */
 	write_dpr(accel, DE_PITCH,
-		  ((dPitch / bytePerPixel << DE_PITCH_DESTINATION_SHIFT) &
+		  ((d_pitch / byte_per_pixel << DE_PITCH_DESTINATION_SHIFT) &
 		   DE_PITCH_DESTINATION_MASK) |
-		  (dPitch / bytePerPixel & DE_PITCH_SOURCE_MASK)); /* dpr10 */
+		  (d_pitch / byte_per_pixel & DE_PITCH_SOURCE_MASK)); /* dpr10 */
 
 	/*
 	 * Screen Window width in Pixels.
@@ -362,17 +362,17 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
 	 * in frame buffer for a given point.
 	 */
 	write_dpr(accel, DE_WINDOW_WIDTH,
-		  ((dPitch / bytePerPixel << DE_WINDOW_WIDTH_DST_SHIFT) &
+		  ((d_pitch / byte_per_pixel << DE_WINDOW_WIDTH_DST_SHIFT) &
 		   DE_WINDOW_WIDTH_DST_MASK) |
-		  (dPitch / bytePerPixel & DE_WINDOW_WIDTH_SRC_MASK));
+		  (d_pitch / byte_per_pixel & DE_WINDOW_WIDTH_SRC_MASK));
 
 	 /*
 	  * Note: For 2D Source in Host Write, only X_K1_MONO field is needed,
 	  * and Y_K2 field is not used.
-	  * For mono bitmap, use startBit for X_K1.
+	  * For mono bitmap, use start_bit for X_K1.
 	  */
 	write_dpr(accel, DE_SOURCE,
-		  (startBit << DE_SOURCE_X_K1_SHIFT) &
+		  (start_bit << DE_SOURCE_X_K1_SHIFT) &
 		  DE_SOURCE_X_K1_MONO_MASK); /* dpr00 */
 
 	write_dpr(accel, DE_DESTINATION,
@@ -384,7 +384,7 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
 		  (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
 
 	write_dpr(accel, DE_FOREGROUND, fColor);
-	write_dpr(accel, DE_BACKGROUND, bColor);
+	write_dpr(accel, DE_BACKGROUND, b_olor);
 
 	de_ctrl = (rop2 & DE_CONTROL_ROP_MASK) |
 		DE_CONTROL_ROP_SELECT | DE_CONTROL_COMMAND_HOST_WRITE |
@@ -396,15 +396,15 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,
 	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)));
+			write_dpPort(accel, *(unsigned int *)(src_buf + (j * 4)));
 
 		if (ulBytesRemain) {
-			memcpy(ajRemain, pSrcbuf + ul4BytesPerScan,
+			memcpy(ajRemain, src_buf + ul4BytesPerScan,
 			       ulBytesRemain);
 			write_dpPort(accel, *(unsigned int *)ajRemain);
 		}
 
-		pSrcbuf += srcDelta;
+		src_buf += src_delta;
 	}
 
 	return 0;
-- 
2.30.2


  parent reply	other threads:[~2021-04-07  6:43 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07  6:35 [PATCH v2 00/49] *** SUBJECT HERE *** Pavle Rohalj
2021-04-07  6:35 ` [PATCH v2 01/49] staging: sm750fb: Update dvi_ctrl_device to snake case Pavle Rohalj
2021-04-07  8:31   ` Greg KH
2021-04-07  8:45     ` Pavle Rohalj
2021-04-07  6:36 ` [PATCH v2 02/49] staging: sm750fb: Rename dviInit to dvi_init and update param names Pavle Rohalj
2021-04-07  8:32   ` Greg KH
2021-05-08  9:43   ` Dan Carpenter
2021-04-07  6:36 ` [PATCH v2 03/49] staging: sm750fb: Update param names of PFN_DVICTRL_INIT function pointer Pavle Rohalj
2021-04-07  6:36 ` [PATCH v2 04/49] staging: sm750fb: Remove type names in variables and type definitions Pavle Rohalj
2021-04-07  6:36 ` [PATCH v2 05/49] staging: sm750fb: Remove remaining camel case names in ddk750_dvi.h Pavle Rohalj
2021-04-07  6:36 ` [PATCH v2 06/49] staging: sm750fb: Update displayControlAdjust_SM750LE to snake case Pavle Rohalj
2021-04-07  6:36 ` [PATCH v2 07/49] staging: sm750fb: Update programModeRegisters " Pavle Rohalj
2021-04-07  6:36 ` [PATCH v2 08/49] staging: sm750fb: Update enum values in dpms " Pavle Rohalj
2021-04-07  7:24   ` Greg KH
2021-04-07  8:27     ` Pavle Rohalj
2021-04-07  8:39       ` Greg KH
2021-05-08  9:47   ` Dan Carpenter
2021-04-07  6:36 ` [PATCH v2 09/49] staging: sm750fb: Rename sm750_set_power_mode function parameter Pavle Rohalj
2021-05-08  9:51   ` Dan Carpenter
2021-04-07  6:36 ` [PATCH v2 10/49] staging: sm750fb: Rename ddk750_setModeTiming to ddk750_set_mode_timing Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 11/49] staging: sm750fb: Rename i2cWriteReg and i2cReadReg to snake case Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 12/49] staging: sm750fb: Rename vendorID local variable " Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 13/49] staging: sm750fb: Rename deviceID " Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 14/49] staging: sm750fb: Rename sii164SelectHotPlugDetectionMode " Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 15/49] staging: sm750fb: Rename gDviCtrlChipName " Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 16/49] staging: sm750fb: Update function parameter names in ddk750_sii164.c Pavle Rohalj
2021-04-07  6:37 ` [PATCH v2 17/49] staging: sm750fb: Rename local variables to snake case Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 18/49] staging: sm750fb: Rename function params of sii164_init_chip Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 19/49] staging: sm750fb: Rename function parameter of sii164_enable_hot_plug_detection Pavle Rohalj
2021-04-07  6:43 ` Pavle Rohalj [this message]
2021-04-07  6:43 ` [PATCH v2 21/49] staging: sm750fb: Rename function write_dpPort to snake case Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 22/49] staging: sm750fb: Update local variable in sm750_hw_copyarea " Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 23/49] staging: sm750fb: Update local variables in sm750_hw_imageblit " Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 24/49] staging: sm750fb: Update local variable in sm750_hw_fillrect " Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 25/49] staging: sm750fb: Rename deGetTransparency " Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 26/49] staging: sm750fb: Update function parameter of sm750_hw_imageblit " Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 27/49] staging: sm750fb: Rename function params to snake case in sm750_accel.h Pavle Rohalj
2021-04-07  6:43 ` [PATCH v2 28/49] staging: sm750fb: Update members of lynx_cursor to snake case Pavle Rohalj
2021-04-07  6:44 ` [PATCH v2 29/49] staging: sm750fb: Rename function sm750_hw_cursor_setSize " Pavle Rohalj
2021-04-07  6:44 ` [PATCH v2 30/49] staging: sm750fb: Rename function sm750_hw_cursor_setPos " Pavle Rohalj
2021-04-07  6:44 ` [PATCH v2 31/49] staging: sm750fb: Rename function sm750_hw_cursor_setColor " Pavle Rohalj
2021-04-07  6:44 ` [PATCH v2 32/49] staging: sm750fb: Rename function sm750_hw_cursor_setData " Pavle Rohalj
2021-04-07  6:44 ` [PATCH v2 33/49] staging: sm750fb: Rename function hw_sm750_crtc_setMode " Pavle Rohalj
2021-04-07  6:45 ` [PATCH v2 34/49] staging: sm750fb: Update members of init_status struct " Pavle Rohalj
2021-04-07  6:45 ` [PATCH v2 35/49] staging: sm750fb: Update members of sm750_dev " Pavle Rohalj
2021-04-07  6:45 ` [PATCH v2 36/49] staging: sm750fb: Update members of lynxfb_crtc " Pavle Rohalj
2021-04-07  6:45 ` [PATCH v2 37/49] staging: sm750fb: Rename function hw_sm750_output_setMode " Pavle Rohalj
2021-04-07  6:45 ` [PATCH v2 38/49] staging: sm750fb: Rename function hw_sm750_setColReg " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 39/49] staging: sm750fb: Rename functions *_setBLANK " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 40/49] staging: sm750fb: Rename function sm750_hw_cursor_setData2 " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 41/49] staging: sm750fb: Rename function hw_sm750_initAccel " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 42/49] staging: sm750fb: Rename functions *_deWait " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 43/49] staging: sm750fb: Update members of lynx_accel struct " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 44/49] staging: sm750fb: Rename function hw_sm750_crtc_checkMode " Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 45/49] staging: sm750fb: Rename sii164_set_power function parameter Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 46/49] staging: sm750fb: Rename local variable Bpp to bpp in sm750.c Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 47/49] staging: sm750fb: Rename proc_setBLANK member of lynxfb_output struct Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 48/49] staging: sm750fb: Rename fixId to fix_id Pavle Rohalj
2021-04-07  6:46 ` [PATCH v2 49/49] staging: sm750fb: Update members of sm750_pnltype struct to snake case Pavle Rohalj
2021-04-07  7:08 ` [PATCH v2 00/49] *** SUBJECT HERE *** Greg KH
2021-04-07  7:15   ` Pavle Rohalj
2021-04-07  7:32     ` Greg KH
2021-04-07  8:32       ` Greg KH
2021-04-07  8:46         ` Pavle Rohalj
2021-04-07  7:11 ` Fabio Aiuto
2021-04-07  8:34   ` Pavle Rohalj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80a0c8c1d020da11e458d197d155a6296c090ad5.1617776878.git.pavle.rohalj@gmail.com \
    --to=pavle.rohalj@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.