Received: by 10.223.185.116 with SMTP id b49csp5741895wrg; Tue, 27 Feb 2018 20:22:35 -0800 (PST) X-Google-Smtp-Source: AG47ELsvZHIfLKy9PJMFDr9DldulI2LFtnKWJXU2HaAf4Vp8341gFjJNdi7+sIcdxC5i/l87z4Tg X-Received: by 2002:a17:902:7612:: with SMTP id k18-v6mr9587913pll.397.1519791755053; Tue, 27 Feb 2018 20:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519791755; cv=none; d=google.com; s=arc-20160816; b=UOnWHSWC5y8dFriJe0G/SO/IRR5ONJnT3o8HSkGvbg6n0/b50eHMrxp4XzMRaIoZJ7 vGySz+BK1hJ99xz86qXsb/I9kBc5/LvmfEmqmkl+tlYLqhXvX1cF6EHHmvXX3Le6WDRB S+U0YnI2o6tHfkCjmzYqYUb3UTnbeGhT0oP27c9mfWhwl93feBj5uW/iWxvyEbo5t4OF 5vAMg3EVMbIqp2l3lSr72/wrPXy+3E2zxizgy9s5X41wZeY081bQXo/LIjCKNlZdiFE+ 3YV5X1RsdXmN6+FWz5Qq1+OKLOzIakJ9ovGaoqklcn63xrufrvLZrMSwUw0rLta6xtuV VeEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=CwJQP/YDVLHV/w1mJSaRrH3PcyfZWnvHi+OaOtin5xY=; b=KMNHBXnd+q5W+49Ix8a2WJCrGZMCH3wbqCPtf1w1azNmM8jRx3lpOj1LoPLZKSX3cZ 0Ok+LowBkFmyH+2Qi/YOF67miPBOG6QGcnWl3sDntD/fPyM+a64tlce5kRd4Re+AyNNW p0TtKoZlPRwPGucEaurRaTMVPQq9ph5fGa4FKaPywim9HVYE92YfwUCYPxnq2inpNhkM nS90NkALpD3fw5EOqpzc1jWwal0q03K9um19va/+XB+98VUymL//NkW/SVUrIRAAfHzD AsFlmvwbP7qv6NBjlyEvQhpf20KgVErgUW5Mn5dXAQzNa+AwjGQK9Cl+UjK3/u9nS97H xNwA== 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 e6-v6si623776plt.123.2018.02.27.20.22.18; Tue, 27 Feb 2018 20:22:35 -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 S1751824AbeB1EVk (ORCPT + 99 others); Tue, 27 Feb 2018 23:21:40 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:40994 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbeB1EVj (ORCPT ); Tue, 27 Feb 2018 23:21:39 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id w1S4LYhY027823; Wed, 28 Feb 2018 05:21:34 +0100 Date: Wed, 28 Feb 2018 05:21:34 +0100 From: Willy Tarreau To: Robert Abel Cc: Miguel Ojeda , linux-kernel , Geert Uytterhoeven , Andy Shevchenko Subject: Re: [PATCH 3/4] auxdisplay: charlcd: fix x/y address commands Message-ID: <20180228042134.GA27815@1wt.eu> 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> <911beeb5-529f-09bb-0e5a-c5b626adba60@robertabel.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <911beeb5-529f-09bb-0e5a-c5b626adba60@robertabel.eu> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robert, On Wed, Feb 28, 2018 at 12:29:38AM +0100, Robert Abel wrote: > 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. I'm sorry but I think that your patch has simply proven that your point above doesn't stand. Adding 90 lines of code full of strchr, strpbrk and memcpy to replace 12 trivial lines, while possibly breaking compatibility isn't considered an improvement. Reducing code is an improvement, multiplying it by 7 is not, it adds maintenance burden for no benefit. Let's stick to Miguel's last version. At least now we know that the alternatives are worse, which is great. Thanks, Willy