Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp141634yba; Wed, 8 May 2019 18:00:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQuIBVXcXyzJIGG7/tQLBAS9I6+jZps61waYo1YAUGkjKKLZH0Y/vHx0X8i4cGcuRqnoDI X-Received: by 2002:a62:7995:: with SMTP id u143mr912190pfc.61.1557363614419; Wed, 08 May 2019 18:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557363614; cv=none; d=google.com; s=arc-20160816; b=zQzftoRUMGyTj5Viy0Xi8Tv+gkryap2mdnZY1fDCwkQIE0Ghj2+192CkCz0s/97KTg 1DZlcXDKbo4qIfaFwJn4GvzShPZUWda/yAD94JMpba+2VLfNbj8RaYdTK7x0KWK0YHO7 CZmM0JRwy2lhuO9gmYPF3E7XS/Q3Za+twRThPOkWDg/eZzimc3iebgUl360ovfQF/l+K 9jxfmDiS9WeII5Dvn4q/mMKhzIskCRXl4vFA08wZ6z75ZY3xn8gKQpfQOkYry7Mqwf7Q lIo6aKQPjlFtkNXGtK75+ay5NCpQK2lIOSnJGD/iQgczdFIMBQXQJpnNAiXPzORtdFgf bxAA== 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:from:references:cc:to:subject:dkim-signature; bh=jF6l3iV1rXe+x0MwS+AXxE/3MQbA5vLmSrDtVx8hKJ0=; b=fR0e5w10AZhgvgSakyYlmcbH6PMMNMHOJVJsDuXc4nm87HUbOx5Hvht3noHTPm7GmU VC6XmO48ZzedRVEktCDgfO/LfQ3m8Uc070jodGgJAkj+XjsexQv3xdQXrrWxd/I8f4ns lu3fgylBLqkHDiyJAPYuQPjCejQ8PJ/D6DapVleWmC3AmLROza16Wft9CCUA78avgYxJ U5F/BCPObb42HAqxevqHpURfMk3Bku+jYT+G0op2v5G6mWxHu0iytTHCLQha2UYas0z6 ojs5F9gFBRa1rqCCSd9oGty9+1nAWcWXfSwp5/izAcGD09NvXOUqlCZ3GnLaX4iGW5Eh TNZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iDLjyMGH; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si597228plp.257.2019.05.08.17.59.38; Wed, 08 May 2019 18:00:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=iDLjyMGH; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbfEIA7F (ORCPT + 99 others); Wed, 8 May 2019 20:59:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34062 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbfEIA7E (ORCPT ); Wed, 8 May 2019 20:59:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jF6l3iV1rXe+x0MwS+AXxE/3MQbA5vLmSrDtVx8hKJ0=; b=iDLjyMGHb2MtEiX7sNEsrIOc+ r555boyzgroaM/roefjfl/8sPXIlDAXxtafMFPJgts5KIWBA3q3sxMLL9Wjox7NuUoSN+lZsyGDWw 1YIQfXQ89Etqt/gh+FhXMlhdhbL9rncYRHCp1u5Ydd7sskuGKJOM6SqnvXr8Ix+x0A1cHoy/Pusmm afAw4Qn3zKr+mSjjshNzlrS6rfxIYZK+kWmsANoEiID2eXPgmAt9+V8rVX6zZpa52fnCPoRfx1GZ/ Wu13zOk/d8d44/7sOxIazBgLErLk/FQfGqZzRDcPlEkhHnuFiQz1PmBOXDcuzYl28U3M+xDV4tosD uSeh53laQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOXOb-0001bQ-J1; Thu, 09 May 2019 00:58:49 +0000 Subject: Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes To: Alastair D'Silva , alastair@d-silva.org Cc: linux-fbdev@vger.kernel.org, Stanislaw Gruszka , Petr Mladek , David Airlie , Joonas Lahtinen , 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, Dan Carpenter , Jose Abreu , Tom Lendacky , "James E.J. Bottomley" , Jani Nikula , linux-fsdevel@vger.kernel.org, Steven Rostedt , Rodrigo Vivi , Benson Leung , Kalle Valo , Karsten Keil , "Martin K. Petersen" , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , David Laight , Daniel Vetter , netdev@vger.kernel.org, Enric Balletbo i Serra , Andrew Morton , "David S. Miller" , Alexander Viro References: <20190508070148.23130-1-alastair@au1.ibm.com> <20190508070148.23130-4-alastair@au1.ibm.com> From: Randy Dunlap Message-ID: Date: Wed, 8 May 2019 17:58:46 -0700 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: <20190508070148.23130-4-alastair@au1.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 5/8/19 12:01 AM, Alastair D'Silva wrote: > From: Alastair D'Silva > > Some buffers may only be partially filled with useful data, while the rest > is padded (typically with 0x00 or 0xff). > > This patch introduces a flag to allow the supression of lines of repeated > bytes, which are replaced with '** Skipped %u bytes of value 0x%x **' > > An inline wrapper function is provided for backwards compatibility with > existing code, which maintains the original behaviour. > > Signed-off-by: Alastair D'Silva > --- > include/linux/printk.h | 25 +++++++++--- > lib/hexdump.c | 91 ++++++++++++++++++++++++++++++++++++------ > 2 files changed, 99 insertions(+), 17 deletions(-) > Hi, Did you do "make htmldocs" or something similar on this? > diff --git a/lib/hexdump.c b/lib/hexdump.c > index 3943507bc0e9..d61a1e4f19fa 100644 > --- a/lib/hexdump.c > +++ b/lib/hexdump.c > @@ -212,8 +212,44 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, > EXPORT_SYMBOL(hex_dump_to_buffer); > > #ifdef CONFIG_PRINTK > + > +/** > + * Check if a buffer contains only a single byte value > + * @buf: pointer to the buffer > + * @len: the size of the buffer in bytes > + * @val: outputs the value if if the bytes are identical Does this work without a function name? Documentation/doc-guide/kernel-doc.rst says the general format is: /** * function_name() - Brief description of function. * @arg1: Describe the first argument. * @arg2: Describe the second argument. * One can provide multiple line descriptions * for arguments. * > + */ > /** > - * print_hex_dump - print a text hex dump to syslog for a binary blob of data > + * print_hex_dump_ext: dump a binary blob of data to syslog in hexadecimal Also not in the general documented format. > * @level: kernel log level (e.g. KERN_DEBUG) > * @prefix_str: string to prefix each line with; > * caller supplies trailing spaces for alignment if desired -- ~Randy