Commit 3315f1aa authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

tty/vt: consolemap: saner variable names in con_copy_unimap()

The function uses too vague variable names like i, j, k for iterators, p,
q, p1, p2 for pointers etc.

Rename all these, so that it is clear what is going on:
- dict: for dictionaries.
- d, r, g: for dir, row, glyph iterators -- these are unsigned now.
- dir, row: for directory and row pointers.
- glyph: for the glyph.
- and so on...

This is a lot of shuffling, but the result pays off, IMO.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-27-jslaby@suse.czSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 447e9a7c
...@@ -750,16 +750,16 @@ EXPORT_SYMBOL(con_set_default_unimap); ...@@ -750,16 +750,16 @@ EXPORT_SYMBOL(con_set_default_unimap);
*/ */
int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc) int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
{ {
struct uni_pagedict *q; struct uni_pagedict *src;
if (!*src_vc->vc_uni_pagedir_loc) if (!*src_vc->vc_uni_pagedir_loc)
return -EINVAL; return -EINVAL;
if (*dst_vc->vc_uni_pagedir_loc == *src_vc->vc_uni_pagedir_loc) if (*dst_vc->vc_uni_pagedir_loc == *src_vc->vc_uni_pagedir_loc)
return 0; return 0;
con_free_unimap(dst_vc); con_free_unimap(dst_vc);
q = *src_vc->vc_uni_pagedir_loc; src = *src_vc->vc_uni_pagedir_loc;
q->refcount++; src->refcount++;
*dst_vc->vc_uni_pagedir_loc = q; *dst_vc->vc_uni_pagedir_loc = src;
return 0; return 0;
} }
EXPORT_SYMBOL(con_copy_unimap); EXPORT_SYMBOL(con_copy_unimap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment