From patchwork Tue Oct 31 18:03:16 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: 10035073 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 9737860327 for ; Tue, 31 Oct 2017 18:03:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EE0D2851D for ; Tue, 31 Oct 2017 18:03:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83C4F2884E; Tue, 31 Oct 2017 18:03:30 +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 EC71A2851D for ; Tue, 31 Oct 2017 18:03:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932660AbdJaSD3 (ORCPT ); Tue, 31 Oct 2017 14:03:29 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:25243 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932641AbdJaSDZ (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=esjRbAByayH+/Os7UG++aC9iuKzjK2YjdRzk1+bgF3M=; b=bHz8FjC7RNn932cdg2v3hb9UNaRHTXkWCfALExwreVeNpZaoEds1EInW QMvR7BbZYb/oYfsdqrh9VEoHcWu4cskF+JgMJkuD3p2C6KaZJhz1EQYEA VxCnjlYjlz28mHa/d5eRQbjf7rXepsQ11nhznlOxidz76aWt+Jl9eCfaC hxg3loEhs16O6AHatzfbFdbcSyKZZbrJXN696QusR5ayeo8+WqQ86o4R2 IYpEqgfSwRzwqccaz9B2SVLS7gaMmZqSQ/veZvnGFY8mDvLLXHDr1/CAP a71RnkFSoMB7wFhS2Gt4jQy6GJXTVEdGZ9T2pexkTkx57fEPtx6nWhpnc g==; X-IronPort-AV: E=Sophos;i="5.44,325,1505750400"; d="scan'208";a="60328630" 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.9.6) 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-53-59f8baea265a Received: from thinkpad-bart.int.fusionio.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id FB.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 , Bart Van Assche , Hannes Reinecke , Mike Christie Subject: [PATCH 08/11] target/iscsi: Modify iscsit_do_crypto_hash_buf() prototype Date: Tue, 31 Oct 2017 11:03:16 -0700 Message-ID: <20171031180319.19258-9-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+NgFjrHJMWRmVeSWpSXmKPExsXCtZEjRffVrh+RBr8+m1sc/NnGaHHpzxdG iwVv9rJZrFx9lMli1cQ8i+XH/zFZrD+ygdGibfUZRovWpW+ZHDg97m8/wuTx4NBmFo/dNxvY PD4+vcXi8X7fVTaPaWvOM3ms33KVxePzJjmP9gPdTAGcUVw2Kak5mWWpRfp2CVwZZ/YfZSuY rVCxa9ZRpgbGO5JdjJwcEgImErum9jB3MXJxCAmsZpRYu/AoK0iCTUBP4tS8fUwgtohArsSp hzeYQIqYBaYwSSxcBFEkLBAosfPRbkYQm0VAVWLy1HdgDbwC1hInHp5hhdggL/F+wX2wGk4B G4m3PbtZQGwhoJpre5cwT2DkXsDIsIpRLDczpzg3PbPA0EivODEvJbM4Wy85P3cTIzjEOKN2 MF6faH6IkYmDU6qBkcXmhtuvqjNOd+vOu600+BDqM/dxC0vNB87rM5ZVTN5/+dWDRgcppTdl h3ccuvHlmtyjZccq1hlOPa7Xln/iXNR2UX+jyP+7f++6ZVsrcS5/YxyrRcySc1zPXq9/3Gtw 8nf8fJ+jN77aP9+moDF7vuC1JZnnk545nD5z2S/+xg3Vf8aFMY+/rpquxFKckWioxVxUnAgA ArOkPOEBAAA= 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 Change the type of the last two arguments from u8 * into const void * and void * respectively such that the u8 * casts can be left out from the callers. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Nicholas Bellinger Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke --- drivers/target/iscsi/iscsi_target.c | 41 +++++++++++++++---------------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 37bc8a37401d..91fbada7cdc2 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -500,7 +500,7 @@ void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd) EXPORT_SYMBOL(iscsit_aborted_task); static void iscsit_do_crypto_hash_buf(struct ahash_request *, const void *, - u32, u32, u8 *, u8 *); + u32, u32, const void *, void *); static void iscsit_tx_thread_wait_for_tcp(struct iscsi_conn *); static int @@ -521,7 +521,7 @@ iscsit_xmit_nondatain_pdu(struct iscsi_conn *conn, struct iscsi_cmd *cmd, iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, ISCSI_HDR_LEN, 0, NULL, - (u8 *)header_digest); + header_digest); iov[0].iov_len += ISCSI_CRC_LEN; tx_size += ISCSI_CRC_LEN; @@ -548,9 +548,8 @@ iscsit_xmit_nondatain_pdu(struct iscsi_conn *conn, struct iscsi_cmd *cmd, if (conn->conn_ops->DataDigest) { iscsit_do_crypto_hash_buf(conn->conn_tx_hash, data_buf, data_buf_len, - padding, - (u8 *)&cmd->pad_bytes, - (u8 *)&cmd->data_crc); + padding, &cmd->pad_bytes, + &cmd->data_crc); iov[niov].iov_base = &cmd->data_crc; iov[niov++].iov_len = ISCSI_CRC_LEN; @@ -595,7 +594,7 @@ iscsit_xmit_datain_pdu(struct iscsi_conn *conn, struct iscsi_cmd *cmd, iscsit_do_crypto_hash_buf(conn->conn_tx_hash, cmd->pdu, ISCSI_HDR_LEN, 0, NULL, - (u8 *)header_digest); + header_digest); iov[0].iov_len += ISCSI_CRC_LEN; tx_size += ISCSI_CRC_LEN; @@ -1408,13 +1407,9 @@ static u32 iscsit_do_crypto_hash_sg( return data_crc; } -static void iscsit_do_crypto_hash_buf( - struct ahash_request *hash, - const void *buf, - u32 payload_length, - u32 padding, - u8 *pad_bytes, - u8 *data_crc) +static void iscsit_do_crypto_hash_buf(struct ahash_request *hash, + const void *buf, u32 payload_length, u32 padding, + const void *pad_bytes, void *data_crc) { struct scatterlist sg[2]; @@ -1876,10 +1871,9 @@ static int iscsit_handle_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd, } if (conn->conn_ops->DataDigest) { - iscsit_do_crypto_hash_buf(conn->conn_rx_hash, - ping_data, payload_length, - padding, cmd->pad_bytes, - (u8 *)&data_crc); + iscsit_do_crypto_hash_buf(conn->conn_rx_hash, ping_data, + payload_length, padding, + cmd->pad_bytes, &data_crc); if (checksum != data_crc) { pr_err("Ping data CRC32C DataDigest" @@ -2285,10 +2279,9 @@ iscsit_handle_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd, goto reject; if (conn->conn_ops->DataDigest) { - iscsit_do_crypto_hash_buf(conn->conn_rx_hash, - text_in, payload_length, - padding, (u8 *)&pad_bytes, - (u8 *)&data_crc); + iscsit_do_crypto_hash_buf(conn->conn_rx_hash, text_in, + payload_length, padding, + &pad_bytes, &data_crc); if (checksum != data_crc) { pr_err("Text data CRC32C DataDigest" @@ -3976,9 +3969,9 @@ static void iscsit_get_rx_pdu(struct iscsi_conn *conn) return; } - iscsit_do_crypto_hash_buf(conn->conn_rx_hash, - buffer, ISCSI_HDR_LEN, - 0, NULL, (u8 *)&checksum); + iscsit_do_crypto_hash_buf(conn->conn_rx_hash, buffer, + ISCSI_HDR_LEN, 0, NULL, + &checksum); if (digest != checksum) { pr_err("HeaderDigest CRC32C failed,"