mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 04:31:26 +00:00
Signed/unsigned cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -180,7 +180,7 @@ static struct proc_dir_entry *proc_iscsi_dir;
|
||||
|
||||
void iscsi_procfs_exit(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (!proc_iscsi_dir)
|
||||
return;
|
||||
@@ -193,7 +193,8 @@ void iscsi_procfs_exit(void)
|
||||
|
||||
int __init iscsi_procfs_init(void)
|
||||
{
|
||||
int i, err = 0;
|
||||
unsigned int i;
|
||||
int err = 0;
|
||||
struct proc_dir_entry *ent;
|
||||
|
||||
proc_iscsi_dir = scst_proc_get_tgt_root(&iscsi_template);
|
||||
|
||||
@@ -111,7 +111,7 @@ static u32 digest_header(struct iscsi_pdu *pdu)
|
||||
static u32 digest_data(struct iscsi_cmnd *cmd, u32 osize, u32 offset)
|
||||
{
|
||||
struct scatterlist *sg = cmd->sg;
|
||||
int idx, count;
|
||||
unsigned int idx, count;
|
||||
struct scatterlist saved_sg;
|
||||
u32 size = (osize + 3) & ~3;
|
||||
u32 crc;
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
|
||||
#if !defined(CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION)
|
||||
#warning "Patch put_page_callback-<kernel-version>.patch not applied on your \
|
||||
kernel. ISCSI-SCST will run in the performance degraded mode. Refer \
|
||||
README file for details."
|
||||
kernel. ISCSI-SCST will be working with not the best performance."
|
||||
#endif
|
||||
|
||||
#define ISCSI_INIT_WRITE_WAKE 0x1
|
||||
@@ -690,7 +689,7 @@ static struct iscsi_cmnd *create_status_rsp(struct iscsi_cmnd *req, int status,
|
||||
rsp->pdu.datasize = sizeof(struct iscsi_sense_data) + sense_len;
|
||||
rsp->bufflen = (rsp->pdu.datasize + 3) & -4;
|
||||
if (rsp->bufflen - rsp->pdu.datasize) {
|
||||
int i = rsp->pdu.datasize;
|
||||
unsigned int i = rsp->pdu.datasize;
|
||||
u8 *p = (u8 *)sense + i;
|
||||
|
||||
while (i < rsp->bufflen) {
|
||||
@@ -938,7 +937,7 @@ static void cmnd_prepare_get_rejected_cmd_data(struct iscsi_cmnd *cmnd)
|
||||
struct scatterlist *sg = cmnd->sg;
|
||||
char __user *addr;
|
||||
u32 size;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
TRACE_MGMT_DBG("Skipping (%p, %x %x %x %u, %p, scst state %d)", cmnd,
|
||||
cmnd_itt(cmnd), cmnd_opcode(cmnd), cmnd_hdr(cmnd)->scb[0],
|
||||
@@ -1028,8 +1027,8 @@ static int cmnd_prepare_recv_pdu(struct iscsi_conn *conn,
|
||||
struct iscsi_cmnd *cmd, u32 offset, u32 size)
|
||||
{
|
||||
struct scatterlist *sg = cmd->sg;
|
||||
int bufflen = cmd->bufflen;
|
||||
int idx, i;
|
||||
unsigned int bufflen = cmd->bufflen;
|
||||
unsigned int idx, i;
|
||||
char __user *addr;
|
||||
int res = 0;
|
||||
|
||||
@@ -1247,7 +1246,7 @@ static int noop_out_start(struct iscsi_cmnd *cmnd)
|
||||
}
|
||||
|
||||
/* We already checked it in check_segment_length() */
|
||||
sBUG_ON(cmnd->sg_cnt > ISCSI_CONN_IOV_MAX);
|
||||
sBUG_ON(cmnd->sg_cnt > (signed)ISCSI_CONN_IOV_MAX);
|
||||
|
||||
cmnd->own_sg = 1;
|
||||
cmnd->bufflen = size;
|
||||
@@ -1267,7 +1266,7 @@ static int noop_out_start(struct iscsi_cmnd *cmnd)
|
||||
* accesses to dummy_page, since for ISCSI_RESERVED_TAG
|
||||
* the data only read and then discarded.
|
||||
*/
|
||||
for (i = 0; i < ISCSI_CONN_IOV_MAX; i++) {
|
||||
for (i = 0; i < (signed)ISCSI_CONN_IOV_MAX; i++) {
|
||||
conn->read_iov[i].iov_base =
|
||||
(void __force __user *)(page_address(dummy_page));
|
||||
tmp = min_t(u32, size, PAGE_SIZE);
|
||||
|
||||
@@ -36,13 +36,13 @@ struct iscsi_sess_param {
|
||||
int initial_r2t;
|
||||
int immediate_data;
|
||||
int max_connections;
|
||||
int max_recv_data_length;
|
||||
int max_xmit_data_length;
|
||||
int max_burst_length;
|
||||
int first_burst_length;
|
||||
unsigned int max_recv_data_length;
|
||||
unsigned int max_xmit_data_length;
|
||||
unsigned int max_burst_length;
|
||||
unsigned int first_burst_length;
|
||||
int default_wait_time;
|
||||
int default_retain_time;
|
||||
int max_outstanding_r2t;
|
||||
unsigned int max_outstanding_r2t;
|
||||
int data_pdu_inorder;
|
||||
int data_sequence_inorder;
|
||||
int error_recovery_level;
|
||||
@@ -322,7 +322,7 @@ struct iscsi_cmnd {
|
||||
|
||||
struct scatterlist *sg;
|
||||
int sg_cnt;
|
||||
int bufflen;
|
||||
unsigned int bufflen;
|
||||
u32 r2t_sn;
|
||||
u32 r2t_length;
|
||||
u32 is_unsolicited_data;
|
||||
|
||||
@@ -1035,8 +1035,8 @@ static int write_data(struct iscsi_conn *conn)
|
||||
loff_t off = 0;
|
||||
int rest;
|
||||
|
||||
sBUG_ON(count > sizeof(conn->write_iov)
|
||||
/ sizeof(conn->write_iov[0]));
|
||||
sBUG_ON(count > (signed)(sizeof(conn->write_iov) /
|
||||
sizeof(conn->write_iov[0])));
|
||||
retry:
|
||||
oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
@@ -1297,7 +1297,7 @@ static void init_tx_hdigest(struct iscsi_cmnd *cmnd)
|
||||
digest_tx_header(cmnd);
|
||||
|
||||
sBUG_ON(conn->write_iop_used >=
|
||||
sizeof(conn->write_iov)/sizeof(conn->write_iov[0]));
|
||||
(signed)(sizeof(conn->write_iov)/sizeof(conn->write_iov[0])));
|
||||
|
||||
iop = &conn->write_iop[conn->write_iop_used];
|
||||
conn->write_iop_used++;
|
||||
|
||||
@@ -33,7 +33,8 @@ struct iscsi_session *session_lookup(struct iscsi_target *target, u64 sid)
|
||||
static int iscsi_session_alloc(struct iscsi_target *target,
|
||||
struct session_info *info)
|
||||
{
|
||||
int err, i;
|
||||
int err;
|
||||
unsigned int i;
|
||||
struct iscsi_session *session;
|
||||
char *name = NULL;
|
||||
|
||||
@@ -130,7 +131,7 @@ int session_add(struct iscsi_target *target, struct session_info *info)
|
||||
/* target_mutex supposed to be locked */
|
||||
int session_free(struct iscsi_session *session)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
TRACE_MGMT_DBG("Freeing session %p:%#Lx",
|
||||
session, (long long unsigned int)session->sid);
|
||||
|
||||
Reference in New Issue
Block a user