Skip to contentSkip to conversation

staging: speakup: main: switch multiple assignment for one assignment per line

PATCH In review Lourdes Pedrajas 2 participants 2 messages Mar 15, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: speakup: main: switch multiple assignment for one assignment per line

One assignment per line is preferred, instead of multiple assignments. To make it more readable.
Issue found with checkpatch.

---
Changes since v1:
- log and code corections

 drivers/staging/speakup/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/speakup/main.c +2 -1
index 488f2539aa9a..5c47643b302c 100644
@@ -2117,7 +2117,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];
+		value = pad_chars[value];
+		spk_lastkey = value;
 		spk_keydown++;
 		spk_parked &= 0xfe;
 		goto no_map;
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw

Lourdes Pedrajas, le dim. 15 mars 2020 23:12:47 +0100, a ecrit:

Quoted 5 lines

One assignment per line is preferred, instead of multiple assignments. To make it more readable.
Issue found with checkpatch.

Thanks!

Quoted 24 lines

---
Changes since v1:
- log and code corections

 drivers/staging/speakup/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/speakup/main.c +2 -1
index 488f2539aa9a..5c47643b302c 100644
@@ -2117,7 +2117,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];
+		value = pad_chars[value];
+		spk_lastkey = value;
 		spk_keydown++;
 		spk_parked &= 0xfe;
 		goto no_map;
Signature · 1 line
2.17.1
Signature · 4 lines
Samuel
"...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and
the Ugly)."
(By Matt Welsh)