Received: by 10.223.185.116 with SMTP id b49csp3981074wrg; Mon, 26 Feb 2018 09:10:47 -0800 (PST) X-Google-Smtp-Source: AH8x227sSNY3Mfh4Ti+CBdyiCmy236ZXhCmBtXfrfdqX+AHHy/elmx2N3O60ouKdSamDMr+3hzRE X-Received: by 10.98.245.18 with SMTP id n18mr11004121pfh.25.1519665047404; Mon, 26 Feb 2018 09:10:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519665047; cv=none; d=google.com; s=arc-20160816; b=JvUbkXJX/x0kE7dNEKFc5bVj1oIHHfQs0vVp6Oa6j0X+8yToB9UIu0lOJHDlLDTobB eKEFqhQbnl8Vzi5ac2oPl/sG5FK2OmlJE5NWvYDbmwjj6hrsrpv8GEHLL9ngDFt67ZYG QyvKe8OJhR+k10FufoxoxjTUJfGXshMUJ6fa52M6Vffzelv7/ria3BgCTWJz4rIIvUL1 5E2ySS1DqGzqYIjXM4KsQr3y3uTU1tZGwP3UgND7qy/Bt4mK1c8Czpf2awB7qhzU5X1z Uj8eOCgtBwMR9DgdQ70RCEsniKpxi88nYlf145xSK+ML1NjqsghUzFzkJHiRhaNuxC5H xQyQ== 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=6FB7kZcU1b/xbwUJuE2lKMS0lxMuxB/ujluj8hW2fFU=; b=LwDczHrIPRHY+Q4s4o98AEXa7fbnwAGqAcaGAZ1PVmrn4E7r5N449ZERc5LfP7uNjw 8XzGNjZ99KQoSqcBNYb5WRwbqMC/1FgA/19WIO0bzMfHNimRr2RndL5bHFMZeRfHn+iQ LRyAvdLWB47q+CUHgDM2Y68DHNpkTiOlFr8DDy73BhfSNbBj3hWz5hzf5Ec5OxWPEejU /1BFEZY48mlIHfIxR1W/uDHaUltbOQCo+CNroJ6OUgxnu40kiTV6YlNRShz0LUXPwPvL Dta+w7hQcoKRMVso+/rB7WL9zJoQdY4DjOdAAUhdZRLNbrEcaI9QIys9CG6RcvOAk5Wx 9VPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QewTneGW; 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 h1-v6si7108888plt.728.2018.02.26.09.10.30; Mon, 26 Feb 2018 09:10:47 -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=QewTneGW; 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 S1751587AbeBZRJa (ORCPT + 99 others); Mon, 26 Feb 2018 12:09:30 -0500 Received: from mail-qt0-f176.google.com ([209.85.216.176]:46711 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZRJ2 (ORCPT ); Mon, 26 Feb 2018 12:09:28 -0500 Received: by mail-qt0-f176.google.com with SMTP id m13so14897919qtg.13 for ; Mon, 26 Feb 2018 09:09:28 -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=6FB7kZcU1b/xbwUJuE2lKMS0lxMuxB/ujluj8hW2fFU=; b=QewTneGWc+Ob813q5nrXZADAST91fnHAYzgkj3WNaJUSpFhxS1zvIrmiTpNa4Fr/lz d65JYxZfqnqtZ5/5+pK56tCefo+X0KV0RMFpjf0ppw+uEVp35WsUs6IulQDw7fecU+Im MX5lQEkL7NQVXntzPAgGJdS4cwAiPFLjg2xQmAf3l6dByYcEKUlrKo8UbzNtMTJHbpfP eebgrjOGKpMoeapp17YT57EikphFPh+whIXAHscow7UNYO3vz5iMSGLpLF9ZaJd27pM6 rUxRSNEk246mC048kh7Uf5TmJLEM+pLnUBCfWSBOU02LjEN4KgmhlbdBZqif9aWt5pqh 2Aow== 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=6FB7kZcU1b/xbwUJuE2lKMS0lxMuxB/ujluj8hW2fFU=; b=hCUXzDiN4KeO6nZEQPv+GDx88HbVamUStFGD611ygfPjo0tRpSm/cP15r+U0cQYqRW 078b/h3LTxlwuJ6WoZScezM0SPSdbIYfZuqKwHm8xmCQSVDpa7AUOa/NF1VpUws2xelw WJ1We/3EtDpm0z4UPMWRr5LZKySNAZpAb+6JgrW6CWlqStjgKKKnBZ33iPdU0BsAaZIZ iTO5JlkGri1DscsoA+9aCJPVxrL/3bE3wdlwyyE3TwZWZ+EsitYGTpdU3Qva6gPwUsX7 fPB0rn3SIeFsW9WcrKxh5nL2GecbDcngB87YhLlQuHUyEIFQaE4CCx8SZJ4DHpvBrOei j/jQ== X-Gm-Message-State: APf1xPDYVN49Zdla2biShQTg69d8wdS/MkmscBl7M0icN3LeopqIDWOC TUxZ40MCAAe1qAiFM/z0VCln0rQRpmwjK1ZOLJSYSrM9 X-Received: by 10.200.18.3 with SMTP id x3mr18457991qti.40.1519664968282; Mon, 26 Feb 2018 09:09:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.80 with HTTP; Mon, 26 Feb 2018 09:09:27 -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:09:27 +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 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. >>> } >>> + } >> >> Same indentation level or my mailer hides this from me? > > It is the same, but it is also how the other 'case's do it -- which in > this case looks just wrong since it is the last one of the switch. I > am not sure what is the preferred way of doing these kind of blocks, > coding-style.rst does not seem to give an example for this case. Comes to my mind - using }} - putting default in between - ... ? -- With Best Regards, Andy Shevchenko