Received: by 10.223.185.116 with SMTP id b49csp20629wrg; Sat, 10 Feb 2018 01:21:13 -0800 (PST) X-Google-Smtp-Source: AH8x226dYKW9sl8FDTizHMc9oJ34C1oDpoRDCgH2P5cT9EoUVtqTSOuSj8VbWx4ORDvT5/RVxwyC X-Received: by 10.99.148.17 with SMTP id m17mr4582159pge.367.1518254472993; Sat, 10 Feb 2018 01:21:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518254472; cv=none; d=google.com; s=arc-20160816; b=Xz7aX2XEy3qAMmPI8SlRezSW6ddblchD9xI2x6WIN0HJK0116DC0rGdLHRvSA0llqK +F6BwRBKQbzJn4eyDRBAdW2/4RuWnDb/eOJu6PEDiSM5ZHhX1HWQW4gLGLvRqL3qDqst cNCJdMybj8AbJ1X6d9L7T5lQCYfNyuyuRGW+PV9XlgjV56VFLyiiEDgZD/bBsgxWUjBP HTJZbB3YWF4IL0NuMaVUcX2KpH8tYIj2Ns5nH86UMxOd09JeSGCR9Suf2MJaj/4Y+rl6 pB4V8V5bXdUC/4lAGew3eo/Hlk7h7Tv5QYW0HR4imoyLgCP9MJR+daf3qOA2VtspzE77 MeUA== 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=f4o62dU4Z4gohyBypxR71n0hWTDhlS88wj8phzaDZ+E=; b=N6/twI2v/zgxV9+A4/9zGVtpI8CvQda+ifY1z8Rw+ujBC5E0RAZuwv+r2wDwfSsk9W /kFEueDj2sDhpBh/t6+Xybip+t4SIQ46BlkU4UyQnk7K3KwgLM73vmz/0p6mrE9Wxz7P flrGnqGdUdnsYNOkrtTI6HnisHL1xJ0+eb+l6Gwx9jiSXpml1AMVj4v0wAhobywAP+Ol CYJrxGLqZSxyub5siCkauSeYhdgdEDK8WxpYUBffvrB7yx4cUex6CHXJU2LMi4dXB3lt Jm/TOLLMZ9cHLbi1ZfY0aOahgLgZggEtgg5pzbI7yknqwWdYAqMbfBJo8FuSaCVI25Mq K1XQ== 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 o15si2545330pgc.48.2018.02.10.01.20.59; Sat, 10 Feb 2018 01:21:12 -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 S1752275AbeBJJUJ (ORCPT + 99 others); Sat, 10 Feb 2018 04:20:09 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:40480 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbeBJJUI (ORCPT ); Sat, 10 Feb 2018 04:20:08 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id w1A9K3TS020419; Sat, 10 Feb 2018 10:20:03 +0100 Date: Sat, 10 Feb 2018 10:20:03 +0100 From: Willy Tarreau To: Miguel Ojeda Cc: Geert Uytterhoeven , linux-kernel , Robert Abel Subject: Re: [PATCH 1/3] auxdisplay: charlcd: fix hex literal ranges for graphics command Message-ID: <20180210092003.GA20377@1wt.eu> References: <20180209235012.4993-1-rabel@robertabel.eu> <20180209235012.4993-2-rabel@robertabel.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Miguel, On Sat, Feb 10, 2018 at 09:58:44AM +0100, Miguel Ojeda wrote: > On Sat, Feb 10, 2018 at 12:50 AM, Robert Abel wrote: > > The graphics command expects 16 hexadecimal literals, but would allow characters in range [0-9a-zA-Z] instead of [0-9a-fA-F]. > > > > Signed-off-by: Robert Abel > > --- > > drivers/auxdisplay/charlcd.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c > > index 642afd88870b..324d02f9f1c5 100644 > > --- a/drivers/auxdisplay/charlcd.c > > +++ b/drivers/auxdisplay/charlcd.c > > @@ -441,9 +441,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd) > > shift ^= 4; > > if (*esc >= '0' && *esc <= '9') { > > value |= (*esc - '0') << shift; > > - } else if (*esc >= 'A' && *esc <= 'Z') { > > + } else if (*esc >= 'A' && *esc <= 'F') { > > value |= (*esc - 'A' + 10) << shift; > > - } else if (*esc >= 'a' && *esc <= 'z') { > > + } else if (*esc >= 'a' && *esc <= 'f') { > > Willy, Geert: this seems obvious, but do you know if the broader range > was intended for some reason? No, I think it was simply a brain fart from me 14 years ago, as I can find it as well in the original 0.9.0 patch for kernel 2.4! Ack from me on this patch. Willy