lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200921144645.2061313-28-poeschel@lemonage.de>
Date:   Mon, 21 Sep 2020 16:46:39 +0200
From:   poeschel@...onage.de
To:     Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>,
        linux-kernel@...r.kernel.org (open list)
Cc:     Lars Poeschel <poeschel@...onage.de>
Subject: [PATCH v2 27/32] auxdisplay: remove naive display clear impl

From: Lars Poeschel <poeschel@...onage.de>

Remove the naive (character after character from upper left to lower
right) display clear implementation in charlcd_clear_fast. It was a
fallback and we fall back to using the clear_display implementation
instead.

Signed-off-by: Lars Poeschel <poeschel@...onage.de>
---
 drivers/auxdisplay/charlcd.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index ef448c42abbd..0137e741c5bb 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -127,21 +127,13 @@ static void charlcd_print(struct charlcd *lcd, char c)
 
 static void charlcd_clear_fast(struct charlcd *lcd)
 {
-	int x, y;
-
 	if (lcd->ops->clear_fast)
 		lcd->ops->clear_fast(lcd);
-	else {
-		for (y = 0; y < lcd->height; y++) {
-			lcd->addr.x = 0;
-			lcd->addr.y = y;
-			lcd->ops->gotoxy(lcd);
-			for (x = 0; x < lcd->width; x++)
-				lcd->ops->print(lcd, ' ');
-		}
+	else
+		lcd->ops->clear_display(lcd);
 
-		lcd->ops->home(lcd);
-	}
+	lcd->addr.x = 0;
+	lcd->addr.y = 0;
 }
 
 /*
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ