Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1348922ybi; Wed, 19 Jun 2019 19:01:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyo7Z1ICfWBjlJAcTgCfLnXqbMOOSC9pLIX4PUhPypaszEDxJC8WIBdbq4o8tlsFUHOb547 X-Received: by 2002:a17:90a:376f:: with SMTP id u102mr331255pjb.5.1560996064527; Wed, 19 Jun 2019 19:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560996064; cv=none; d=google.com; s=arc-20160816; b=LTL9NrM/uiUXJ+xP5fIp8m5ZZv2CYGVm47VkNzVSbv7FAAx5TgyMsAWfhvEU4dCi8O KpkrF6Vwy6vhvFiOaNeNccQBCgyveELX1ZlFB21b7lm/AiDruG0+ON6foyj1bfmP3A0V VsKCPHwS2oOEtjv1+Gfx5KfbLNvhVTYHf89Dy5y0PHAW8iWX+wj/8EJmdIkZ9MfcxN9F mYLHl2hEZ3Yoq9MxMRQSjXpZgGmXUSDCK+ctlUeZZ3zVvKrmPAsq7BcGlaY0U+We5lVh wp5yG5oCKysQEEn45tgXg48ylNf00GqAUrRZU4oJ4PmBlOtNMbteGVbRewqU8+VkNWQy UETQ== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=wTEseYmWidqGQFP2nmBWbpNJoSFm6lqTuUNOnH2Fmmk=; b=hC8Xxx5vvXR1EQ6vl2DHzO878LdlSqCZ4UCDqNihnGhFoJ4e5VFCJ/LXLDvETpDZ1N uxvvFAyCYoPJQRNzto7wGqJK3lCEtmnb5ONJODQ59UfnbyKw1zjCSlBfaaNISKh28fQK YPtRtzap7//YeK+v1Y/dXlJCykl9o4nwVcKUoRTVaz0Cj2RCAQfyQCKkrLmKZDIzIIwj 4XYfPZurKbyOqwTqnRXzlT9v8R9NmhCGdpjLHIlxYpvAJugAcjcZcOj4Fcl+Dck/LuzQ +tp684y93HveRJJNiBzG/JxumS7VtQyETxi9FUw/iisrplLNV9RzoOhusSA6goas70Jm duRA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si18368067plb.30.2019.06.19.19.00.49; Wed, 19 Jun 2019 19:01:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731228AbfFTCAd (ORCPT + 99 others); Wed, 19 Jun 2019 22:00:33 -0400 Received: from smtprelay0204.hostedemail.com ([216.40.44.204]:58509 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726370AbfFTCAc (ORCPT ); Wed, 19 Jun 2019 22:00:32 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 61216100E86C2; Thu, 20 Jun 2019 02:00:30 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: X-HE-Tag: tent82_3890fedb2856 X-Filterd-Recvd-Size: 4880 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Thu, 20 Jun 2019 02:00:24 +0000 (UTC) Message-ID: Subject: Re: [PATCH v3 0/7] Hexdump Enhancements From: Joe Perches To: Alastair D'Silva Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Dan Carpenter , Karsten Keil , Jassi Brar , Tom Lendacky , "David S. Miller" , Jose Abreu , Kalle Valo , Stanislaw Gruszka , Benson Leung , Enric Balletbo i Serra , "James E.J. Bottomley" , "Martin K. Petersen" , Greg Kroah-Hartman , Alexander Viro , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , David Laight , Andrew Morton , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org Date: Wed, 19 Jun 2019 19:00:22 -0700 In-Reply-To: <9456ca2a4ae827635bb6d864e5095a9e51f2ac45.camel@d-silva.org> References: <20190617020430.8708-1-alastair@au1.ibm.com> <9a000734375c0801fc16b71f4be1235f9b857772.camel@perches.com> <9456ca2a4ae827635bb6d864e5095a9e51f2ac45.camel@d-silva.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-06-20 at 11:14 +1000, Alastair D'Silva wrote: > On Wed, 2019-06-19 at 17:35 -0700, Joe Perches wrote: > > On Thu, 2019-06-20 at 09:15 +1000, Alastair D'Silva wrote: > > > On Wed, 2019-06-19 at 09:31 -0700, Joe Perches wrote: > > > > On Mon, 2019-06-17 at 12:04 +1000, Alastair D'Silva wrote: > > > > > From: Alastair D'Silva > > > > > > > > > > Apologies for the large CC list, it's a heads up for those > > > > > responsible > > > > > for subsystems where a prototype change in generic code causes > > > > > a > > > > > change > > > > > in those subsystems. > > > > > > > > > > This series enhances hexdump. > > > > > > > > Still not a fan of these patches. > > > > > > I'm afraid there's not too much action I can take on that, I'm > > > happy to > > > address specific issues though. > > > > > > > > These improve the readability of the dumped data in certain > > > > > situations > > > > > (eg. wide terminals are available, many lines of empty bytes > > > > > exist, > > > > > etc). > > > > I think it's generally overkill for the desired uses. > > I understand where you're coming from, however, these patches make it a > lot easier to work with large chucks of binary data. I think it makes > more sense to have these patches upstream, even though committed code > may not necessarily have all the features enabled, as it means that > devs won't have to apply out-of-tree patches during development to make > larger dumps manageable. > > > > > Changing hexdump's last argument from bool to int is odd. > > > > > > > > > > Think of it as replacing a single boolean with many booleans. > > > > I understand it. It's odd. > > > > I would rather not have a mixture of true, false, and apparently > > random collections of bitfields like 0xd or 0b1011 or their > > equivalent or'd defines. > > > > Where's the mixture? What would you propose instead? create a hex_dump_to_buffer_ext with a new argument and a new static inline for the old hex_dump_to_buffer without modifying the argument list that calls hex_dump_to_buffer with whatever added argument content you need. Something like: static inline int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, char *linebuf, size_t linebuflen, bool ascii) { return hex_dump_to_buffer_ext(buf, len, rowsize, groupsize, linebuf, linebuflen, ascii, 0); } and remove EXPORT_SYMBOL(hex_dump_to_buffer)