Skip to contentSkip to conversation

staging: sm750fb: split multiple assignments to lines

PATCH Superseded Christopher Carbone 2 participants 3 messages Aug 22, 2022 – Aug 25, 2022

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: split multiple assignments to lines

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: multiple assignmentst should be avoided

---
 drivers/staging/sm750fb/sm750.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/sm750.c +8 -4
index dbd1159a2ef0..6f4c31635cc4 100644
@@ -386,7 +386,8 @@ static int lynxfb_ops_set_par(struct fb_info *info)
 
 	ret = lynxfb_set_color_offsets(info);
 
-	var->height = var->width = -1;
+	var->height  = -1;
+	var->width = -1;
 	var->accel_flags = 0;/*FB_ACCELF_TEXT;*/
 
 	if (ret) {
@@ -498,7 +499,8 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
 		return ret;
 	}
 
-	var->height = var->width = -1;
+	var->height = -1;
+	var->width = -1;
 	var->accel_flags = 0;/* FB_ACCELF_TEXT; */
 
 	/* check if current fb's video memory big enough to hold the onscreen*/
@@ -723,7 +725,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 		0x800f0 + (int)crtc->channel * 0x140;
 
 	pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio);
-	crtc->cursor.max_h = crtc->cursor.max_w = 64;
+	crtc->cursor.max_h = 64;
+	crtc->cursor.max_w = 64;
 	crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
 	crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;
 
@@ -1027,7 +1030,8 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
 	if (!sm750_dev)
 		return err;
 
-	sm750_dev->fbinfo[0] = sm750_dev->fbinfo[1] = NULL;
+	sm750_dev->fbinfo[0] = NULL;
+	sm750_dev->fbinfo[1] = NULL;
 	sm750_dev->devid = pdev->device;
 	sm750_dev->revid = pdev->revision;
 	sm750_dev->pdev = pdev;
Signature · 1 line
2.37.2
maintainer
#1 lore raw
Quoted 16 lines · Christopher Carbone

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: multiple assignmentst should be avoided

---
 drivers/staging/sm750fb/sm750.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -0
index dbd1159a2ef0..6f4c31635cc4 100644

drivers/staging/sm750fb/sm750.c static int lynxfb_ops_set_par(struct fb_info *info) · line 389

Quoted 5 lines
drivers/staging/sm750fb/sm750.c +1 -1
@@ -386,7 +386,8 @@ static int lynxfb_ops_set_par(struct fb_info *info)
 
 	ret = lynxfb_set_color_offsets(info);
 
-	var->height = var->width = -1;
+	var->height  = -1;

Odd spacing on this new line. Did you run your change through checkpatch?

Also, this is a new version of a previously-submitted patch, it needs to be called "v2", and the changes you made from v1 listed below the --- line, as the documentation asks you to do.

Please fix this up and submit a v3.

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg KH
Quoted 7 lines · Christopher Carbone
drivers/staging/sm750fb/sm750.c +0 -0
index dbd1159a2ef0..6f4c31635cc4 100644
@@ -386,7 +386,8 @@ static int lynxfb_ops_set_par(struct fb_info *info)
 
Quoted 7 lines

drivers/staging/sm750fb/sm750.c static int lynxfb_ops_set_par(struct fb_info *info) · line 389

Quoted 4 lines
drivers/staging/sm750fb/sm750.c +1 -1
 	ret = lynxfb_set_color_offsets(info);
 
-	var->height = var->width = -1;
+	var->height  = -1;

Odd spacing on this new line. Did you run your change through checkpatch?

Yes; checkpatch didn't report any problems with it.

Thank you for your time,
Chris Carbone