Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp499654yba; Fri, 12 Apr 2019 07:48:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxALy9u2ItM/kSET5KY53ORicNa30gR9wI7ZQOmObVQcfKv3i4qst8qKIcOxPi2/9QvMLeF X-Received: by 2002:a62:1701:: with SMTP id 1mr57774824pfx.120.1555080499463; Fri, 12 Apr 2019 07:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555080499; cv=none; d=google.com; s=arc-20160816; b=oywEh/Jpw/la/HRGxuFBUlBd955GsBj5W+k7Qhf4EbM6G6HRshe8qUXvswJ9t7gw3p fxKRpVAgYGdKazeMZhT7ag9VlhmPw3Ttb5Arx+6zHddQk0MqDawACO5iZB8viher4bua jB29Sd9O/vXpdIeGXntbTJL/GSt8QqBiQi3R1PtFQ98hOFDvRsEE5WBEGJppdbfgkhE+ Br4KIgUx2PXMqoRLnTqDtdnoVmLsKhcYfCzGUuDMssqIf5aqSVw5oFpmxckqC80OpkMA wImmcZRzbq2Zh0vprs0M+Jyt9l1qrP7SooQip9D/YOfGxU6fp8XrxJ6NPPu2MtTB/vEA dKTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=JdVf1cEUapnaAxv0zP/I6gTdEkFE+6FbtWfESy+WCiQ=; b=V0AzSBalIQBluSvqkMuLCQPrEDe2aUSahjv96nAn6O16htCUrdF11j6UtBaCKTURDo B5rQHxymGo+Hh47bJyOjoUK1I4LGpp3/bKyygUVIGuHUoYoVpFsiNxK1CFaZnx0YYAld pZQh3tIA5i8dSwZmaG1YDOyJCPahEn3wXPtZfGamR0B4RIxPFQtdvK6jj5OH5cdTczrO mhR9a6LzT4J3eXD7ZYH9yp+F+wxYXpG7rhuVQqCrsIDigME8Y1G0zDY60oGlgXETTewr /MMAkkfDrxE5t/+TqcDoQFJno7VE+UTKCe4/rnUmcXozls0uWUpc6/mztdbkvyLMsmnD apMg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w25si37723966pgl.346.2019.04.12.07.48.02; Fri, 12 Apr 2019 07:48:19 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbfDLOr1 (ORCPT + 99 others); Fri, 12 Apr 2019 10:47:27 -0400 Received: from mga02.intel.com ([134.134.136.20]:32143 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfDLOrY (ORCPT ); Fri, 12 Apr 2019 10:47:24 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2019 07:47:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,341,1549958400"; d="scan'208";a="315411043" Received: from hederi-mobl1.ger.corp.intel.com (HELO [10.252.15.159]) ([10.252.15.159]) by orsmga005.jf.intel.com with ESMTP; 12 Apr 2019 07:47:16 -0700 Subject: Re: [Intel-gfx] [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags To: Alastair D'Silva , alastair@d-silva.org Cc: linux-fbdev@vger.kernel.org, Stanislaw Gruszka , Petr Mladek , David Airlie , dri-devel@lists.freedesktop.org, devel@driverdev.osuosl.org, linux-scsi@vger.kernel.org, Jassi Brar , ath10k@lists.infradead.org, intel-gfx@lists.freedesktop.org, Jose Abreu , Tom Lendacky , "James E.J. Bottomley" , linux-fsdevel@vger.kernel.org, Steven Rostedt , Kalle Valo , Karsten Keil , "Martin K. Petersen" , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , netdev@vger.kernel.org, Enric Balletbo i Serra , Andrew Morton , "David S. Miller" , Alexander Viro References: <20190410031720.11067-1-alastair@au1.ibm.com> <20190410031720.11067-4-alastair@au1.ibm.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: <929244ed-cc7f-b0f3-b5ac-50e798e83188@linux.intel.com> Date: Fri, 12 Apr 2019 15:47:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190410031720.11067-4-alastair@au1.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/04/2019 04:17, Alastair D'Silva wrote: > From: Alastair D'Silva > > In order to support additional features in hex_dump_to_buffer, replace > the ascii bool parameter with flags. > > Signed-off-by: Alastair D'Silva > --- > drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- > drivers/isdn/hardware/mISDN/mISDNisar.c | 6 ++++-- > drivers/mailbox/mailbox-test.c | 2 +- > drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- > drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 2 +- > drivers/net/wireless/ath/ath10k/debug.c | 3 ++- > drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 +- > drivers/platform/chrome/wilco_ec/debugfs.c | 3 ++- > drivers/scsi/scsi_logging.c | 8 +++----- > drivers/staging/fbtft/fbtft-core.c | 2 +- > fs/seq_file.c | 3 ++- > include/linux/printk.h | 2 +- > lib/hexdump.c | 15 ++++++++------- > lib/test_hexdump.c | 5 +++-- > 14 files changed, 31 insertions(+), 26 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c > index 49fa43ff02ba..fb133e729f9a 100644 > --- a/drivers/gpu/drm/i915/intel_engine_cs.c > +++ b/drivers/gpu/drm/i915/intel_engine_cs.c > @@ -1318,7 +1318,7 @@ static void hexdump(struct drm_printer *m, const void *buf, size_t len) > WARN_ON_ONCE(hex_dump_to_buffer(buf + pos, len - pos, > rowsize, sizeof(u32), > line, sizeof(line), > - false) >= sizeof(line)); > + 0) >= sizeof(line)); > drm_printf(m, "[%04zx] %s\n", pos, line); > > prev = buf + pos; i915 code here actually does something I think is more interesting than HEXDUMP_SUPPRESS_0X**. It replaces any N repeating lines with a single star marker. For example: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 * 00000040 00000001 00000000 00000018 00000002 00000001 00000000 00000018 00000000 00000060 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000003 00000080 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 * 000000c0 00000002 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000000e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 * If or when you end up with this feature in your series you can therefore replace the whole implementation of hexdump in the above file. Regards, Tvrtko