From patchwork Tue Oct 31 18:03:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10035069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1CF4603B5 for ; Tue, 31 Oct 2017 18:03:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98D9D2851D for ; Tue, 31 Oct 2017 18:03:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DD5E28A5F; Tue, 31 Oct 2017 18:03:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3900728A13 for ; Tue, 31 Oct 2017 18:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932628AbdJaSD1 (ORCPT ); Tue, 31 Oct 2017 14:03:27 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:49581 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932632AbdJaSDZ (ORCPT ); Tue, 31 Oct 2017 14:03:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1509473005; x=1541009005; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=qACJH3cSQizY6OQglA3qUfKPqhLJlcwSh1fWrJzqru8=; b=TYFKgVWklPu8gYvJiAernE+t1YLCKMmViAiSk/XLhIqgWckCh3mczZhd 0IRBycNk2/9pgDfzfW97+O2CoSpRwlcLZp/PyHugMziq4C0F2CshuzILV sHfAYOBwxR3oPUxUAls1UjXV1whox5UFwz8Z8l9t35HOy56MGRd8jUer6 OqWApCBINLQMwhIEcY0glIYdjTs8gsuj6+Nn8Vvo73Qdosdyu55v+uKec LCOQESOui/jPYNtgXAduIVjoYr5ePOvd1mm7j3ep4DJF7euG7CbecHPr5 MQbC7rV0OsgY5LtoaAtQFxDiiQzM8wOLCkDxDWObXoHXA3uJ1qBuVhjLh w==; X-IronPort-AV: E=Sophos;i="5.44,325,1505750400"; d="scan'208";a="60328624" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 01 Nov 2017 02:03:23 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 31 Oct 2017 11:01:08 -0700 Received: from unknown (HELO MILHUBIP04.sdcorp.global.sandisk.com) ([10.177.9.97]) by uls-op-cesaip02.wdc.com with ESMTP; 31 Oct 2017 11:03:24 -0700 Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 31 Oct 2017 11:03:23 -0700 X-AuditID: 0ab1095a-d99e3980000146e4-52-59f8baea0eb7 Received: from thinkpad-bart.int.fusionio.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 5B.A9.18148.AEAB8F95; Tue, 31 Oct 2017 11:03:22 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" CC: Nicholas Bellinger , Christoph Hellwig , , Bart Van Assche , Hannes Reinecke , Mike Christie Subject: [PATCH 07/11] target/iscsi: Fix endianness in an error message Date: Tue, 31 Oct 2017 11:03:15 -0700 Message-ID: <20171031180319.19258-8-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171031180319.19258-1-bart.vanassche@wdc.com> References: <20171031180319.19258-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMJMWRmVeSWpSXmKPExsXCtZEjRffVrh+RBo+/m1pc+vOF0WLBm71s FitXH2WyWDUxz2L58X9MFuuPbGC0aFt9htGidelbJgcOj/vbjzB5PDi0mcVj980GNo+PT2+x eLzfd5XNY/2WqywenzfJebQf6GYK4IjisklJzcksSy3St0vgyli4zruggavi5b9tbA2Mezm6 GDk5JARMJCas+s7axcjFISSwmlFi5usf7CAJNgE9iVPz9jGB2CICuRKnHt5gAiliFnjCKNHy cx9YkbCAu8SDnVMZQWwWAVWJXxv3gtm8AtYScybeYYTYIC/xfsF9MJtTwEbibc9uFhBbCKjm 2t4lzBMYuRcwMqxiFMvNzCnOTc8sMDTSK07MS8ksztZLzs/dxAgOJs6oHYzXJ5ofYmTi4JRq YDxckch+va/veklllK/9glaeS0Zm5gtkZz39P7vM334qv+90PYnP7H62fuVRM1h+dodO3CBc ebHlx6kJRxfy751usOSUzvLw/atu7VauPFko+3rKtZ1vUydZnoxgWTCLjz2n6b/CBtNZLHMV dml0R2uIr9y40KZjYfj+nWIR3l2XSzVE99wXWKbEUpyRaKjFXFScCADWw9SK1gEAAA== MIME-Version: 1.0 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since hdr->offset is a big endian number, convert it to CPU endian before printing it. Signed-off-by: Bart Van Assche Cc: Nicholas Bellinger Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Mike Christie Reviewed-by: Hannes Reinecke --- drivers/target/iscsi/iscsi_target.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 5001261f5d69..37bc8a37401d 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -1460,9 +1460,9 @@ __iscsit_check_dataout_hdr(struct iscsi_conn *conn, void *buf, iscsit_mod_dataout_timer(cmd); if ((be32_to_cpu(hdr->offset) + payload_length) > cmd->se_cmd.data_length) { - pr_err("DataOut Offset: %u, Length %u greater than" - " iSCSI Command EDTL %u, protocol error.\n", - hdr->offset, payload_length, cmd->se_cmd.data_length); + pr_err("DataOut Offset: %u, Length %u greater than iSCSI Command EDTL %u, protocol error.\n", + be32_to_cpu(hdr->offset), payload_length, + cmd->se_cmd.data_length); return iscsit_reject_cmd(cmd, ISCSI_REASON_BOOKMARK_INVALID, buf); }