linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] staging: sm750fb: fix function parameter alignment
@ 2025-07-16  5:33 Ignacio Peña
  2025-07-16  5:33 ` [PATCH v3 2/2] staging: sm750fb: fix CamelCase variable naming Ignacio Peña
  0 siblings, 1 reply; 3+ messages in thread
From: Ignacio Peña @ 2025-07-16  5:33 UTC (permalink / raw)
  To: gregkh, linux-staging; +Cc: dan.carpenter, Ignacio Pena

From: Ignacio Pena <ignacio.pena87@gmail.com>

Fix checkpatch warning about improper function parameter alignment
in sm750_hw_cursor_set_pos function call.

Signed-off-by: Ignacio Pena <ignacio.pena87@gmail.com>
---

Changes in v3:
- Removed the const declaration patch as g_fbmode is modified at runtime
- Split only into alignment and naming fixes

 drivers/staging/sm750fb/sm750.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index abc123def456..def456abc123 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -125,8 +125,8 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
 
 	if (fbcursor->set & FB_CUR_SETPOS)
 		sm750_hw_cursor_set_pos(cursor,
-				       fbcursor->image.dx - info->var.xoffset,
-				       fbcursor->image.dy - info->var.yoffset);
+					fbcursor->image.dx - info->var.xoffset,
+					fbcursor->image.dy - info->var.yoffset);
 
 	if (fbcursor->set & FB_CUR_SETCMAP) {
 		/* get the 16bit color of kernel means */
-- 
2.39.3

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

* [PATCH v3 2/2] staging: sm750fb: fix CamelCase variable naming
  2025-07-16  5:33 [PATCH v3 1/2] staging: sm750fb: fix function parameter alignment Ignacio Peña
@ 2025-07-16  5:33 ` Ignacio Peña
  2025-07-16  7:40   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Ignacio Peña @ 2025-07-16  5:33 UTC (permalink / raw)
  To: gregkh, linux-staging; +Cc: dan.carpenter, Ignacio Pena

From: Ignacio Pena <ignacio.pena87@gmail.com>

Replace CamelCase variable 'Bpp' with lowercase 'bpp' to fix
checkpatch warnings about improper variable naming convention.

Signed-off-by: Ignacio Pena <ignacio.pena87@gmail.com>
---

Changes in v3:
- Removed the const declaration patch as g_fbmode is modified at runtime
- Split only into alignment and naming fixes

 drivers/staging/sm750fb/sm750.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index def456abc123..789abc123def 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -161,7 +161,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
 {
 	struct lynxfb_par *par;
 	struct sm750_dev *sm750_dev;
-	unsigned int base, pitch, Bpp, rop;
+	unsigned int base, pitch, bpp, rop;
 	u32 color;
 
 	if (info->state != FBINFO_STATE_RUNNING)
@@ -175,10 +175,10 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
 	 */
 	base = par->crtc.o_screen;
 	pitch = info->fix.line_length;
-	Bpp = info->var.bits_per_pixel >> 3;
+	bpp = info->var.bits_per_pixel >> 3;
 
-	color = (Bpp == 1) ? region->color :
+	color = (bpp == 1) ? region->color :
 		((u32 *)info->pseudo_palette)[region->color];
 	rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR : HW_ROP2_COPY;
 
@@ -191,7 +191,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
 	spin_lock(&sm750_dev->slock);
 
 	sm750_dev->accel.de_fillrect(&sm750_dev->accel,
-				     base, pitch, Bpp,
+				     base, pitch, bpp,
 				     region->dx, region->dy,
 				     region->width, region->height,
 				     color, rop);
@@ -203,7 +203,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info,
 {
 	struct lynxfb_par *par;
 	struct sm750_dev *sm750_dev;
-	unsigned int base, pitch, Bpp;
+	unsigned int base, pitch, bpp;
 
 	par = info->par;
 	sm750_dev = par->dev;
@@ -214,7 +214,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info,
 	 */
 	base = par->crtc.o_screen;
 	pitch = info->fix.line_length;
-	Bpp = info->var.bits_per_pixel >> 3;
+	bpp = info->var.bits_per_pixel >> 3;
 
 	/*
 	 * If not use spin_lock, system will die if user load driver
@@ -226,7 +226,7 @@ static void lynxfb_ops_copyarea(struct fb_info *info,
 
 	sm750_dev->accel.de_copyarea(&sm750_dev->accel,
 				     base, pitch, region->sx, region->sy,
-				     base, pitch, Bpp, region->dx, region->dy,
+				     base, pitch, bpp, region->dx, region->dy,
 				     region->width, region->height,
 				     HW_ROP2_COPY);
 	spin_unlock(&sm750_dev->slock);
@@ -235,7 +235,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
 				 const struct fb_image *image)
 {
 	unsigned int base, pitch, Bpp;
+	unsigned int base, pitch, bpp;
 	unsigned int fgcol, bgcol;
 	struct lynxfb_par *par;
 	struct sm750_dev *sm750_dev;
@@ -248,7 +248,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
 	 */
 	base = par->crtc.o_screen;
 	pitch = info->fix.line_length;
-	Bpp = info->var.bits_per_pixel >> 3;
+	bpp = info->var.bits_per_pixel >> 3;
 
 	/* TODO: Implement hardware acceleration for image->depth > 1 */
 	if (image->depth != 1) {
@@ -274,7 +274,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
 
 	sm750_dev->accel.de_imageblit(&sm750_dev->accel,
 				      image->data, image->width >> 3, 0,
-				      base, pitch, Bpp,
+				      base, pitch, bpp,
 				      image->dx, image->dy,
 				      image->width, image->height,
 				      fgcol, bgcol, HW_ROP2_COPY);
-- 
2.39.3

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

* Re: [PATCH v3 2/2] staging: sm750fb: fix CamelCase variable naming
  2025-07-16  5:33 ` [PATCH v3 2/2] staging: sm750fb: fix CamelCase variable naming Ignacio Peña
@ 2025-07-16  7:40   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-07-16  7:40 UTC (permalink / raw)
  To: Ignacio Peña; +Cc: linux-staging, dan.carpenter

On Wed, Jul 16, 2025 at 01:33:57AM -0400, Ignacio Peña wrote:
> From: Ignacio Pena <ignacio.pena87@gmail.com>
> 
> Replace CamelCase variable 'Bpp' with lowercase 'bpp' to fix
> checkpatch warnings about improper variable naming convention.
> 
> Signed-off-by: Ignacio Pena <ignacio.pena87@gmail.com>
> ---
> 
> Changes in v3:
> - Removed the const declaration patch as g_fbmode is modified at runtime
> - Split only into alignment and naming fixes

This patch is somehow corrupted:

Hunk #1 succeeded at 160 (offset -1 lines).
patch: **** malformed patch at line 47: @@ -191,7 +191,7 @@ static void lynxfb_ops_fillrect(struct fb_info *info,

How did you create it?

thanks,

greg k-h

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

end of thread, other threads:[~2025-07-16  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16  5:33 [PATCH v3 1/2] staging: sm750fb: fix function parameter alignment Ignacio Peña
2025-07-16  5:33 ` [PATCH v3 2/2] staging: sm750fb: fix CamelCase variable naming Ignacio Peña
2025-07-16  7:40   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).