From patchwork Wed Jul 9 15:24:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 4517531 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 264B0BEEAA for ; Wed, 9 Jul 2014 15:27:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56DDD202F0 for ; Wed, 9 Jul 2014 15:27:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AADE2024C for ; Wed, 9 Jul 2014 15:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964835AbaGIP10 (ORCPT ); Wed, 9 Jul 2014 11:27:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:64911 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932531AbaGIP0N (ORCPT ); Wed, 9 Jul 2014 11:26:13 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 09 Jul 2014 08:20:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,631,1400050800"; d="scan'208";a="540934522" Received: from smile.fi.intel.com ([10.237.72.73]) by orsmga001.jf.intel.com with ESMTP; 09 Jul 2014 08:24:34 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1X4tjU-0006xe-LR; Wed, 09 Jul 2014 18:24:32 +0300 From: Andy Shevchenko To: Tadeusz Struk , Herbert Xu , Mauro Carvalho Chehab , Helge Deller , Ingo Tuchscherer , linux390@de.ibm.com, Alexander Viro , qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 5/5] [S390] zcrypt: use seq_hex_dump() to dump buffers Date: Wed, 9 Jul 2014 18:24:30 +0300 Message-Id: <1404919470-26668-6-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1404919470-26668-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1404919470-26668-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of custom approach let's use recently introduced seq_hex_dump() helper. In this case it slightly changes the output, namely the four tetrads will be output on one line. Signed-off-by: Andy Shevchenko --- drivers/s390/crypto/zcrypt_api.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 0e18c5d..d1f9983 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -1203,16 +1203,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'); }