From 87d971c243344f2fce8ec84289f5a2adea1329bc Mon Sep 17 00:00:00 2001 From: vlnb Date: Tue, 14 Apr 2009 17:50:11 +0000 Subject: [PATCH] The patch below fixes recently introduced checkpatch complaints on whitespace and also fixes two (false positive) sparse warnings about uninitialized variables. Signed-off-by: Bart Van Assche git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@776 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 4 ++-- iscsi-scst/kernel/session.c | 2 +- scst/src/dev_handlers/scst_user.c | 2 +- scst/src/scst_lib.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index c4efbf1..24c1d2c 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -1403,7 +1403,7 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req) if ((req_hdr->flags & ISCSI_CMD_READ) && (req_hdr->flags & ISCSI_CMD_WRITE)) { - int sz = cmnd_read_size(req); + int sz = cmnd_read_size(req); if (unlikely(sz < 0)) { PRINT_ERROR("%s", "BIDI data transfer, but initiator " "not supplied Bidirectional Read Expected Data " @@ -1535,7 +1535,7 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req) goto out; } } - + req->target_task_tag = get_next_ttt(conn); if (dir != SCST_DATA_BIDI) { req->sg = scst_cmd_get_sg(scst_cmd); diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index 0cb15e5..cbf71bf 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -130,7 +130,7 @@ void sess_reinst_finished(struct iscsi_session *sess) int session_add(struct iscsi_target *target, struct iscsi_kern_session_info *info) { - struct iscsi_session *new_sess, *sess, *old_sess; + struct iscsi_session *new_sess = NULL, *sess, *old_sess; int err = 0; union iscsi_sid sid; bool reinstatement = false; diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 172732b..82c6b36 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -924,7 +924,7 @@ static int dev_user_exec(struct scst_cmd *cmd) ucmd->user_cmd.exec_cmd.data_direction = cmd->data_direction; ucmd->user_cmd.exec_cmd.partial = 0; ucmd->user_cmd.exec_cmd.timeout = cmd->timeout / HZ; - ucmd->user_cmd.exec_cmd.p_in_buf = ucmd->ubuff + + ucmd->user_cmd.exec_cmd.p_in_buf = ucmd->ubuff + (cmd->sg_cnt << PAGE_SHIFT); ucmd->user_cmd.exec_cmd.in_bufflen = cmd->in_bufflen; ucmd->user_cmd.exec_cmd.sn = cmd->tgt_sn; diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index cfddd3e..f057e22 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -1014,7 +1014,7 @@ static struct scst_tgt_dev *scst_alloc_add_tgt_dev(struct scst_session *sess, struct scst_acg_dev *acg_dev) { int ini_sg, ini_unchecked_isa_dma, ini_use_clustering; - struct scst_tgt_dev *tgt_dev, *t; + struct scst_tgt_dev *tgt_dev, *t = NULL; struct scst_device *dev = acg_dev->dev; struct list_head *sess_tgt_dev_list_head; struct scst_tgt_template *vtt = sess->tgt->tgtt; -- 2.17.1