Received: by 10.223.185.116 with SMTP id b49csp1318707wrg; Wed, 14 Feb 2018 15:19:45 -0800 (PST) X-Google-Smtp-Source: AH8x227ze4EbWpHCkq73UAaSQfnPUXRb4QxE9KQlwJphAjlmwlkkPimf6CXp+bqUai0ubIdA4OpF X-Received: by 10.99.96.146 with SMTP id u140mr523076pgb.211.1518650385043; Wed, 14 Feb 2018 15:19:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518650385; cv=none; d=google.com; s=arc-20160816; b=nXm+VyTpUG+7i5/N3Twsvd1AoKUUhg7dLf2XjrzHqvYmiYmO6qGGXx5OYDlr//yPb7 jyMijYWEZTqsbqCQlBuUrdOJoE1xAdxMoU+WG5iycymJYgyFB9KM91tuWgHb4snNxUyc qKmfia3kRgzCOXTEo7DuhlaG1/JGP8w3K4nIDu62GJXjiEP7BhEBCqkNrOQicEuiZCrj cQeaauZnfDghDuewGOGkNHa1eLKobaT083Z5Dnxe80s1Tg99ASHGLgI1TIxjQDzJegxo No1igxKOfOg4qTC8bodvP88yWHrJkzo7iqqC8WQIXzzPai3oERvkR2KjGhofVpPkhvzU jyag== 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=5lkETatiDy8CZRldsze4yFJRnU1VEcdqk5GY1jzFLmw=; b=IspfTM0QeyM1LW0qTU004Zh6wjEg1emaqHfw0xQfdhkur706M3S0sw8EyKbDhTnyyx oLvPDWA1eX0fiR+6qJ6D++hfPqihOM44EW+lximQfim7GBq2DUbVLY9Luiugwa78jOqK PU4AKmCUjA1ADZB3n8q6DHNyA1Pq/Lg1OzBqpK6xkqGZTqmeBQit4W9fRlVbxn4KOVNL qrDt58Rq3d5KdywaJ5s7zCu2DFZeTVIL29dusZ/cUZMwctGzpDh8DqSSpj7gGhvJaeB7 DiQHTdIe/nSoPvu2YHmcffcPivxCRzLwp1BXYoLfsRaAZq8LCzqxut4KHRbx6ocEphls 0bUw== 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 q67si650355pfg.143.2018.02.14.15.19.30; Wed, 14 Feb 2018 15:19:44 -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 S1032064AbeBNXSB (ORCPT + 99 others); Wed, 14 Feb 2018 18:18:01 -0500 Received: from mxf98a.netcup.net ([46.38.249.138]:40456 "EHLO mxf98a.netcup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031971AbeBNXR7 (ORCPT ); Wed, 14 Feb 2018 18:17:59 -0500 Received: from [192.168.178.21] (x4d071627.dyn.telefonica.de [77.7.22.39]) by mxf98a.netcup.net (Postfix) with ESMTPSA id EBE921409D3; Thu, 15 Feb 2018 00:17:57 +0100 (CET) Authentication-Results: mxf98a; spf=pass (sender IP is 77.7.22.39) smtp.mailfrom=rabel@robertabel.eu smtp.helo=[192.168.178.21] Received-SPF: pass (mxf98a: connection is authenticated) Subject: Re: [PATCH 1/3] auxdisplay: charlcd: fix hex literal ranges for graphics command To: Andy Shevchenko , Miguel Ojeda Cc: Willy Tarreau , Geert Uytterhoeven , linux-kernel References: <20180209235012.4993-1-rabel@robertabel.eu> <20180209235012.4993-2-rabel@robertabel.eu> <20180210092003.GA20377@1wt.eu> From: Robert Abel Message-ID: Date: Thu, 15 Feb 2018 00:17:55 +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: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <20180214231758.5400.16872@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 On 13 Feb 2018 14:36, Andy Shevchenko wrote: > I understand that we have a huge and hopefully nice library in the > kernel, but the question still the same, what prevents a developer or > maintainer to look at it from time to time? > > For, I dare to say, ages we have hex_to_bin() and hex2bin(). > Can we use it? hex_to_bin look fine to me, although personally I'm not a big fan of its use of tolower. The current parser implementation is much more lenient than hex2bin, however. hex2bin won't parse strings containing illegal characters (which are currently skipped) or hexadecimal strings with an odd number of digits (which are currently allowed and the final digit will be ignored). I noticed the only part of the code that does make use of library functions, parsing x and y coordinates using kstrtoul, is broken. Apparently it used to use simple_strtoul, which worked and then got replaced. So apparently looking over the kernel lib from time to time can also do some harm ;) Patch incoming :) Regards, Robert