All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: speakup: Fix multiple assignments on a single line
@ 2019-10-27  5:06 Frank A. Cancio Bello
  2019-10-27  5:35 ` [Outreachy kernel] " Julia Lawall
  2019-10-27  7:13 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Frank A. Cancio Bello @ 2019-10-27  5:06 UTC (permalink / raw)
  To: gregkh
  Cc: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
	outreachy-kernel, saiprakash.ranjan, joel

checkpatch message: "multiple assignments should be avoided"

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---

This is the second patch that I send for "Outreachy December 2019 to
March 2020".

 drivers/staging/speakup/main.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 488f2539aa9a..6f5a58bd1f81 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -263,9 +263,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_cx = vc->vc_x;
+	spk_x = spk_cx;
+	spk_cy = vc->vc_y;
+	spk_y = spk_cy;
+	spk_cp = vc->vc_pos;
+	spk_pos = spk_cp;
 	spk_old_attr = spk_attr;
 	spk_attr = get_attributes(vc, (u_short *)spk_pos);
 }
@@ -1672,9 +1675,12 @@ static int speak_highlight(struct vc_data *vc)
 		spk_do_flush();
 		spkup_write(speakup_console[vc_num]->ht.highbuf[hc],
 			    speakup_console[vc_num]->ht.highsize[hc]);
-		spk_pos = spk_cp = speakup_console[vc_num]->ht.rpos[hc];
-		spk_x = spk_cx = speakup_console[vc_num]->ht.rx[hc];
-		spk_y = spk_cy = speakup_console[vc_num]->ht.ry[hc];
+		spk_cp = speakup_console[vc_num]->ht.rpos[hc];
+		spk_pos = spk_cp;
+		spk_cx = speakup_console[vc_num]->ht.rx[hc];
+		spk_x = spk_cx;
+		spk_cy = speakup_console[vc_num]->ht.ry[hc];
+		spk_y = spk_cy;
 		return 1;
 	}
 	return 0;
@@ -2117,7 +2123,8 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
 			spk_keydown = 0;
 			goto out;
 		}
-		value = spk_lastkey = pad_chars[value];
+		spk_lastkey = pad_chars[value];
+		value = spk_lastkey;
 		spk_keydown++;
 		spk_parked &= 0xfe;
 		goto no_map;
-- 
2.17.1



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

end of thread, other threads:[~2019-10-28  2:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-27  5:06 [PATCH] staging: speakup: Fix multiple assignments on a single line Frank A. Cancio Bello
2019-10-27  5:35 ` [Outreachy kernel] " Julia Lawall
2019-10-27  7:13 ` Greg KH
2019-10-27 11:10   ` Samuel Thibault
2019-10-28  2:11     ` Frank A. Cancio Bello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.