fc: FCP_PTA_SIMPLE is 0
Subsystems (4)
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
@@ -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
@@ -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
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
@@ -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
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_SIMPLEor 0 to a variable.Btw, it seems we really should factor generating a fcp cmnd from a
scsi_cmndinto a common helper.Signed-off-by Christoph Hellwig <[email protected]>--- 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@@ -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@@ -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---
Quoted 7 lines · Christoph Hellwig
Not need to have an if/else to either assign
FCP_PTA_SIMPLEor 0 to a variable.Btw, it seems we really should factor generating a fcp cmnd from a
scsi_cmndinto a common helper.Signed-off-by Christoph Hellwig <[email protected]>
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
Re: [PATCH 2/2] ibmvfc: remove unused tag variable
In reply to Christoph HellwigQuoted 12 lines · Christoph Hellwig
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>--- drivers/scsi/ibmvscsi/ibmvfc.c | 1 - 1 file changed, 1 deletion(-)drivers/scsi/ibmvscsi/ibmvfc.c +0
-0
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
Brian King
Acked-byRe: [PATCH 2/2] ibmvfc: remove unused tag variable
Quoted 18 lines · Hannes Reinecke
Quoted 17 lines · Christoph Hellwig
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>--- drivers/scsi/ibmvscsi/ibmvfc.c | 1 - 1 file changed, 1 deletion(-)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;
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
-0if (unlikely((rc = fc_remote_port_chkready(rport))) ||Reviewed-by Hannes Reinecke <[email protected]>
Thanks,
Brian
Signature · 3 lines
Brian King Power Linux I/O IBM Linux Technology Center
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Christoph" == Christoph Hellwig <[email protected]> writes:
Christoph> Not need to have an if/else to either assign FCP_PTA_SIMPLE Christoph> or 0 to a variable.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 2/2] ibmvfc: remove unused tag variable
In reply to Christoph HellwigQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Christoph" == Christoph Hellwig <[email protected]> writes:
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering