From patchwork Mon Sep 29 11:59:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 394356 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CC4D614011E for ; Mon, 29 Sep 2014 21:59:51 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753966AbaI2L73 (ORCPT ); Mon, 29 Sep 2014 07:59:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59341 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753941AbaI2L7S (ORCPT ); Mon, 29 Sep 2014 07:59:18 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A6BF6ADCB; Mon, 29 Sep 2014 11:59:11 +0000 (UTC) From: Hannes Reinecke To: James Bottomley Cc: Christoph Hellwig , linux-scsi@vger.kernel.org, Robert Elliott , Hannes Reinecke , Tejun Heo , linux-ide@vger.kernel.org, LKML Subject: [PATCH 33/38] libata: use __scsi_print_command() Date: Mon, 29 Sep 2014 13:59:02 +0200 Message-Id: <1411991947-130166-34-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1411991947-130166-1-git-send-email-hare@suse.de> References: <1411991947-130166-1-git-send-email-hare@suse.de> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org libata already uses an internal buffer, so we should be using __scsi_print_command() here. Cc: Tejun Heo Cc: linux-ide@vger.kernel.org Cc: LKML Signed-off-by: Hannes Reinecke --- drivers/ata/libata-eh.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index dad83df..74c5652 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2509,15 +2509,11 @@ static void ata_eh_link_report(struct ata_link *link) if (ata_is_atapi(qc->tf.protocol)) { if (qc->scsicmd) - scsi_print_command(qc->scsicmd); + __scsi_print_command(cdb_buf, sizeof(cdb_buf), + qc->scsicmd->cmnd); else - snprintf(cdb_buf, sizeof(cdb_buf), - "cdb %02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x\n ", - cdb[0], cdb[1], cdb[2], cdb[3], - cdb[4], cdb[5], cdb[6], cdb[7], - cdb[8], cdb[9], cdb[10], cdb[11], - cdb[12], cdb[13], cdb[14], cdb[15]); + __scsi_print_command(cdb_buf, sizeof(cdb_buf), + (unsigned char *)cdb); } else { const char *descr = ata_get_cmd_descript(cmd->command); if (descr)