Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp514470ybg; Fri, 18 Oct 2019 03:20:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcibn4svNyoHg4d+5NAUI+n35VvyG7v0L1KCR6+3MxgwWi+eUQhBBJmg5su/JNiEtWX6Na X-Received: by 2002:a50:aca5:: with SMTP id x34mr8789037edc.130.1571394043378; Fri, 18 Oct 2019 03:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571394043; cv=none; d=google.com; s=arc-20160816; b=xAWy3Xu941GUMxUre7F44E6FqZXRA6jDRcwcEJinFlVBWwt1UJr/lJ5kN0gwslh6rx yM6Jxo7ctY6EqGj3QcOUjMfGaadSLokZ4XuYePi83UghXw15BUKupJoSgcapvU10yguP y9DimeLIc7s9EQFVbRzvZiLlCzVDWHkKYO/p2023tvVfa8/aos9pVMkJJ25DblMGivn5 aUeLoGfpb2LLvjj9a8buDUcFdea7VFozZB+crQaNZXL1xUwjya0Vhwd6hPAEw2AaFLr0 aUGsQIF6iS9qMSm9I6kzqaZcesUKbbWHSdp9hpmUNQ+/RYp7wr/mH/tslRP7sybeVV5t Tw/A== 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:dkim-signature; bh=yjPrzn+rbWZoq833/48Q3sh6NkFGlqikUBvXOdOFU/s=; b=HCVVxv+x2HM/IrJePK1nC1e5XmDmi3yceN82gWcyC0K2Llwloac3rWX0zWcTaB9VZm fop1JgTq5pN/StJ2+uwtmzYA58pT24fk8d2jwjdocvqBvCxWRas1wAmZiqYybxN7ou6V m3HcVQKGl2IARk1pbsZmCvgL9a922jUqQryAEOxshxk5a4X1hQBw3QHNsK0cDWM2WCG/ npPac7r+X+R1OB92klEgvJVkhd5U3fYkIUZI/HVffxA/YRY8UDKu/Vy+43+X5Sff3ltr jqJteVvMYV9nz6JJ59Zrq7uAU2yD/dQHjUyXQ87TdsijxpLMnP1WS9mYOIsX0x56P2k7 imIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z6Fv2XHs; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si3687322edk.16.2019.10.18.03.20.20; Fri, 18 Oct 2019 03:20:43 -0700 (PDT) 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=@linaro.org header.s=google header.b=Z6Fv2XHs; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439357AbfJQJOH (ORCPT + 99 others); Thu, 17 Oct 2019 05:14:07 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41102 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408466AbfJQJOH (ORCPT ); Thu, 17 Oct 2019 05:14:07 -0400 Received: by mail-wr1-f65.google.com with SMTP id p4so1433806wrm.8 for ; Thu, 17 Oct 2019 02:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yjPrzn+rbWZoq833/48Q3sh6NkFGlqikUBvXOdOFU/s=; b=Z6Fv2XHs9QqD1rEXGmmmX5ahLogdFvvhJUz819zJs4r/BRLqCmdm8SQo5nB6ibNvZB hIfwYYzuHIMa/R7+rkUIwXH0R1SFKuo2lEcaJvuY+K4yh99avYMWJ/BNrwAXmN7PoXWX 2UQPRQ7lbnOJC91Mk/qLFouiz5RPnwfDU+ZfMUP+Wu1hruOpe1fT8QaX6y9o7GXTon0m QVP6FhUSk246HsgRiZLFWXLWzYrd8MMf9JDCLbry3hHbo9ZoDUm0b5JxA1QwVUAd2aby cqwjlbNhOgComrC9zLQlZgEhpflhdfKT5I9+2uXyCKnXbI8UTXC8cklwD0/Lm+paE0vA g3EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yjPrzn+rbWZoq833/48Q3sh6NkFGlqikUBvXOdOFU/s=; b=TXAgP9BT9zWFTwPICl009GBJ2xW1SPIcdvjyt+17Pv4ws7v659ovhyEercUp5vgufy oJM/ugeRwj8Rr/ZF6c4TArihaLjUs6ebpHKeVwmG9711Axg2JUu+JL/l06qAuuNVNv21 Me+lKoCnAxBh6OgSndZ3EKTmnQNb79g6RVPtUJvR5nn4AVPRCmnp1gnjtEC7XM+DJ3MY Vo8I06rHOaM/0tE0ZQr4YMUFcNuWXaCx8x9+o2io8n8HIYOmOv6qW9hZkJOeLNVyUPtC vd6WIYJD2YxAMYhRXg0rlNf9XlMK/FgjnBEXWIhrXmiXOH4gNz1kpei47pNXF85LAhl6 LujQ== X-Gm-Message-State: APjAAAWf//bgfMZxIvbQUFJqefDFCbm1NPggaqHJ3hQOBzZ7IhWGvYu9 w3/QNiOE4h3q457ztUXVsznpzsCLaKnH7Q== X-Received: by 2002:adf:dbd2:: with SMTP id e18mr2052978wrj.268.1571303644897; Thu, 17 Oct 2019 02:14:04 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id q66sm1867902wme.39.2019.10.17.02.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 02:14:03 -0700 (PDT) Date: Thu, 17 Oct 2019 10:14:01 +0100 From: Daniel Thompson To: Doug Anderson Cc: Jason Wessel , kgdb-bugreport@lists.sourceforge.net, LKML , Patch Tracking Subject: Re: [PATCH v3 3/5] kdb: Remove special case logic from kdb_read() Message-ID: <20191017091401.76sqpcymegxur4kq@holly.lan> References: <20191014154626.351-1-daniel.thompson@linaro.org> <20191014154626.351-4-daniel.thompson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 16, 2019 at 09:10:22PM -0700, Doug Anderson wrote: > Hi, > > On Mon, Oct 14, 2019 at 8:46 AM Daniel Thompson > wrote: > > > > @@ -91,12 +92,17 @@ kdb_bt1(struct task_struct *p, unsigned long mask, > > kdb_ps1(p); > > kdb_show_stack(p, NULL); > > if (btaprompt) { > > - kdb_getstr(buffer, sizeof(buffer), > > - "Enter to end, to continue:"); > > - if (buffer[0] == 'q') { > > - kdb_printf("\n"); > > + kdb_printf("Enter to end, or to continue:"); > > + ch = kdb_getchar(); > > + while (!strchr("\r\n q", ch)) > > + ch = kdb_getchar(); > > nit: above 3 lines would be better with "do while", AKA: > > do { > ch = kdb_getchar(); > } while (!strchr("\r\n q", ch)); Doh! Too much python... > > > > @@ -50,14 +50,14 @@ static int kgdb_transition_check(char *buffer) > > } > > > > /* > > - * kdb_read_handle_escape > > + * kdb_handle_escape > > Optional nit: while you're touching this comment, you could make it > kerneldoc complaint. > > > > @@ -152,7 +158,7 @@ static int kdb_read_get_key(char *buffer, size_t bufsize) > > return '\e'; > > > > *ped++ = key; > > - key = kdb_read_handle_escape(escape_data, > > + key = kdb_handle_escape(escape_data, > > ped - escape_data); > > nit: indentation no longer lines up for the "ped - escape_data" line. > > Nothing here is terribly important, thus: > > Reviewed-by: Douglas Anderson Thanks. I'll pick the nits (although I might leave v4 out for review for a relatively short time before applying it ;-) ). Daniel.