struct lpfc_iocbq *iocb, *next_iocb; IOCB_t *cmd = NULL; struct lpfc_scsi_buf *lpfc_cmd; int sum = 0, ret_val = 0;
struct lpfc_iocbq *iocbq; int sum, i;
lpfc_sli_sum_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,		uint16_t tgt_id, uint64_t lun_id, lpfc_ctx_cmd ctx_cmd){	struct lpfc_iocbq *iocb, *next_iocb;	IOCB_t *cmd = NULL;	struct lpfc_scsi_buf *lpfc_cmd;	int sum = 0, ret_val = 0;	/* Next check the txcmplq */	list_for_each_entry_safe(iocb, next_iocb, &pring->txcmplq, list) {		cmd = &iocb->iocb;		/* Must be a FCP command */		if ((cmd->ulpCommand != CMD_FCP_ICMND64_CR) &&		    (cmd->ulpCommand != CMD_FCP_IWRITE64_CR) &&		    (cmd->ulpCommand != CMD_FCP_IREAD64_CR)) {			continue;		}		/* context1 MUST be a struct lpfc_scsi_buf */		lpfc_cmd = (struct lpfc_scsi_buf *) (iocb->context1);		ret_val = lpfc_sli_validate_iocb_cmd(lpfc_cmd, tgt_id, lun_id,						     NULL, 0, ctx_cmd);		if (ret_val != 0)			continue;		sum++;	}	return sum;}