linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Alastair D'Silva <alastair@au1.ibm.com>, alastair@d-silva.org
Cc: linux-fbdev@vger.kernel.org,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Petr Mladek <pmladek@suse.com>, David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, devel@driverdev.osuosl.org,
	linux-scsi@vger.kernel.org, Jassi Brar <jassisinghbrar@gmail.com>,
	ath10k@lists.infradead.org, intel-gfx@lists.freedesktop.org,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	linux-fsdevel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Kalle Valo <kvalo@codeaurora.org>,
	Karsten Keil <isdn@linux-pingi.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	netdev@vger.kernel.org,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [Intel-gfx] [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags
Date: Fri, 12 Apr 2019 15:47:14 +0100	[thread overview]
Message-ID: <929244ed-cc7f-b0f3-b5ac-50e798e83188@linux.intel.com> (raw)
In-Reply-To: <20190410031720.11067-4-alastair@au1.ibm.com>


On 10/04/2019 04:17, Alastair D'Silva wrote:
> From: Alastair D'Silva <alastair@d-silva.org>
> 
> In order to support additional features in hex_dump_to_buffer, replace
> the ascii bool parameter with flags.
> 
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---
>   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

  parent reply	other threads:[~2019-04-12 14:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  3:17 [PATCH 0/4] Hexdump enhancements Alastair D'Silva
2019-04-10  3:17 ` [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line Alastair D'Silva
2019-04-12 13:48   ` Petr Mladek
2019-04-12 23:22     ` Alastair D'Silva
2019-04-15  9:02       ` Petr Mladek
2019-04-15 10:29         ` Alastair D'Silva
2019-04-15 10:56           ` David Laight
2019-04-15 10:59             ` Alastair D'Silva
2019-04-10  3:17 ` [PATCH 2/4] lib/hexdump.c: Optionally suppress lines of filler bytes Alastair D'Silva
2019-04-10  3:32   ` Alastair D'Silva
2019-04-12 14:03   ` Petr Mladek
2019-04-12 23:28     ` Alastair D'Silva
2019-04-15  9:18       ` Petr Mladek
2019-04-15 10:33         ` Alastair D'Silva
2019-04-10  3:17 ` [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags Alastair D'Silva
2019-04-10  6:56   ` Dan Carpenter
2019-04-12 14:12   ` Petr Mladek
2019-04-12 23:31     ` Alastair D'Silva
2019-04-15  9:24       ` Petr Mladek
2019-04-15 10:07         ` Alastair D'Silva
2019-04-15 10:20           ` David Laight
2019-04-15 10:44             ` Alastair D'Silva
2019-04-15 11:03               ` David Laight
2019-04-15 11:12                 ` Alastair D'Silva
2019-04-12 14:47   ` Tvrtko Ursulin [this message]
2019-04-10  3:17 ` [PATCH 4/4] lib/hexdump.c: Allow multiple groups to be separated by lines '|' Alastair D'Silva
2019-04-10  8:45   ` David Laight
2019-04-10  9:52     ` Alastair D'Silva
2019-04-10  8:53   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=929244ed-cc7f-b0f3-b5ac-50e798e83188@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=alastair@au1.ibm.com \
    --cc=alastair@d-silva.org \
    --cc=ath10k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=isdn@linux-pingi.de \
    --cc=jassisinghbrar@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sgruszka@redhat.com \
    --cc=thomas.lendacky@amd.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).