Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/s390/crypto/zcrypt_api.c: use seq_hex_dump() to dump buffers

Instead of custom approach let's use recently introduced seq_hex_dump()
helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Joe Perches <joe@perches.com>
Cc: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andy Shevchenko and committed by
Linus Torvalds
5d2fe875 b342a65d

+1 -9
+1 -9
drivers/s390/crypto/zcrypt_api.c
··· 1206 1206 static void sprinthx4(unsigned char *title, struct seq_file *m, 1207 1207 unsigned int *array, unsigned int len) 1208 1208 { 1209 - int r; 1210 - 1211 1209 seq_printf(m, "\n%s\n", title); 1212 - for (r = 0; r < len; r++) { 1213 - if ((r % 8) == 0) 1214 - seq_printf(m, " "); 1215 - seq_printf(m, "%08X ", array[r]); 1216 - if ((r % 8) == 7) 1217 - seq_putc(m, '\n'); 1218 - } 1210 + seq_hex_dump(m, " ", DUMP_PREFIX_NONE, 32, 4, array, len, false); 1219 1211 seq_putc(m, '\n'); 1220 1212 } 1221 1213