The patch below fixes recently introduced checkpatch complaints on whitespace
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 14 Apr 2009 17:50:11 +0000 (17:50 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 14 Apr 2009 17:50:11 +0000 (17:50 +0000)
and also fixes two (false positive) sparse warnings about uninitialized variables.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@776 d57e44dd-8a1f-0410-8b47-8ef2f437770f

iscsi-scst/kernel/iscsi.c
iscsi-scst/kernel/session.c
scst/src/dev_handlers/scst_user.c
scst/src/scst_lib.c

index c4efbf1..24c1d2c 100644 (file)
@@ -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);
index 0cb15e5..cbf71bf 100644 (file)
@@ -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;
index 172732b..82c6b36 100644 (file)
@@ -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;
index cfddd3e..f057e22 100644 (file)
@@ -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;