All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zoltan Kelemen <zoltan@digisec.se>
To: willy@meta-x.org, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] staging:panel: Fix cursor positioning escapes
Date: Thu, 28 Jun 2012 22:58:53 +0200	[thread overview]
Message-ID: <4FECC58D.2030904@digisec.se> (raw)

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: panel-patch3 --]
[-- Type: text/plain, Size: 1064 bytes --]

Patch for fixing bug in cursor position escape handling. The bug was introduced
when simple_strtoul was converted to kstrtoul without taking into account that
the end pointer is used to continue the parsing. Reverted the code back to
simple_strtoul.

This patch depends on patch 2 and should therefore be applied after it.

Signed-off-by: Zoltan Kelemen <zoltan@digisec.se>
----
diff -ru linux-next/drivers/staging/panel/panel.c panel-patch3/drivers/staging/panel/panel.c
--- linux-next/drivers/staging/panel/panel.c	2012-06-28 13:10:37.274466384 +0200
+++ panel-patch3/drivers/staging/panel/panel.c	2012-06-28 13:42:22.514445057 +0200
@@ -1228,14 +1228,16 @@
 			break;
 
 		while (*esc) {
+			char *endp;
+
 			if (*esc == 'x') {
 				esc++;
-				if (kstrtoul(esc, 10, &lcd_addr_x) < 0)
-					break;
+				lcd_addr_x = simple_strtoul(esc, &endp, 10);
+				esc = endp;
 			} else if (*esc == 'y') {
 				esc++;
-				if (kstrtoul(esc, 10, &lcd_addr_y) < 0)
-					break;
+				lcd_addr_y = simple_strtoul(esc, &endp, 10);
+				esc = endp;
 			} else
 				break;
 		}

                 reply	other threads:[~2012-06-28 20:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FECC58D.2030904@digisec.se \
    --to=zoltan@digisec.se \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@meta-x.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.