DORMANTno replies

[PATCH] staging: sm750fb: rename Bpp parameter to bpp

From: Gabry <hidden>
Date: 2026-05-28 18:36:57
Also in: linux-staging, lkml
Subsystem: staging - silicon motion sm750 frame buffer driver, staging subsystem, the rest · Maintainers: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman, Linus Torvalds

The Linux kernel coding style prefers snake_case over CamelCase foridentifier names.

Rename the 'Bpp' parameter (bytes per pixel) of sm750_hw_fillrect()
and sm750_hw_copyarea() to 'bpp' to comply with this standard. Update
the function prototypes in sm750_accel.h and the corresponding
kernel-doc descriptions accordingly.

This is a pure rename with no functional change, and addresses a
checkpatch.pl warning:

  CHECK: Avoid CamelCase: <Bpp>

Signed-off-by: Gabriele Rizzo <redacted>
---
 drivers/staging/sm750fb/sm750_accel.c | 22 +++++++++++-----------
 drivers/staging/sm750fb/sm750_accel.h |  6 +++---
 2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index 0f94d859e91c..4beabe1053f9 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -85,7 +85,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)
 {
@@ -102,14 +102,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 */
@@ -138,7 +138,7 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
  * @sy: Starting y coordinate of source surface
  * @dest_base: Address of destination: offset in frame buffer
  * @dest_pitch: Pitch value of destination surface in BYTE
- * @Bpp: Color depth of destination surface
+ * @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
@@ -149,7 +149,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
      unsigned int source_base, unsigned int source_pitch,
      unsigned int sx, unsigned int sy,
      unsigned int dest_base, unsigned int dest_pitch,
-     unsigned int Bpp, unsigned int dx, unsigned int dy,
+     unsigned int bpp, unsigned int dx, unsigned int dy,
      unsigned int width, unsigned int height,
      unsigned int rop2)
 {
@@ -249,9 +249,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
  * pixel values. Need Byte to pixel conversion.
  */
  write_dpr(accel, DE_PITCH,
- ((dest_pitch / Bpp << DE_PITCH_DESTINATION_SHIFT) &
+ ((dest_pitch / bpp << DE_PITCH_DESTINATION_SHIFT) &
   DE_PITCH_DESTINATION_MASK) |
- (source_pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
+ (source_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,
- ((dest_pitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
+ ((dest_pitch / bpp << DE_WINDOW_WIDTH_DST_SHIFT) &
   DE_WINDOW_WIDTH_DST_MASK) |
- (source_pitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */
+ (source_pitch / bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */

  if (accel->de_wait() != 0)
  return -1;
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index 2c79cb730a0a..d15a40cacb84 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -190,7 +190,7 @@ void sm750_hw_set2dformat(struct lynx_accel *accel, int fmt);
 void sm750_hw_de_init(struct lynx_accel *accel);

 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);
@@ -202,7 +202,7 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
  * @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
+ * @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
@@ -213,7 +213,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
      unsigned int sBase, unsigned int sPitch,
      unsigned int sx, unsigned int sy,
      unsigned int dBase, unsigned int dPitch,
-     unsigned int Bpp, unsigned int dx, unsigned int dy,
+     unsigned int bpp, unsigned int dx, unsigned int dy,
      unsigned int width, unsigned int height,
      unsigned int rop2);

--
2.54.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help