Skip to contentSkip to conversation

Staging: speakup: Fixed a multiple assignment issue

PATCH In review Shannon Booth 2 participants 2 messages Jan 31, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: speakup: Fixed a multiple assignment issue

Fixed a coding style issue.

---
 drivers/staging/speakup/main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/speakup/main.c +6 -3
index cf12590..b721f41 100644
@@ -261,9 +261,12 @@ static unsigned char get_attributes(struct vc_data *vc, u16 *pos)
 
 static void speakup_date(struct vc_data *vc)
 {
-	spk_x = spk_cx = vc->vc_x;
-	spk_y = spk_cy = vc->vc_y;
-	spk_pos = spk_cp = vc->vc_pos;
+	spk_x =  vc->vc_x;
+	spk_cx = vc->vc_x;
+	spk_y = vc->vc_y;
+	spk_cy = vc->vc_y;
+	spk_pos =  vc->vc_pos;
+	spk_cp = vc->vc_pos;
 	spk_old_attr = spk_attr;
 	spk_attr = get_attributes(vc, (u_short *)spk_pos);
 }
Signature · 6 lines
2.7.4

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
maintainer
#1 lore raw
Quoted 14 lines · Shannon Booth

Fixed a coding style issue.

---
 drivers/staging/speakup/main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/speakup/main.c +0 -0
index cf12590..b721f41 100644
@@ -261,9 +261,12 @@ static unsigned char get_attributes(struct vc_data *vc, u16 *pos)
 
 static void speakup_date(struct vc_data *vc)

drivers/staging/speakup/main.c static unsigned char get_attributes(struct vc_data *vc, u16 *pos) · line 269

Quoted 10 lines
drivers/staging/speakup/main.c +6 -3
 {
-	spk_x = spk_cx = vc->vc_x;
-	spk_y = spk_cy = vc->vc_y;
-	spk_pos = spk_cp = vc->vc_pos;
+	spk_x =  vc->vc_x;
+	spk_cx = vc->vc_x;
+	spk_y = vc->vc_y;
+	spk_cy = vc->vc_y;
+	spk_pos =  vc->vc_pos;
+	spk_cp = vc->vc_pos;

The original code looks much better than this, don't you agree?

Coding style is just a guideline, no need to change things that don't make sense.

thanks,

greg k-h
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel