scst, iscsi-scst: Fix RHEL 5 compilation warnings

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5615 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2014-06-20 04:03:40 +00:00
parent c833137130
commit 6b32f4ae81
3 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -1017,7 +1017,7 @@ static void iscsi_init_status_rsp(struct iscsi_cmnd *rsp,
sg_init_table(sg, 2);
sg_set_buf(&sg[0], &rsp->sense_hdr, sizeof(rsp->sense_hdr));
sg_set_buf(&sg[1], sense_buf, sense_len);
sg_set_buf(&sg[1], (u8 *)sense_buf, sense_len);
rsp->sense_hdr.length = cpu_to_be16(sense_len);
@@ -3686,7 +3686,7 @@ static int iscsi_scsi_aen(struct scst_aen *aen)
sg_init_table(sg, 2);
sg_set_buf(&sg[0], &rsp->sense_hdr, sizeof(rsp->sense_hdr));
sg_set_buf(&sg[1], sense, sense_len);
sg_set_buf(&sg[1], (u8 *)sense, sense_len);
rsp->sense_hdr.length = cpu_to_be16(sense_len);
rsp->pdu.datasize = sizeof(rsp->sense_hdr) + sense_len;
+5
View File
@@ -426,7 +426,12 @@ static void iscsi_session_info_show(struct seq_file *seq,
static int iscsi_session_seq_open(struct inode *inode, struct file *file)
{
int res;
#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 5
res = seq_open(file, (struct seq_operations *)&iscsi_seq_op);
#else
res = seq_open(file, &iscsi_seq_op);
#endif
if (!res)
((struct seq_file *)file->private_data)->private =
iscsi_session_info_show;
+4
View File
@@ -3013,7 +3013,11 @@ static int vdisk_unmap_file_range(struct scst_cmd *cmd,
static int vdisk_unmap_range(struct scst_cmd *cmd,
struct scst_vdisk_dev *virt_dev, uint64_t start_lba, uint32_t blocks)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27)
int res, err;
#else
int res;
#endif
struct file *fd = virt_dev->fd;
TRACE_ENTRY();