[PATCH] libata: drop WARN from protocol error in ata_sff_qc_issue()

From: Tejun Heo
Date: Mon Mar 06 2017 - 15:26:54 EST


ata_sff_qc_issue() expects upper layers to never issue commands on a
command protocol that it doesn't implement. While the assumption
holds fine with the usual IO path, nothing filters based on the
command protocol in the passthrough path (which was added later),
allowing the warning to be tripped with a passthrough command with the
right (well, wrong) protocol.

Failing with AC_ERR_SYSTEM is the right thing to do anyway. Remove
the unnecessary WARN.

Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/CACT4Y+bXkvevNZU8uP6X0QVqsj6wNoUA_1exfTSOzc+SmUtMOA@xxxxxxxxxxxxxx
Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
---
drivers/ata/libata-sff.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 2bd92dc..274d6d7 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1482,7 +1482,6 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
break;

default:
- WARN_ON_ONCE(1);
return AC_ERR_SYSTEM;
}

--
2.9.3