From patchwork Mon Mar 4 09:41:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 2211841 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 209A0DFABD for ; Mon, 4 Mar 2013 09:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756670Ab3CDJl0 (ORCPT ); Mon, 4 Mar 2013 04:41:26 -0500 Received: from mga14.intel.com ([143.182.124.37]:54689 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756442Ab3CDJlY (ORCPT ); Mon, 4 Mar 2013 04:41:24 -0500 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 04 Mar 2013 01:41:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,778,1355126400"; d="scan'208";a="208494191" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.173]) by AZSMGA002.ch.intel.com with ESMTP; 04 Mar 2013 01:41:21 -0800 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1UCRtL-0001C6-C4; Mon, 04 Mar 2013 11:41:07 +0200 From: Andy Shevchenko To: linux-cifs@vger.kernel.org, Steve French , samba-technical@lists.samba.org Cc: Andy Shevchenko Subject: [PATCH 2/2] cifs: call print_hex_dump instead of custom implementation Date: Mon, 4 Mar 2013 11:41:06 +0200 Message-Id: <1362390066-4548-2-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.8.2.rc0.22.gb3600c3 In-Reply-To: <1362390066-4548-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1362390066-4548-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Signed-off-by: Andy Shevchenko --- fs/cifs/cifs_debug.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index b2ddb4f..11d45ba 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -34,27 +34,10 @@ void cifs_dump_mem(char *label, void *data, int length) { - int i, j; - int *intptr = data; - char *charptr = data; - char buf[10], line[80]; - printk(KERN_DEBUG "%s: dump of %d bytes of data at 0x%p\n", label, length, data); - for (i = 0; i < length; i += 16) { - line[0] = 0; - for (j = 0; (j < 4) && (i + j * 4 < length); j++) { - sprintf(buf, " %08x", intptr[i / 4 + j]); - strcat(line, buf); - } - buf[0] = ' '; - buf[2] = 0; - for (j = 0; (j < 16) && (i + j < length); j++) { - buf[1] = isprint(charptr[i + j]) ? charptr[i + j] : '.'; - strcat(line, buf); - } - printk(KERN_DEBUG "%s\n", line); - } + print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_NONE, 16, 4, + data, length, true); } void cifs_dump_detail(void *buf)