Skip to contentSkip to conversation

fc: FCP_PTA_SIMPLE is 0

PATCH In review Christoph Hellwig 5 participants 8 messages Nov 25, 2014 – Dec 4, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 fc: FCP_PTA_SIMPLE is 0

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.

---
 drivers/scsi/bnx2fc/bnx2fc_io.c   | 6 +-----
 drivers/scsi/csiostor/csio_scsi.c | 5 +----
 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/scsi/bnx2fc/bnx2fc_io.c +1 -5
index 4b56858..9ecca85 100644
@@ -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,
drivers/scsi/csiostor/csio_scsi.c +1 -4
index 4d0b6ce..6bd36c3 100644
@@ -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)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 ibmvfc: remove unused tag variable

---
 drivers/scsi/ibmvscsi/ibmvfc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ibmvscsi/ibmvfc.c +0 -1
index f58c6d8..8ac49cf 100644
@@ -1615,7 +1615,6 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd,
 	struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
 	struct ibmvfc_cmd *vfc_cmd;
 	struct ibmvfc_event *evt;
-	u8 tag[2];
 	int rc;
 
 	if (unlikely((rc = fc_remote_port_chkready(rport))) ||
Signature · 1 line
1.9.1
#5 lore raw
In reply to Christoph Hellwig

Any chance to get reviews for these two patches?

Quoted 52 lines · Christoph Hellwig

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.

---
 drivers/scsi/bnx2fc/bnx2fc_io.c   | 6 +-----
 drivers/scsi/csiostor/csio_scsi.c | 5 +----
 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/scsi/bnx2fc/bnx2fc_io.c +1 -5
index 4b56858..9ecca85 100644
@@ -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,
drivers/scsi/csiostor/csio_scsi.c +1 -4
index 4d0b6ce..6bd36c3 100644
@@ -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)
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

---end quoted text---

Reviewed-by on v1 1/2
#6 lore raw
In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

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.

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ibmvfc: remove unused tag variable

In reply to Christoph Hellwig
Quoted 12 lines · Christoph Hellwig
---
 drivers/scsi/ibmvscsi/ibmvfc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ibmvscsi/ibmvfc.c +0 -0
index f58c6d8..8ac49cf 100644

drivers/scsi/ibmvscsi/ibmvfc.c static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd, · line 1620

Quoted 7 lines
drivers/scsi/ibmvscsi/ibmvfc.c +0 -1
@@ -1615,7 +1615,6 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd,
 	struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
 	struct ibmvfc_cmd *vfc_cmd;
 	struct ibmvfc_event *evt;
-	u8 tag[2];
 	int rc;
 
 	if (unlikely((rc = fc_remote_port_chkready(rport))) ||

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by
#3 lore raw

Re: [PATCH 2/2] ibmvfc: remove unused tag variable

Quoted 18 lines · Hannes Reinecke
Quoted 17 lines · Christoph Hellwig
---
 drivers/scsi/ibmvscsi/ibmvfc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ibmvscsi/ibmvfc.c +0 -1
index f58c6d8..8ac49cf 100644
@@ -1615,7 +1615,6 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd,
 	struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
 	struct ibmvfc_cmd *vfc_cmd;
 	struct ibmvfc_event *evt;
-	u8 tag[2];
 	int rc;
 
Quoted 3 lines

drivers/scsi/ibmvscsi/ibmvfc.c static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd, · line 1620

Quoted 2 lines
drivers/scsi/ibmvscsi/ibmvfc.c +0 -0
 	if (unlikely((rc = fc_remote_port_chkready(rport))) ||

Thanks,

Brian

Signature · 3 lines
Brian King
Power Linux I/O
IBM Linux Technology Center