Skip to contentSkip to conversation

qla4xxx: silence a Sparse warning

PATCH In review Dan Carpenter 2 participants 2 messages Feb 21, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qla4xxx: silence a Sparse warning

Sparse complains that the definition of this funciton doesn't match the implementation. The "uint32_t aen_code" should be an enum.

drivers/scsi/qla4xxx/ql4_os.c:2966:5: error: symbol
'qla4xxx_post_aen_work' redeclared with different type (originally declared at drivers/scsi/qla4xxx/ql4_glbl.h:184)
- incompatible argument 2 (different signedness)

drivers/scsi/qla4xxx/ql4_glbl.h +2 -1
index 954ba91..71bbc07 100644
@@ -181,7 +181,8 @@ int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
 int qla4xxx_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
 		       struct ddb_entry *ddb_entry, uint32_t state);
 void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset);
-int qla4xxx_post_aen_work(struct scsi_qla_host *ha, uint32_t aen_code,
+int qla4xxx_post_aen_work(struct scsi_qla_host *ha,
+			  enum iscsi_host_event_code aen_code,
 			  uint32_t data_size, uint8_t *data);
 int qla4xxx_ping_iocb(struct scsi_qla_host *ha, uint32_t options,
 		      uint32_t payload_size, uint32_t pid, uint8_t *ipaddr);
Acked-by on v1 1/1
#1 lore raw

-----Original Message-----
From: Dan Carpenter <[email protected]>
Date: Mon, 20 Feb 2012 23:30:12 -0800
To: Ravi Anand <[email protected]>
Cc: Vikas Chaudhary <[email protected]>, Dept-Eng iSCSI Driver <[email protected]>, "James E.J. Bottomley" <[email protected]>, scsi <[email protected]>, "[email protected]" <[email protected]>
Subject: [patch] [SCSI] qla4xxx: silence a Sparse warning

Quoted 25 lines

Sparse complains that the definition of this funciton doesn't match the implementation. The "uint32_t aen_code" should be an enum.

drivers/scsi/qla4xxx/ql4_os.c:2966:5: error: symbol
'qla4xxx_post_aen_work' redeclared with different type (originally declared at drivers/scsi/qla4xxx/ql4_glbl.h:184)
- incompatible argument 2 (different signedness)

drivers/scsi/qla4xxx/ql4_glbl.h +2 -1
index 954ba91..71bbc07 100644
@@ -181,7 +181,8 @@ int qla4xxx_flash_ddb_change(struct scsi_qla_host
 *ha, uint32_t fw_ddb_index,
 int qla4xxx_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
                     struct ddb_entry *ddb_entry, uint32_t state);
 void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset);
-int qla4xxx_post_aen_work(struct scsi_qla_host *ha, uint32_t aen_code,
+int qla4xxx_post_aen_work(struct scsi_qla_host *ha,
+                        enum iscsi_host_event_code aen_code,
                        uint32_t data_size, uint8_t *data);
 int qla4xxx_ping_iocb(struct scsi_qla_host *ha, uint32_t options,
Quoted 1 line
                    uint32_t payload_size, uint32_t pid, uint8_t *ipaddr);

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.