Commit b6130cea authored by Vikas Chaudhary's avatar Vikas Chaudhary Committed by James Bottomley

[SCSI] qla4xxx: Silence gcc warning

Fix followig gcc warning:-
drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_get_param’:
drivers/scsi/qla4xxx/ql4_os.c:6279:
warning: comparison is always true due to limited range of data type
drivers/scsi/qla4xxx/ql4_os.c:6290:
warning: comparison is always true due to limited range of data type
drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_delete’:
drivers/scsi/qla4xxx/ql4_os.c:6593:
warning: ‘ddb_size’ may be used uninitialized in this function
Signed-off-by: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 631d706e
...@@ -6276,8 +6276,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, ...@@ -6276,8 +6276,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess,
rc = sprintf(buf, "\n"); rc = sprintf(buf, "\n");
break; break;
case ISCSI_FLASHNODE_DISCOVERY_PARENT_IDX: case ISCSI_FLASHNODE_DISCOVERY_PARENT_IDX:
if ((fnode_sess->discovery_parent_idx) >= 0 && if (fnode_sess->discovery_parent_idx < MAX_DDB_ENTRIES)
(fnode_sess->discovery_parent_idx < MAX_DDB_ENTRIES))
parent_index = fnode_sess->discovery_parent_idx; parent_index = fnode_sess->discovery_parent_idx;
rc = sprintf(buf, "%u\n", parent_index); rc = sprintf(buf, "%u\n", parent_index);
...@@ -6287,8 +6286,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, ...@@ -6287,8 +6286,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess,
parent_type = ISCSI_DISC_PARENT_ISNS; parent_type = ISCSI_DISC_PARENT_ISNS;
else if (fnode_sess->discovery_parent_type == DDB_NO_LINK) else if (fnode_sess->discovery_parent_type == DDB_NO_LINK)
parent_type = ISCSI_DISC_PARENT_UNKNOWN; parent_type = ISCSI_DISC_PARENT_UNKNOWN;
else if (fnode_sess->discovery_parent_type >= 0 && else if (fnode_sess->discovery_parent_type < MAX_DDB_ENTRIES)
fnode_sess->discovery_parent_type < MAX_DDB_ENTRIES)
parent_type = ISCSI_DISC_PARENT_SENDTGT; parent_type = ISCSI_DISC_PARENT_SENDTGT;
else else
parent_type = ISCSI_DISC_PARENT_UNKNOWN; parent_type = ISCSI_DISC_PARENT_UNKNOWN;
...@@ -6590,7 +6588,7 @@ static int qla4xxx_sysfs_ddb_delete(struct iscsi_bus_flash_session *fnode_sess) ...@@ -6590,7 +6588,7 @@ static int qla4xxx_sysfs_ddb_delete(struct iscsi_bus_flash_session *fnode_sess)
struct dev_db_entry *fw_ddb_entry = NULL; struct dev_db_entry *fw_ddb_entry = NULL;
dma_addr_t fw_ddb_entry_dma; dma_addr_t fw_ddb_entry_dma;
uint16_t *ddb_cookie = NULL; uint16_t *ddb_cookie = NULL;
size_t ddb_size; size_t ddb_size = 0;
void *pddb = NULL; void *pddb = NULL;
int target_id; int target_id;
int rc = 0; int rc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment