summaryrefslogtreecommitdiff
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2022-06-07 13:49:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-10 14:37:01 +0300
commitad8a2142ba57212b73e614d5d86160a9c0ff8617 (patch)
treee44ace4f08d83f2da7d198805817a5c8bdd0f41c /drivers/tty/vt
parente16cb6fe315821ef3148fa83892adca1f2a2e35a (diff)
downloadlinux-ad8a2142ba57212b73e614d5d86160a9c0ff8617.tar.xz
tty/vt: consolemap: use | for binary addition
Unicode letters are composed as a bit shifts and sums of three values. Use "|" and not "+" for these bit operations. The former is indeed more appropriate. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220607104946.18710-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/consolemap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index f97081e01b71..016c1a0b4290 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -265,7 +265,7 @@ static void set_inverse_trans_unicode(struct vc_data *conp,
glyph = p2[k];
if (glyph >= 0 && glyph < MAX_GLYPH
&& q[glyph] < 32)
- q[glyph] = (i << 11) + (j << 6) + k;
+ q[glyph] = (i << 11) | (j << 6) | k;
}
}
}
@@ -788,7 +788,7 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct uni
continue;
if (ect < ct) {
unilist[ect].unicode =
- (i<<11)+(j<<6)+k;
+ (i<<11) | (j<<6) | k;
unilist[ect].fontpos = *p2;
}
ect++;