Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2139219ybp; Thu, 10 Oct 2019 02:53:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIQlhVQ/HIEg/HSRvMdMhz+zXn7pvbO4IsKqOxWdNSovAEyZUyMA44AYCSNhjkw0WHBOgQ X-Received: by 2002:a05:6402:b17:: with SMTP id bm23mr7127217edb.6.1570701195104; Thu, 10 Oct 2019 02:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570701195; cv=none; d=google.com; s=arc-20160816; b=WGgnk0yBCz5IZVaYqkGLe6fxihhvHUiqm8IMfqeijgOCreha9OSaIERfE6EBBtu6vy G7M4YeuLgbV0IfWS4XANxCXSYELImqYo8CaoPgEsywY0LxWclJHwoBrVIAgQlkXHOwoK oXVAToafQiVd+BQ7WCVmXD6K4PSmyij1NraoR1SG4MUePmCUPUtu2oIYfppnjf526Iww vyucJB2V9GigXQ8w1rcwQdSCr1Y/Yk/kgy1uER4A8dbYsSEpWMVxLHLM3aOqSBsRNN/8 b9Kn9A25OCgvZIYzKlEGuw1gbD8FBGUFbINBZ4GX2rKNuLDv/81fd9p9emmPwifOKYyC y1dw== 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=yNx+8n36uJ0WGHxBC9aaDo5XpCmOIJvnh/6Zg8N6jFk=; b=P02jIeaQ+N/oTiat5wthjKYK/AtvCdZlsCnuE/MliU/+gSulQy7A1+8e4VMyK86tAl E4O0WT24qkVfJLFqAX5rjVt8IFlJFw5BRDeyk0hy0VXvJo+QawK0j1r+Ec4b+ihreOpT 5jxtoQqKKKPOjt05ewUpHXv1vydgKY487A7ehQAUJW1p575eDzpWNB0bAzP8Asc72/p9 80E8NodNyhLk/iLU3G2ZT+t2u/y5pqPTwNHOyDfDqdod4argSNW/gXXp7ViDHkVJeO5K Hfmm/qyXWC+mIbAOgoBjUMjONxub255j1G4UkP12yF4tcCrSFL1gHchoRxcot10s+Rhx vATg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XnOJV7YI; 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 si6si2787791ejb.195.2019.10.10.02.52.51; Thu, 10 Oct 2019 02:53:15 -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=XnOJV7YI; 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 S2387485AbfJJJuO (ORCPT + 99 others); Thu, 10 Oct 2019 05:50:14 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40395 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbfJJJuO (ORCPT ); Thu, 10 Oct 2019 05:50:14 -0400 Received: by mail-wm1-f66.google.com with SMTP id b24so6050344wmj.5 for ; Thu, 10 Oct 2019 02:50:12 -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=yNx+8n36uJ0WGHxBC9aaDo5XpCmOIJvnh/6Zg8N6jFk=; b=XnOJV7YI/chmZQMSTTcgcjcrpoZZh39oUa9LFBeXkUiykjjr5JEBgkK+KfCLOJG6O8 6+NIc/vyXLmNqfB90MKN8p2Unok1c+fSiHgnwCyrXBJKeaQPqrFkhiy2P/mLshMb4fvb kB1pTofuj/RzTNiCrP5P+CFGWNF9hxdI1rBTBJP7STVGBnVmS1G7saGVLs5yod9EAWcS s7eZ+f9uqQ04q8bq3OcoV3Z9FvZ/0mp2Ibn69cbg0K9ejU+OuHVyhxeUwJhjfdA2m2K9 WgkfJfrzns34UQNFKX1MMnVPj95NEovFrbRBNTgc3kzs4zUd37NIBrwK7WMsOH19ho8h xmLw== 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=yNx+8n36uJ0WGHxBC9aaDo5XpCmOIJvnh/6Zg8N6jFk=; b=EByYsqZOBP8p3k/YhM7Suh/U+rj7hmTGv6SO1AsEO16pyc3P3tvYc1YH4F79kAOveO 8t+AhjUIFodlJCoQZbTp+SWYQWV9SD1c6oAod5iCIsUv2pbbi0/GZA9a4znxrAnYhcOx 2MjnQenZnQ+xFClbCXvc9jfRrR/RuAH74U6CWRxjwJXq93+kmKVdgkQ+lzmyjl0W5Ttm sW/1d2bK9QQBR3wN43Eg3aYlS6JZJiGOPtZwAtSWC+sArP4cdaXvHfDyodJRwNeCF/zI XXnmQb2IFJvdQtASz4rTldh2La0iM93/oZBhqQGRCa0i2mJTe20fl7crP7sGR2oCzg3Z hptw== X-Gm-Message-State: APjAAAX8ieMKgYfXAJWOb1ejVD9p0X8MavM7McmzGti3HCP/v3vVuSBq 7Js9GpuUQllX7MNPLdfMs1oxtg== X-Received: by 2002:a1c:20d8:: with SMTP id g207mr6926175wmg.79.1570701011994; Thu, 10 Oct 2019 02:50:11 -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 207sm7788894wme.17.2019.10.10.02.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 02:50:11 -0700 (PDT) Date: Thu, 10 Oct 2019 10:50:09 +0100 From: Daniel Thompson To: Doug Anderson Cc: Jason Wessel , kgdb-bugreport@lists.sourceforge.net, LKML , Patch Tracking Subject: Re: [PATCH v2 3/5] kdb: Remove special case logic from kdb_read() Message-ID: <20191010095009.25a5zvoykpmvtktq@holly.lan> References: <20191008132043.7966-1-daniel.thompson@linaro.org> <20191008132043.7966-4-daniel.thompson@linaro.org> <20191009093049.tnz442bo54bzmzmz@holly.lan> 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 09, 2019 at 10:28:36AM -0700, Doug Anderson wrote: > On Wed, Oct 9, 2019 at 2:30 AM Daniel Thompson > wrote: > > > > @@ -741,7 +732,7 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap) > > > > > > > > /* check for having reached the LINES number of printed lines */ > > > > if (kdb_nextline >= linecount) { > > > > - char buf1[16] = ""; > > > > + char ch; > > > > > > The type of "ch" should be the same as returned by kdb_getchar()? > > > Either "int" if you're keeping it "int" or "unsigned char"? > > > > Probably... although the assumption that kdb strings are char * is burnt > > in a lot of places so there will still be further tidy up needed. > > True. It doesn't matter a whole lot so if you think it's easier to > keep it as char that's OK too. After looking at it from a number of angles I think we can have this match the return type of kdb_getchar()... but the best way to achieve this is to make kdb_getchar() return a unqualified char. That ends up consistent across the sub-system and shouldn't do any narrowing that wouldn't already have been happening inside kdb_read(). Daniel.