Received: by 10.223.185.116 with SMTP id b49csp4030299wrg; Mon, 26 Feb 2018 09:57:38 -0800 (PST) X-Google-Smtp-Source: AH8x225sTAh3BQafIYT4GgweVcFwlJTvTY7x2ffKk8bRTPwMdcLLzDEX9GJo5GNXaAaZSE6Z2NcZ X-Received: by 10.101.81.135 with SMTP id h7mr9287705pgq.121.1519667858491; Mon, 26 Feb 2018 09:57:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519667858; cv=none; d=google.com; s=arc-20160816; b=i2fUoBKoeb3gREa6RCXLswLYY2mlj9zX5eBBvVTPPgGf449PouFkCdl4ahM+OAzDGf uH6CMrAKgJsQy4H7GLXM8zVndhF7xCUoQ0XRMXW1z1zc6mIKiOEfYOEx4BV6GYCAI6XU bpFvAwEnksBZ3115e8ZqQMk++GlMSC5DNtycCaFa9DQeBKpt0thNaJoRuSI4bd10s0eb LLYnpPr5Q4OtppYnc6oe3y7jiiO+PPxu247alD41ygmngX19dHDRhCFzyZpblRw4FSLJ B3sYYC2dhq8XkTrVQIj25NQiRxvvkTKvDzZyaXnV2mOghfD6FZ5+qMHc4O173LN7M7Oq uxog== 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=4w0kEljsZd67DmnPIdaT0frnAoG9H+tmFYnsxDSlrd0=; b=Umtwqq/iu3IPEhO9CFtKKrwfOGcf3I8nyy6fNaG0BZXIiqDA5Z+/xZiXatgqcASm3R ASvKX2plH6GIGzHm9bLZZw3IxoARpAb4BfOTph/Nscq7xbFoQxurcty3oxLdkDJYjRrz 9+ZaWvcYLD9zT1NUT3+RYozjAedFe4cjsGByAkbcCxcQqD/6XGsWfoBZZDpTBIllQ6wD qqG+2QxuQziBgC+Hlf6C2CPIyZfqhhlUQmxDYWrbV/Xne/P6fV9+uxZ+Ozybanljz47Y bqU6te7BGE0GVfwOkz5nrgsts9bpIuJHW0x/uRd1LA5jGmv9a9kuiGVGy3ZwcQAPP5YS 1YWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dXfpuWG0; 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 d10-v6si7104549plm.539.2018.02.26.09.57.21; Mon, 26 Feb 2018 09:57:38 -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=dXfpuWG0; 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 S1751553AbeBZR4M (ORCPT + 99 others); Mon, 26 Feb 2018 12:56:12 -0500 Received: from mail-qt0-f182.google.com ([209.85.216.182]:40965 "EHLO mail-qt0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbeBZR4L (ORCPT ); Mon, 26 Feb 2018 12:56:11 -0500 Received: by mail-qt0-f182.google.com with SMTP id j4so4830569qth.8 for ; Mon, 26 Feb 2018 09:56:11 -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=4w0kEljsZd67DmnPIdaT0frnAoG9H+tmFYnsxDSlrd0=; b=dXfpuWG0KbuG3t2FoJhN/6+gq3qny/qNcen2yPFslz8kBs/AENk3QikwtPkzO98sBk jJUyJgoawpEz+ScCiZuwyPiBpC4R13iM+dAWQrPoewgg6YzkOKHsvhQUD6uIGg6LpzgK QSG47rRVvSvPrTPyP74o9mbRtoZRXNcqKse/gsPfhysHfuV5FafyEbzDyV7oZMBgacYJ klF4iKbAiqO/fQ/02Jzkr8JcAW6uMA/dO2JCJLtDoWSpDqsBwI3+8p+L0PabtVhre8CW Ot9jPyv9WlZgTLtUejPFlVb1h26woXZGFGjCE858c21e3zGkOErbR8Vx9WohoGCHZPLy PEQw== 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=4w0kEljsZd67DmnPIdaT0frnAoG9H+tmFYnsxDSlrd0=; b=TDsy8YkwfmYv0itnX8pR+Lqp1ySjzMTuo2LIy0dqZ/kh2AUTvUQYOEVlLhUONcDl2J re/vfaSAWQSkBTUs+XUvu2lW3YUC57EEwVEOSZgdRcCVZG1ABBDfmd98FW46iZSWt/1Q 4jEBlySqnB2/opWsrs/uqtsgQFzHA9UuK1GcSRcHSy2A6xPwa8Va+RVjfDJKC2Drqz9w BlWg8HZLuFfa0JkEckojhDrEMjiR5WhNhWbHdtvcJs2RYrDWgNh3jWMHkCvgwKNAabI7 cN3Dy/Q6I6xvuRaKhSej0zSct9uQ7FJxegGswrTFkwTy+Mgp8HfIYyqPwF118tjDIoNF uKnQ== X-Gm-Message-State: APf1xPDUQoM0gYtZdwQtdryf63IW3GioPsrJ4yjMfHlr9lxnf8OQY+DF ZKA5WnQqrlxxJIqrp5sx9of9z3grxiYz4R+y/Zc= X-Received: by 10.237.61.145 with SMTP id i17mr18072903qtf.293.1519667770800; Mon, 26 Feb 2018 09:56:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.80 with HTTP; Mon, 26 Feb 2018 09:56:10 -0800 (PST) In-Reply-To: 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> From: Andy Shevchenko Date: Mon, 26 Feb 2018 19:56:10 +0200 Message-ID: Subject: Re: [PATCH 3/4] auxdisplay: charlcd: fix x/y address commands To: Miguel Ojeda Cc: Robert Abel , linux-kernel , Willy Tarreau , Geert Uytterhoeven 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 Mon, Feb 26, 2018 at 7:26 PM, Miguel Ojeda wrote: > On Mon, Feb 26, 2018 at 6:09 PM, Andy Shevchenko > wrote: >> On Mon, Feb 26, 2018 at 6:54 PM, Miguel Ojeda >> wrote: >>> On Mon, Feb 26, 2018 at 12:44 PM, Andy Shevchenko >>> wrote: >>>> On Mon, Feb 26, 2018 at 1:54 AM, Robert Abel wrote: >> >>>>> + if ('x' == cmd) { >>>>> + if (kstrtoul(esc, 10, &tmp_addr.x) < 0) >>>>> break; >>>> >>>>> + } else if ('y' == cmd) { >>>>> + if (kstrtoul(esc, 10, &tmp_addr.y) < 0) >>>>> break; >>>> >>>> Perhaps instead of dancing around kstrtox() better to switch to >>>> simple_strtoul() ? >>> >>> It seems deprecated: >>> >>> /* Obsolete, do not use. Use kstrto instead */ >>> extern unsigned long simple_strtoul(const char *,char **,unsigned int); >> >> It has been discussed several times. The comment is simple wrong. >> >> Because of the requirement of kstrtox() to have a \0 or \n followed by >> \0 as "end of field". >> simple_strto*() is suitable to be run in place. > > I agree that in-place versions of these kind of string functions are > very useful, don't get me wrong! But unless someone changes the > "official" comment, we shouldn't add new code relying on them. I don't know what you afraid of, but be my guest. -- With Best Regards, Andy Shevchenko