From: Hannes Reinecke Date: Thu, 14 Jul 2016 00:05:44 +0000 (+0900) Subject: libsas: use ata_is_ncq() and ata_has_dma() accessors X-Git-Tag: v4.14-rc1~2839^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b38d4d85b89c68b2748a5e225185073424510486;p=platform%2Fkernel%2Flinux-rpi.git libsas: use ata_is_ncq() and ata_has_dma() accessors Use accessors instead of the raw protocol value. Signed-off-by: Hannes Reinecke [hch: trivial cleanup of the ata_task assignments] Signed-off-by: Christoph Hellwig Signed-off-by: Tejun Heo --- diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 935c430..497bc15 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -233,15 +233,8 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) task->task_state_flags = SAS_TASK_STATE_PENDING; qc->lldd_task = task; - switch (qc->tf.protocol) { - case ATA_PROT_NCQ: - task->ata_task.use_ncq = 1; - /* fall through */ - case ATAPI_PROT_DMA: - case ATA_PROT_DMA: - task->ata_task.dma_xfer = 1; - break; - } + task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol); + task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol); if (qc->scsicmd) ASSIGN_SAS_TASK(qc->scsicmd, task);