Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp472077ybg; Fri, 18 Oct 2019 02:40:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwL/qRokiD4/Dp9HCRu7oXOxXqJKUspz+vguVH3imORKARyB+0KuzaMMV6OcsHoeicgt5iB X-Received: by 2002:a17:906:ca50:: with SMTP id jx16mr7678455ejb.33.1571391638430; Fri, 18 Oct 2019 02:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571391638; cv=none; d=google.com; s=arc-20160816; b=K59b/SbWDirWI38X8tRljrf0mjjRL0nvmAiklVK5+ya2lIhnuTdJh+7W1uXmnFW86T 8dQh1DxbdJA3u6IVCY2byTFUf+jsKz+wZsi7mKpBuIzWRqlZPANSNqLLWl3YqqwQ9rC/ vQYwGDLIB96x/fI1UGDUoru/8WyPZMKycFrqOudg0XdrncOkbwn1GB10mkwt/K3/cOov H7fVrWPPuDqj04tDwgq8Chp9I4kxJAUrAc0Sv2fDvuWNKsiVzppSEHe/fcLPnIcu9Wx9 lBnMxS5VT8NDfFNPdNJOg9ydG8Zkk6gVzvCSzH8JqvZw1uZaCqQhLDzzEazfZRSeaYFB WJ6A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=WfD6ayjfYqzqP/LVh7w+bvnD4qYp9ltqa0DyJebxkC8=; b=L2P8md8GmF7bIaKQZqpxjWybdeGJ67XOUCLUfOOhNYBIdF617z/ALrSJdftrOptFqr LcHeyLNo5n8nPtjzm4rB0K28dgu6gDeQ1ftPLth3x86CTrREck8tv3W/WoCcUCnp8sPq fwxXLy4qIgCqje0Nev/nowmY9qiTX4ZJCJA78iPNLt3PBnChEPtwtHwIGwy0dCM3hVvf Bh56lQSlidKF/6Z2OhQKb0Y7jyMuPyXAaj7/G5tLLMMXlBXj0M3HZL45zRLHJtLmGi6A bUxH1Fb96QFs1lqBzqU/KoS08O68Eh4qX1F6laXNoYybyZJbDBcFxBbu23Aa12TfTYHL 1DBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eVZWpuNm; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12si3357149edq.437.2019.10.18.02.39.39; Fri, 18 Oct 2019 02:40:38 -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=@chromium.org header.s=google header.b=eVZWpuNm; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404503AbfJQEKg (ORCPT + 99 others); Thu, 17 Oct 2019 00:10:36 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:43760 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726982AbfJQEKg (ORCPT ); Thu, 17 Oct 2019 00:10:36 -0400 Received: by mail-il1-f195.google.com with SMTP id t5so659652ilh.10 for ; Wed, 16 Oct 2019 21:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WfD6ayjfYqzqP/LVh7w+bvnD4qYp9ltqa0DyJebxkC8=; b=eVZWpuNmW1LjNbZB427rwnRwJXN0K6rrcRk6OTdb3sr/zasrjkEs/A6KN26Cl4NOl3 +Rh0iGrfl7+aOKNCCEMIh2A3m1oVJSUmRHxt8CczU8cOAzykww/p2p9sxc9HAvHHCShw QK5OCE7VBb+gc/OnQ/oiYModNGH7UBHpO0RGg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WfD6ayjfYqzqP/LVh7w+bvnD4qYp9ltqa0DyJebxkC8=; b=Qo/6bfVP3UZmA2Pj4n2jywZNuGl2fhfMWanKCg5AueqGSDU+WkXXshDnck+Wuqcn0X mpCGH0oDEITDEGSd1C6hRgesm/HzHcwzTrLWVTbiC4Bf5TCHEbg712ADkow9hZu6RNDP DFONZVt/UimsoEwArowRvluLdvwF2fe8NyZYB0CCniEUQWkyu8Slcr7H7ec6PfvDwG9R j3wLcbw81UpH8cSvsUHsl2Gr9kFy38LLJ9Lk+abzhwvo9n35i4EyNc9voVPyS8J0l/f6 fQMeOJy8lC1BpKCduBTJkmNG3ENDeZI5Mp7Xci/oXGGWuZt4hmTV/DcImU2WBEboKXSO xvQQ== X-Gm-Message-State: APjAAAVAtLB6LNRNgo5Hd6EBjS8L7ZNvxuqPaF6JMozewAVBo9YjAQSP S8zdkH4j2RYsscsnfO6PElKHl1l4LN0= X-Received: by 2002:a92:5e4d:: with SMTP id s74mr1463106ilb.115.1571285435251; Wed, 16 Oct 2019 21:10:35 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id u25sm467967ill.4.2019.10.16.21.10.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Oct 2019 21:10:34 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id n26so1266051ioj.8 for ; Wed, 16 Oct 2019 21:10:34 -0700 (PDT) X-Received: by 2002:a5d:9952:: with SMTP id v18mr1049308ios.58.1571285433894; Wed, 16 Oct 2019 21:10:33 -0700 (PDT) MIME-Version: 1.0 References: <20191014154626.351-1-daniel.thompson@linaro.org> <20191014154626.351-4-daniel.thompson@linaro.org> In-Reply-To: <20191014154626.351-4-daniel.thompson@linaro.org> From: Doug Anderson Date: Wed, 16 Oct 2019 21:10:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/5] kdb: Remove special case logic from kdb_read() To: Daniel Thompson Cc: Jason Wessel , kgdb-bugreport@lists.sourceforge.net, LKML , Patch Tracking 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 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)); > @@ -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