From patchwork Thu Jul 29 15:56:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 115220 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6TFvCRJ003531 for ; Thu, 29 Jul 2010 15:57:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757940Ab0G2P4y (ORCPT ); Thu, 29 Jul 2010 11:56:54 -0400 Received: from jester.euphonynet.be ([212.87.96.13]:35845 "EHLO mailpush2.euphonynet.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757614Ab0G2P4o (ORCPT ); Thu, 29 Jul 2010 11:56:44 -0400 Received: from smtp2.euphonynet.be (smtp2.euphonynet.be [212.87.96.4]) by mailpush2.euphonynet.be (Postfix) with ESMTP id 25D824F866A; Thu, 29 Jul 2010 17:56:43 +0200 (CEST) Received: from localhost (scan03.euphonynet.be [212.87.96.25]) by smtp2.euphonynet.be (Postfix) with ESMTP id 659B4AACA9081; Thu, 29 Jul 2010 17:56:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at euphonynet.be Received: from ripley.euphonynet.be ([212.87.96.9]) by localhost (scan03.euphonynet.be [212.87.96.23]) (amavisd-new, port 10024) with ESMTP id TmDD8X-4LWNT; Thu, 29 Jul 2010 17:56:37 +0200 (CEST) Received: from asus.localnet (unknown [85.10.77.190]) by ripley.euphonynet.be (Postfix) with ESMTP id C7C34C5F5A183; Thu, 29 Jul 2010 17:56:37 +0200 (CEST) From: Bart Van Assche To: linux-rdma@vger.kernel.org Subject: [PATCH] IB/srp: introduce print_hex_dump() Date: Thu, 29 Jul 2010 17:56:37 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34-scst; KDE/4.4.4; x86_64; ; ) Cc: Roland Dreier MIME-Version: 1.0 Message-Id: <201007291756.37672.bvanassche@acm.org> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 29 Jul 2010 15:57:12 +0000 (UTC) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index ed3f9eb..a072719 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -879,21 +879,10 @@ static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) opcode = *(u8 *) iu->buf; if (0) { - int i; - shost_printk(KERN_ERR, target->scsi_host, PFX "recv completion, opcode 0x%02x\n", opcode); - - for (i = 0; i < wc->byte_len; ++i) { - if (i % 8 == 0) - printk(KERN_ERR " [%02x] ", i); - printk(" %02x", ((u8 *) iu->buf)[i]); - if ((i + 1) % 8 == 0) - printk("\n"); - } - - if (wc->byte_len % 8) - printk("\n"); + print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 8, 1, + iu->buf, wc->byte_len, true); } switch (opcode) {