All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frank A. Cancio Bello" <frank@generalsoftwareinc.com>
To: gregkh@linuxfoundation.org
Cc: William Hubbs <w.d.hubbs@gmail.com>,
	Chris Brannon <chris@the-brannons.com>,
	Kirk Reiser <kirk@reisers.ca>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	outreachy-kernel@googlegroups.com,
	saiprakash.ranjan@codeaurora.org, joel@joelfernandes.org
Subject: [PATCH] staging: speakup: Fix multiple assignments on a single line
Date: Sun, 27 Oct 2019 05:06:40 +0000	[thread overview]
Message-ID: <20191027050640.GA24283@linux-kernel-dev> (raw)

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



             reply	other threads:[~2019-10-27  5:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27  5:06 Frank A. Cancio Bello [this message]
2019-10-27  5:35 ` [Outreachy kernel] [PATCH] staging: speakup: Fix multiple assignments on a single line 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191027050640.GA24283@linux-kernel-dev \
    --to=frank@generalsoftwareinc.com \
    --cc=chris@the-brannons.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=kirk@reisers.ca \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=saiprakash.ranjan@codeaurora.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=w.d.hubbs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.