]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
fc: FCP_PTA_SIMPLE is 0
authorChristoph Hellwig <hch@lst.de>
Tue, 25 Nov 2014 14:50:09 +0000 (15:50 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 4 Dec 2014 08:58:33 +0000 (09:58 +0100)
Not need to have an if/else to either assign FCP_PTA_SIMPLE or 0
to a variable.

Btw, it seems we really should factor generating a fcp cmnd from
a scsi_cmnd into a common helper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/bnx2fc/bnx2fc_io.c
drivers/scsi/csiostor/csio_scsi.c

index 4b56858c1df29f17fb5867158ec50eb683ae8b44..9ecca8504f60e64084e1e55487602011e7386e30 100644 (file)
@@ -1737,11 +1737,7 @@ void bnx2fc_build_fcp_cmnd(struct bnx2fc_cmd *io_req,
        fcp_cmnd->fc_pri_ta = 0;
        fcp_cmnd->fc_tm_flags = io_req->mp_req.tm_flags;
        fcp_cmnd->fc_flags = io_req->io_req_flags;
-
-       if (sc_cmd->flags & SCMD_TAGGED)
-               fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
-       else
-               fcp_cmnd->fc_pri_ta = 0;
+       fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
 }
 
 static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
index 4d0b6ce55f20ee8190bd2b7126d643471710e8fa..6bd36c311bee27952eb437efb45ffc9b57100708 100644 (file)
@@ -172,10 +172,7 @@ csio_scsi_fcp_cmnd(struct csio_ioreq *req, void *addr)
                fcp_cmnd->fc_cmdref = 0;
 
                memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16);
-               if (scmnd->flags & SCMD_TAGGED)
-                       fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
-               else
-                       fcp_cmnd->fc_pri_ta = 0;
+               fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
                fcp_cmnd->fc_dl = cpu_to_be32(scsi_bufflen(scmnd));
 
                if (req->nsge)