/* This function is called with hbalock held to get next iocb in txq of the given ring. If there is any iocb in the txq, the function returns first iocb in the list after removing the iocb from the list, else it returns NULL.  */
static struct lpfc_iocbq* lpfc_sli_ringtx_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
/* This function is called with hbalock held to get next iocb in txq of the given ring. If there is any iocb in the txq, the function returns first iocb in the list after removing the iocb from the list, else it returns NULL.  */
static struct lpfc_iocbq* lpfc_sli_ringtx_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
{
	struct lpfc_iocbq *cmd_iocb;
	list_remove_head((&pring->txq), cmd_iocb, struct lpfc_iocbq, list);
	if (cmd_iocb != NULL)
		pring->txq_cnt--;
	return cmd_iocb;
}