]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nvmet-fc: properly endian swap sq_head
authorChristoph Hellwig <hch@lst.de>
Fri, 21 Apr 2017 08:43:13 +0000 (10:43 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Apr 2017 07:18:26 +0000 (09:18 +0200)
Found by sparse.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
drivers/nvme/target/fc.c

index 4392b514725b553f891cbf7721481e8a6c245e13..62eba29c85fb9b5101d4a974a9392dbb2e71c72d 100644 (file)
@@ -1700,7 +1700,7 @@ nvmet_fc_prep_fcp_rsp(struct nvmet_fc_tgtport *tgtport,
            xfr_length != fod->total_length ||
            (le16_to_cpu(cqe->status) & 0xFFFE) || cqewd[0] || cqewd[1] ||
            (sqe->flags & (NVME_CMD_FUSE_FIRST | NVME_CMD_FUSE_SECOND)) ||
-           queue_90percent_full(fod->queue, cqe->sq_head))
+           queue_90percent_full(fod->queue, le16_to_cpu(cqe->sq_head)))
                send_ersp = true;
 
        /* re-set the fields */