public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] tty: vt: remove vc_uniscr_debug_check()
@ 2023-01-12  8:01 Jiri Slaby (SUSE)
  2023-01-12  8:01 ` [PATCH 02/11] tty: vt: drop get_vc_uniscr() Jiri Slaby (SUSE)
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-01-12  8:01 UTC (permalink / raw)
  To: gregkh; +Cc: Kees Cook, linux-serial, linux-kernel, Jiri Slaby (SUSE)

VC_UNI_SCREEN_DEBUG is always defined as 0, so this code is never
executed. Drop it along with VC_UNI_SCREEN_DEBUG.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
 drivers/tty/vt/vt.c | 40 ----------------------------------------
 1 file changed, 40 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 981d2bfcf9a5..4b804665c51f 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -323,8 +323,6 @@ void schedule_console_callback(void)
 #define get_vc_uniscr(vc) vc->vc_uni_screen
 #endif
 
-#define VC_UNI_SCREEN_DEBUG 0
-
 typedef uint32_t char32_t;
 
 /*
@@ -580,43 +578,6 @@ void vc_uniscr_copy_line(const struct vc_data *vc, void *dest, bool viewed,
 	}
 }
 
-/* this is for validation and debugging only */
-static void vc_uniscr_debug_check(struct vc_data *vc)
-{
-	struct uni_screen *uniscr = get_vc_uniscr(vc);
-	unsigned short *p;
-	int x, y, mask;
-
-	if (!VC_UNI_SCREEN_DEBUG || !uniscr)
-		return;
-
-	WARN_CONSOLE_UNLOCKED();
-
-	/*
-	 * Make sure our unicode screen translates into the same glyphs
-	 * as the actual screen. This is brutal indeed.
-	 */
-	p = (unsigned short *)vc->vc_origin;
-	mask = vc->vc_hi_font_mask | 0xff;
-	for (y = 0; y < vc->vc_rows; y++) {
-		char32_t *line = uniscr->lines[y];
-		for (x = 0; x < vc->vc_cols; x++) {
-			u16 glyph = scr_readw(p++) & mask;
-			char32_t uc = line[x];
-			int tc = conv_uni_to_pc(vc, uc);
-			if (tc == -4)
-				tc = conv_uni_to_pc(vc, 0xfffd);
-			if (tc == -4)
-				tc = conv_uni_to_pc(vc, '?');
-			if (tc != glyph)
-				pr_err_ratelimited(
-					"%s: mismatch at %d,%d: glyph=%#x tc=%#x\n",
-					__func__, x, y, glyph, tc);
-		}
-	}
-}
-
-
 static void con_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
 		enum con_scroll dir, unsigned int nr)
 {
@@ -2959,7 +2920,6 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
 			goto rescan_last_byte;
 	}
 	con_flush(vc, &draw);
-	vc_uniscr_debug_check(vc);
 	console_conditional_schedule();
 	notify_update(vc);
 	console_unlock();
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-01-12 10:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-12  8:01 [PATCH 01/11] tty: vt: remove vc_uniscr_debug_check() Jiri Slaby (SUSE)
2023-01-12  8:01 ` [PATCH 02/11] tty: vt: drop get_vc_uniscr() Jiri Slaby (SUSE)
2023-01-12  8:41   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 03/11] tty: vt: remove reference to undefined NO_VC_UNI_SCREEN Jiri Slaby (SUSE)
2023-01-12  8:44   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 04/11] tty: vt: use sizeof(*variable) where possible Jiri Slaby (SUSE)
2023-01-12  8:58   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 05/11] tty: vt: remove char32_t typedef Jiri Slaby (SUSE)
2023-01-12  8:52   ` Ilpo Järvinen
2023-01-12  9:34   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 06/11] tty: vt: remove struct uni_screen Jiri Slaby (SUSE)
2023-01-12  9:42   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 07/11] tty: vt: replace BUG_ON() by WARN_ON_ONCE() Jiri Slaby (SUSE)
2023-01-12  9:42   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 08/11] tty: vt: simplify some unicode conditions Jiri Slaby (SUSE)
2023-01-12  9:52   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 09/11] tty: vt: separate array juggling to juggle_array() Jiri Slaby (SUSE)
2023-01-12 10:15   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 10/11] tty: vt: saner names for more scroll variables Jiri Slaby (SUSE)
2023-01-12  9:59   ` Ilpo Järvinen
2023-01-12  8:01 ` [PATCH 11/11] tty: vt: cache row count in con_scroll() Jiri Slaby (SUSE)
2023-01-12 10:00   ` Ilpo Järvinen
2023-01-12  8:43 ` [PATCH 01/11] tty: vt: remove vc_uniscr_debug_check() Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox