Received: by 10.223.185.116 with SMTP id b49csp34743wrg; Sat, 10 Feb 2018 01:43:02 -0800 (PST) X-Google-Smtp-Source: AH8x227gZp2X7QQZ3UpX31nBtLQijCUYKVOmgRXjwSqWL7J5dchx+ZuiBK6ci/4I5oaIwNLCe7F0 X-Received: by 10.98.12.144 with SMTP id 16mr5644892pfm.147.1518255781913; Sat, 10 Feb 2018 01:43:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518255781; cv=none; d=google.com; s=arc-20160816; b=OYqbcV9Vpn9JoarKGHznIeeag6bqerFSkuK1y/hxgWpubHnUMbD8jiVn5FlHds8Bl1 F2mHmeazAAGoNrVMPeH0FIGiZ3xFTWqpmuy3fKxlGDJbRGAez6dsxcHTeV2MRaDwaq3v nZp0z7Kb0u7scEh8ukO/6+xoaZIQ74kiATvrtvQbRjAjrZpXjAdwPIxyysVwB/Q3R6Tk a00M5aw9mMtSYx8hQrDFs7Z779qHqj4nuj5W+FeksY48DygI8oZZVO7c+wdqYNl7/OVp L5xjJ6wUlXSp+KmpMU7rr03+3G8NLtJLXPcvjKRWjatFfvTgv86VCieEkbais5p0P/z8 6A2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=RwxZ5MMUdVX3NQKolu1oIYv/m9fkj0vXtHKyI7sUEl0=; b=SMMZzSBVycQoQXbAl14Tm16Sk91j5zUaNTYvnWYy+0bbGc+B/hTCG6dRjJvLcklf6S hFb+s+BnxnzC8qgc13udNHbXPF+ce9IMjJ+FOgyKAlro/wEoTrqoeYhfT4ThCXBtrj+r X0ENPYMpMlQyIq77BYfDLkxNcWuxo58HmaQzcvIPfvGkn+r/VC0IeGxi3WopRmasWxEK Qhdok32a5Snu6zQvoM9yJQQPZ6HlQPV7lAQMY3y92QCsaxEe/w151iZ6u077BHwuRxAZ Gyka8h8WanGGjdWgBn0/zoGw8ocHMq0qSTdhI1SIYX2INGh1qNJaD8qh3hPWfczkaNrp wSkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XkPVt3HO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si2558035pgs.97.2018.02.10.01.42.37; Sat, 10 Feb 2018 01:43:01 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XkPVt3HO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751028AbeBJJlg (ORCPT + 99 others); Sat, 10 Feb 2018 04:41:36 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:44040 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbeBJJlf (ORCPT ); Sat, 10 Feb 2018 04:41:35 -0500 Received: by mail-qk0-f196.google.com with SMTP id n188so13027386qkn.11 for ; Sat, 10 Feb 2018 01:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RwxZ5MMUdVX3NQKolu1oIYv/m9fkj0vXtHKyI7sUEl0=; b=XkPVt3HO0+6tBhjPuQW6NVIDTZLVIWbBrseBPpitmii6rgBH9LTuq/fmPz/qbHlEpX hNfaNUbnBWv2g2ZfRs72cO2AowLE8rmcHwUBHcWrHcjriGLxiQ60I8vB5bp2ZBr1CsFo t84HnBUKhXqclB3lZmGlsL566mhjtJTBjMKm4f+Stcx/01dpTv5Do26uQHPr405nK1kk qTuvLFd3+5uxjmHvl8GyQ2a1sVhVH53mZT4thdh6xL15zmDQjzdVGadpXFzDoGoSS9Ks vDukATQAfSJt7ZrrmEe3JiDVQl6OtjbpsumcdADWVbiQWvg1fMxzGHerwneKsnIr8sOc qqhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RwxZ5MMUdVX3NQKolu1oIYv/m9fkj0vXtHKyI7sUEl0=; b=qdiBu90twUCzxrpjHaFh/J9bnc4kaFfRYNY3XDrhjfohrvjo4yQpkZ3Vp59pfFZCdb WjZtmcyRaDqknyMvkjHa3QxnGSsa8yMoM9vGCTKrbtaNzDEtW4LZlHsMvtswiece+z3a q/Ep+rxSwSMnBTzUx61e7O/gQ1S44wUhS2T1ZDfaz98OG0BXM6dxkOv0MmlJSB70T1/h DR2NEhQ27vRisb5ziVSVHjyDK0wZcb8jSA86SxorHDIrVyj/NsuJ/lnJecfqvME220xC ZkrxahV/oqh0VBwQwpbiXVZ7Whtm4O1pd3sMv6rJ2SXJUL2JOtlPnhpWkBNo2aEmA9TM /nbw== X-Gm-Message-State: APf1xPDtjV4qqRuEJhj+tE3nlmmaOBySs37kxWD4twNGxSKozCoUB9h7 o8QUlQE5K9Tdd1MvPfplnWPbXZjcCXD1Y4T0HGHhPQ== X-Received: by 10.55.131.198 with SMTP id f189mr8244529qkd.250.1518255695045; Sat, 10 Feb 2018 01:41:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.26.7 with HTTP; Sat, 10 Feb 2018 01:41:34 -0800 (PST) In-Reply-To: <20180210092003.GA20377@1wt.eu> References: <20180209235012.4993-1-rabel@robertabel.eu> <20180209235012.4993-2-rabel@robertabel.eu> <20180210092003.GA20377@1wt.eu> From: Miguel Ojeda Date: Sat, 10 Feb 2018 10:41:34 +0100 Message-ID: Subject: Re: [PATCH 1/3] auxdisplay: charlcd: fix hex literal ranges for graphics command To: Willy Tarreau Cc: Geert Uytterhoeven , linux-kernel , Robert Abel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 10, 2018 at 10:20 AM, Willy Tarreau wrote: > 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. Thanks Willy for the quick answer! Then: Compile-tested. Signed-off-by: Miguel Ojeda > > Willy