Thread (21 messages) 21 messages, 4 authors, 2019-06-26

Re: [PATCH v4 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

From: Alastair D'Silva <hidden>
Date: 2019-06-25 05:06:49
Also in: dri-devel, intel-gfx, linux-fbdev, linux-fsdevel, linux-scsi, linux-wireless, lkml

On Mon, 2019-06-24 at 22:01 -0700, Joe Perches wrote:
On Tue, 2019-06-25 at 13:17 +1000, Alastair D'Silva wrote:
quoted
From: Alastair D'Silva <redacted>

In order to support additional features, rename hex_dump_to_buffer
to
hex_dump_to_buffer_ext, and replace the ascii bool parameter with
flags.
[]
quoted
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c
b/drivers/gpu/drm/i915/intel_engine_cs.c
[]
quoted
@@ -1338,9 +1338,8 @@ 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));
+						rowsize, sizeof(u32),
line,
+						sizeof(line)) >=
sizeof(line));
Huh?  Why do this?
quoted
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c
b/drivers/isdn/hardware/mISDN/mISDNisar.c
[]
quoted
@@ -70,8 +70,9 @@ send_mbox(struct isar_hw *isar, u8 his, u8 creg,
u8 len, u8 *msg)
 			int l = 0;
 
 			while (l < (int)len) {
-				hex_dump_to_buffer(msg + l, len - l,
32, 1,
-						   isar->log, 256, 1);
+				hex_dump_to_buffer_ext(msg + l, len -
l, 32, 1,
+						       isar->log, 256,
+						       HEXDUMP_ASCII);
Again, why do any of these?

The point of the wrapper is to avoid changing these.
The change actions Jani's suggestion:
https://lkml.org/lkml/2019/6/20/343


-- 
Alastair D'Silva           mob: 0423 762 819
skype: alastair_dsilva    
Twitter: @EvilDeece
blog: http://alastair.d-silva.org

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help