diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2013-04-17 05:15:26 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-05-02 15:24:40 -0400 |
commit | b6130cea43126913f86bc84bdbf3c8efe25339e1 (patch) | |
tree | 0c7940f5f41df370611ecdf631a10bdc6af5cb22 /drivers/scsi/qla4xxx | |
parent | 631d706e684e6187dbbc3cce3ee301d5b53648a8 (diff) |
[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: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index a47f99957ba8..5479cd3974fe 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -6276,8 +6276,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, | |||
6276 | rc = sprintf(buf, "\n"); | 6276 | rc = sprintf(buf, "\n"); |
6277 | break; | 6277 | break; |
6278 | case ISCSI_FLASHNODE_DISCOVERY_PARENT_IDX: | 6278 | case ISCSI_FLASHNODE_DISCOVERY_PARENT_IDX: |
6279 | if ((fnode_sess->discovery_parent_idx) >= 0 && | 6279 | if (fnode_sess->discovery_parent_idx < MAX_DDB_ENTRIES) |
6280 | (fnode_sess->discovery_parent_idx < MAX_DDB_ENTRIES)) | ||
6281 | parent_index = fnode_sess->discovery_parent_idx; | 6280 | parent_index = fnode_sess->discovery_parent_idx; |
6282 | 6281 | ||
6283 | rc = sprintf(buf, "%u\n", parent_index); | 6282 | rc = sprintf(buf, "%u\n", parent_index); |
@@ -6287,8 +6286,7 @@ qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, | |||
6287 | parent_type = ISCSI_DISC_PARENT_ISNS; | 6286 | parent_type = ISCSI_DISC_PARENT_ISNS; |
6288 | else if (fnode_sess->discovery_parent_type == DDB_NO_LINK) | 6287 | else if (fnode_sess->discovery_parent_type == DDB_NO_LINK) |
6289 | parent_type = ISCSI_DISC_PARENT_UNKNOWN; | 6288 | parent_type = ISCSI_DISC_PARENT_UNKNOWN; |
6290 | else if (fnode_sess->discovery_parent_type >= 0 && | 6289 | else if (fnode_sess->discovery_parent_type < MAX_DDB_ENTRIES) |
6291 | fnode_sess->discovery_parent_type < MAX_DDB_ENTRIES) | ||
6292 | parent_type = ISCSI_DISC_PARENT_SENDTGT; | 6290 | parent_type = ISCSI_DISC_PARENT_SENDTGT; |
6293 | else | 6291 | else |
6294 | parent_type = ISCSI_DISC_PARENT_UNKNOWN; | 6292 | parent_type = ISCSI_DISC_PARENT_UNKNOWN; |
@@ -6590,7 +6588,7 @@ static int qla4xxx_sysfs_ddb_delete(struct iscsi_bus_flash_session *fnode_sess) | |||
6590 | struct dev_db_entry *fw_ddb_entry = NULL; | 6588 | struct dev_db_entry *fw_ddb_entry = NULL; |
6591 | dma_addr_t fw_ddb_entry_dma; | 6589 | dma_addr_t fw_ddb_entry_dma; |
6592 | uint16_t *ddb_cookie = NULL; | 6590 | uint16_t *ddb_cookie = NULL; |
6593 | size_t ddb_size; | 6591 | size_t ddb_size = 0; |
6594 | void *pddb = NULL; | 6592 | void *pddb = NULL; |
6595 | int target_id; | 6593 | int target_id; |
6596 | int rc = 0; | 6594 | int rc = 0; |