From cba6490e82d4814cbb41b2ca2d3edf240013a138 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 4 Dec 2008 18:00:51 +0000 Subject: [PATCH] Until now I had been using the latest git version of sparse (August 26, 2008). Apparently not all messages reported by this version are correct. So I switched back to the last released sparse version (0.4.1). The patch below fixes all errors and warnings reported by sparse 0.4.1 on the SCST source code. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@596 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 2 +- iscsi-scst/kernel/iscsi.h | 2 +- iscsi-scst/kernel/nthread.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index f47da8ba5..6f6833ac1 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -2138,7 +2138,7 @@ void cmnd_tx_start(struct iscsi_cmnd *cmnd) set_cork(conn->sock, 1); - conn->write_iop = (void __force __user *)(conn->write_iov); + conn->write_iop = conn->write_iov; conn->write_iop->iov_base = (void __force __user *)(&cmnd->pdu.bhs); conn->write_iop->iov_len = sizeof(cmnd->pdu.bhs); conn->write_iop_used = 1; diff --git a/iscsi-scst/kernel/iscsi.h b/iscsi-scst/kernel/iscsi.h index e4d7ac2f2..52693c324 100644 --- a/iscsi-scst/kernel/iscsi.h +++ b/iscsi-scst/kernel/iscsi.h @@ -169,7 +169,7 @@ struct iscsi_conn { * thread. */ struct iscsi_cmnd *write_cmnd; - struct iovec __user *write_iop; + struct iovec *write_iop; int write_iop_used; struct iovec write_iov[2]; u32 write_size; diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index cc1c3bb7d..6e151c49d 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -988,7 +988,7 @@ static int write_data(struct iscsi_conn *conn) struct iscsi_cmnd *write_cmnd = conn->write_cmnd; struct iscsi_cmnd *ref_cmd; struct scatterlist *sg; - struct iovec __user *iop; + struct iovec *iop; int saved_size, size, sendsize; int offset, idx, sg_offset; int flags, res, count;