nvme-scsi: remove nvme_trans_security_protocol
authorChristoph Hellwig <hch@lst.de>
Tue, 25 Apr 2017 16:56:44 +0000 (18:56 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 27 Apr 2017 06:39:32 +0000 (08:39 +0200)
This function just returns the same error code and sense data as
the default statement in the switch in the caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/scsi.c

index 988da610d6aaf98ba2bc7c75096860aa36e5ffdb..1f7671e631dd0304eb6727710740b45e0dac7971 100644 (file)
@@ -2138,15 +2138,6 @@ static int nvme_trans_request_sense(struct nvme_ns *ns, struct sg_io_hdr *hdr,
        return res;
 }
 
-static int nvme_trans_security_protocol(struct nvme_ns *ns,
-                                       struct sg_io_hdr *hdr,
-                                       u8 *cmd)
-{
-       return nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION,
-                               ILLEGAL_REQUEST, SCSI_ASC_ILLEGAL_COMMAND,
-                               SCSI_ASCQ_CAUSE_NOT_REPORTABLE);
-}
-
 static int nvme_trans_synchronize_cache(struct nvme_ns *ns,
                                        struct sg_io_hdr *hdr)
 {
@@ -2414,10 +2405,6 @@ static int nvme_scsi_translate(struct nvme_ns *ns, struct sg_io_hdr *hdr)
        case REQUEST_SENSE:
                retcode = nvme_trans_request_sense(ns, hdr, cmd);
                break;
-       case SECURITY_PROTOCOL_IN:
-       case SECURITY_PROTOCOL_OUT:
-               retcode = nvme_trans_security_protocol(ns, hdr, cmd);
-               break;
        case SYNCHRONIZE_CACHE:
                retcode = nvme_trans_synchronize_cache(ns, hdr);
                break;