drivers/s390/crypto/zcrypt_api.c: use seq_hex_dump() to dump buffers
authorAndy Shevchenko <[email protected]>
Wed, 9 Sep 2015 22:38:42 +0000 (15:38 -0700)
committerLinus Torvalds <[email protected]>
Thu, 10 Sep 2015 20:29:01 +0000 (13:29 -0700)
Instead of custom approach let's use recently introduced seq_hex_dump()
helper.

Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Ingo Tuchscherer <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Tadeusz Struk <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Vladimir Kondratiev <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/s390/crypto/zcrypt_api.c

index 01bf1f5cf2e95a7f40f722f51e4df87ea257e724..4eb45546a3aaf39421e6434a181890f6145fd604 100644 (file)
@@ -1206,16 +1206,8 @@ static void sprinthx(unsigned char *title, struct seq_file *m,
 static void sprinthx4(unsigned char *title, struct seq_file *m,
                      unsigned int *array, unsigned int len)
 {
-       int r;
-
        seq_printf(m, "\n%s\n", title);
-       for (r = 0; r < len; r++) {
-               if ((r % 8) == 0)
-                       seq_printf(m, "    ");
-               seq_printf(m, "%08X ", array[r]);
-               if ((r % 8) == 7)
-                       seq_putc(m, '\n');
-       }
+       seq_hex_dump(m, "    ", DUMP_PREFIX_NONE, 32, 4, array, len, false);
        seq_putc(m, '\n');
 }