[PATCH 4/6] staging: sm750fb: rename `dPitch` parameter

Eric Florin posted 6 patches 6 months, 3 weeks ago
[PATCH 4/6] staging: sm750fb: rename `dPitch` parameter
Posted by Eric Florin 6 months, 3 weeks ago
Rename `dPitch` to `d_pitch` in `sm750_hw_copyarea` to conform with
kernel style guidelines as reported by checkpatch.pl

CHECK: Avoid CamelCase: <dPitch>

Signed-off-by: Eric Florin <ericflorin@google.com>
---
 drivers/staging/sm750fb/sm750_accel.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index e5f1f021768b..ea64e10d4814 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -137,7 +137,7 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
  * @sx: Starting x coordinate of source surface
  * @sy: Starting y coordinate of source surface
  * @d_base: Address of destination: offset in frame buffer
- * @dPitch: Pitch value of destination surface in BYTE
+ * @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
@@ -148,7 +148,7 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
 int sm750_hw_copyarea(struct lynx_accel *accel,
 		      unsigned int s_base, unsigned int s_pitch,
 		      unsigned int sx, unsigned int sy,
-		      unsigned int d_base, unsigned int dPitch,
+		      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 (s_base == d_base && s_pitch == dPitch) {
+	if (s_base == d_base && s_pitch == d_pitch) {
 		/* Determine direction of operation */
 		if (sy < dy) {
 			/*  +----------+
@@ -249,7 +249,7 @@ 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) |
 		  (s_pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
 
@@ -259,7 +259,7 @@ 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) |
 		  (s_pitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */
 
-- 
2.49.0.1151.ga128411c76-goog
Re: [PATCH 4/6] staging: sm750fb: rename `dPitch` parameter
Posted by Greg KH 6 months ago
On Tue, May 27, 2025 at 10:11:26AM -0700, Eric Florin wrote:
> Rename `dPitch` to `d_pitch` in `sm750_hw_copyarea` to conform with
> kernel style guidelines as reported by checkpatch.pl
> 
> CHECK: Avoid CamelCase: <dPitch>
> 
> Signed-off-by: Eric Florin <ericflorin@google.com>
> ---
>  drivers/staging/sm750fb/sm750_accel.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> index e5f1f021768b..ea64e10d4814 100644
> --- a/drivers/staging/sm750fb/sm750_accel.c
> +++ b/drivers/staging/sm750fb/sm750_accel.c
> @@ -137,7 +137,7 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
>   * @sx: Starting x coordinate of source surface
>   * @sy: Starting y coordinate of source surface
>   * @d_base: Address of destination: offset in frame buffer
> - * @dPitch: Pitch value of destination surface in BYTE
> + * @d_pitch: Pitch value of destination surface in BYTE

"dest_pitch"?