This is a note to let you know that I've just added the patch titled parisc/sticon: fix reverse colors to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: parisc-sticon-fix-reverse-colors.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From bec05f33ebc1006899c6d3e59a00c58881fe7626 Mon Sep 17 00:00:00 2001 From: Sven Schnelle <svens@xxxxxxxxxxxxxx> Date: Sun, 14 Nov 2021 17:08:17 +0100 Subject: parisc/sticon: fix reverse colors From: Sven Schnelle <svens@xxxxxxxxxxxxxx> commit bec05f33ebc1006899c6d3e59a00c58881fe7626 upstream. sticon_build_attr() checked the reverse argument and flipped background and foreground color, but returned the non-reverse value afterwards. Fix this and also add two local variables for foreground and background color to make the code easier to read. Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Helge Deller <deller@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/video/console/sticon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -316,13 +316,13 @@ static unsigned long sticon_getxy(struct static u8 sticon_build_attr(struct vc_data *conp, u8 color, u8 intens, u8 blink, u8 underline, u8 reverse, u8 italic) { - u8 attr = ((color & 0x70) >> 1) | ((color & 7)); + u8 fg = color & 7; + u8 bg = (color & 0x70) >> 4; - if (reverse) { - color = ((color >> 3) & 0x7) | ((color & 0x7) << 3); - } - - return attr; + if (reverse) + return (fg << 3) | bg; + else + return (bg << 3) | fg; } static void sticon_invert_region(struct vc_data *conp, u16 *p, int count) Patches currently in stable-queue which might be from svens@xxxxxxxxxxxxxx are queue-4.4/parisc-kgdb-add-kgdb_roundup-to-make-kgdb-work-with-.patch queue-4.4/parisc-fix-warning-in-flush_tlb_all.patch queue-4.4/parisc-sticon-fix-reverse-colors.patch queue-4.4/parisc-entry-fix-trace-test-in-syscall-exit-path.patch