The patch below fixes sparse warnings about int / unsigned int mismatches in
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 18 Nov 2008 18:23:08 +0000 (18:23 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Tue, 18 Nov 2008 18:23:08 +0000 (18:23 +0000)
the iscsi-scst source code.

This patch has been verified by reviewing it carefully and by verifying the
output files of the command scripts/run-regression-tests -k 2.6.27.6.

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

iscsi-scst/kernel/digest.c
iscsi-scst/kernel/digest.h
iscsi-scst/kernel/nthread.c
iscsi-scst/kernel/param.c

index 105151b..4794356 100644 (file)
@@ -23,7 +23,7 @@
 #include "digest.h"
 #include <linux/crc32c.h>
 
-void digest_alg_available(unsigned int *val)
+void digest_alg_available(int *val)
 {
 #if defined(CONFIG_LIBCRC32C_MODULE) || defined(CONFIG_LIBCRC32C)
        int crc32c = 1;
index 22cdd9d..786ce4d 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __ISCSI_DIGEST_H__
 #define __ISCSI_DIGEST_H__
 
-extern void digest_alg_available(unsigned int *val);
+extern void digest_alg_available(int *val);
 
 extern int digest_init(struct iscsi_conn *conn);
 
index f9408e4..8bbdef7 100644 (file)
@@ -457,9 +457,9 @@ static void close_conn(struct iscsi_conn *conn)
                        "wr_state %d, exp_cmd_sn %u",
                        conn, atomic_read(&conn->conn_ref_cnt),
                        conn->wr_state, session->exp_cmd_sn);
-#ifdef CONFIG_SCST_DEBUG
+
                trace_conn_close(conn);
-#endif
+
                iscsi_check_closewait(conn);
        }
 
index 6afdae3..588bf1e 100644 (file)
@@ -94,13 +94,13 @@ static void log_params(struct iscsi_sess_param *param)
 /* target_mutex supposed to be locked */
 static void sess_param_check(struct iscsi_param_info *info)
 {
-       s32 *iparam = info->session_param;
+       int32_t *iparam = info->session_param;
 
        CHECK_PARAM(info, iparam, max_connections, 1, 1);
        CHECK_PARAM(info, iparam, max_recv_data_length, 512,
-                   (s32) (ISCSI_CONN_IOV_MAX * PAGE_SIZE));
+                   (int32_t) (ISCSI_CONN_IOV_MAX * PAGE_SIZE));
        CHECK_PARAM(info, iparam, max_xmit_data_length, 512,
-                   (s32) (ISCSI_CONN_IOV_MAX * PAGE_SIZE));
+                   (int32_t) (ISCSI_CONN_IOV_MAX * PAGE_SIZE));
        CHECK_PARAM(info, iparam, error_recovery_level, 0, 0);
        CHECK_PARAM(info, iparam, data_pdu_inorder, 0, 1);
        CHECK_PARAM(info, iparam, data_sequence_inorder, 0, 1);
@@ -116,7 +116,7 @@ static void sess_param_check(struct iscsi_param_info *info)
 static void sess_param_set(struct iscsi_sess_param *param,
                           struct iscsi_param_info *info)
 {
-       u32 *iparam = info->session_param;
+       int32_t *iparam = info->session_param;
 
        SET_PARAM(param, info, iparam, initial_r2t);
        SET_PARAM(param, info, iparam, immediate_data);
@@ -142,7 +142,7 @@ static void sess_param_set(struct iscsi_sess_param *param,
 static void sess_param_get(struct iscsi_sess_param *param,
                           struct iscsi_param_info *info)
 {
-       u32 *iparam = info->session_param;
+       int32_t *iparam = info->session_param;
 
        GET_PARAM(param, info, iparam, initial_r2t);
        GET_PARAM(param, info, iparam, immediate_data);
@@ -168,7 +168,7 @@ static void sess_param_get(struct iscsi_sess_param *param,
 /* target_mutex supposed to be locked */
 static void trgt_param_check(struct iscsi_param_info *info)
 {
-       u32 *iparam = info->target_param;
+       int32_t *iparam = info->target_param;
 
        CHECK_PARAM(info, iparam, queued_cmnds, MIN_NR_QUEUED_CMNDS,
                    MAX_NR_QUEUED_CMNDS);
@@ -179,7 +179,7 @@ static void trgt_param_set(struct iscsi_target *target,
                           struct iscsi_param_info *info)
 {
        struct iscsi_trgt_param *param = &target->trgt_param;
-       u32 *iparam = info->target_param;
+       int32_t *iparam = info->target_param;
 
        SET_PARAM(param, info, iparam, queued_cmnds);
 }
@@ -188,7 +188,7 @@ static void trgt_param_set(struct iscsi_target *target,
 static void trgt_param_get(struct iscsi_trgt_param *param,
                           struct iscsi_param_info *info)
 {
-       u32 *iparam = info->target_param;
+       int32_t *iparam = info->target_param;
 
        GET_PARAM(param, info, iparam, queued_cmnds);
 }