Received: by 10.223.185.116 with SMTP id b49csp5542716wrg; Tue, 27 Feb 2018 15:30:41 -0800 (PST) X-Google-Smtp-Source: AG47ELtZIOuRgt8yxPFAuonSyv6bV0vC4oYZoPbOisgxKHK0EktLDijofwj0MQaQBetHifPAtmj3 X-Received: by 2002:a17:902:3041:: with SMTP id u59-v6mr11785956plb.115.1519774241680; Tue, 27 Feb 2018 15:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519774241; cv=none; d=google.com; s=arc-20160816; b=OWH9c5dTaDFsoa5cgc8LzmHUnjKexlWma7B76k0FRgD4vmH6v1cZdU9Hq/y21fgSzG rT7CtxW2WLfJ7qbLLbKGbNKra7c68kNaYPZxbYPaTBOb6i2zWpb3E8nB0RnVHGSBeSeS rSLa+at8hDN8HOx05l6otXClgx5wfoxJkF0QgXAaDT1LYmo/HepoUu5aEdhkDAPJwymC m0ZLe2jk5QzGtEpRKiurbhI5pRgSlfuGcBjOWqdXwbn/INWx0JtKMJA35D+/7DBT0miR liQE7Mnb0nTNlLdUze3CxHJ8Azg/7E53yQZmFL9tvbCSZXJXKJODnutobJ4SpJuu9OAN uFkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=EDmdFCo1gsKfX8T4+sua07T+wSIGu7GG1XS2lD9AyQg=; b=uvfQiKqcMasOOvRmgkMqWqiSLw+Xspobn2pQfw3P2PtDwirIbEL1OS/WAV3L82Lw2h ejJ6t/fM6HDtl8FB8EIQAatzpNscCPc4T8EA3n2oniA9dqNnNG7A1QQYqIG29NHwig1r ZceNGrdSJmi9xe+3isNZOQW9HqcpvBgFIKE9MQ/AIg93ebipbmNqkQ5hTYrwCZoWUrjI IN86OIVVb4oFjTOaWpEIhyxLB5Vks2JhMfbl/dqdTRpfDJvN4EvWuxXWG+Pq07haUjFW WJ1XogefrktYSJpu2ez8HNB5K94ACxTLSiWNBI7oLoPSAQ/O46mZM3dSqAHC3ZKiuMU8 zD3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d70si125402pfj.238.2018.02.27.15.30.26; Tue, 27 Feb 2018 15:30:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbeB0X3l (ORCPT + 99 others); Tue, 27 Feb 2018 18:29:41 -0500 Received: from mxf98a.netcup.net ([46.38.249.138]:57697 "EHLO mxf98a.netcup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554AbeB0X3k (ORCPT ); Tue, 27 Feb 2018 18:29:40 -0500 Received: from [192.168.178.21] (xd93227ee.dyn.telefonica.de [217.50.39.238]) by mxf98a.netcup.net (Postfix) with ESMTPSA id 675F81409B7; Wed, 28 Feb 2018 00:29:39 +0100 (CET) Authentication-Results: mxf98a; spf=pass (sender IP is 217.50.39.238) smtp.mailfrom=rabel@robertabel.eu smtp.helo=[192.168.178.21] Received-SPF: pass (mxf98a: connection is authenticated) Subject: Re: [PATCH 3/4] auxdisplay: charlcd: fix x/y address commands To: Willy Tarreau Cc: Miguel Ojeda , linux-kernel , Geert Uytterhoeven , Andy Shevchenko References: <9ec3c54c-f8fe-22d7-783e-8cf9862405bb@robertabel.eu> <20180225235432.31209-1-rabel@robertabel.eu> <20180225235432.31209-2-rabel@robertabel.eu> <20180225235432.31209-3-rabel@robertabel.eu> <20180225235432.31209-4-rabel@robertabel.eu> <50a2fd51-8bdb-d2b7-c2b3-7df638fdedde@robertabel.eu> <20180227051905.GA26781@1wt.eu> From: Robert Abel Message-ID: <911beeb5-529f-09bb-0e5a-c5b626adba60@robertabel.eu> Date: Wed, 28 Feb 2018 00:29:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180227051905.GA26781@1wt.eu> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <20180227232939.5785.60843@mxf98a.netcup.net> X-PPP-Vhost: robertabel.eu Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Willy, On 27 Feb 2018 06:19, Willy Tarreau wrote: > Well actually I don't see a problem there at all. The principle is simply > to accept any sequence assigning x or y or both. If you write x4y2x6, it > simply means that you changed your mind regarding x and that the last > value (6) is the one you want. Just as if you wrote "^[[Lx4;^[[y2;^[[x6;". > The while loop doesn't even try to do anything clever, it simply parses > everything matching x and y followed by digits. I think the only reason > for having both x and y processed in the same loop was to call > charlcd_gotoxy() only once for both axes. I didn't say it is a problem. It is however an edge case that incurs a lot of code for little to no functionality. I'd much prefer if we broke backwards compatibility here and actually only parse the format that is indicated in the comment: > case 'x': /* gotoxy : LxXXX[yYYY]; */ > case 'y': /* gotoxy : LyYYY[xXXX]; */ > Exactly one x command followed exactly by zero or one y command or vice-versa. If somebody changes their mind during the escape sequence, they can just issue a new one instead of appending to the current one. I'll post an example patch. Regards, Robert