All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0
@ 2014-11-25 14:50 Christoph Hellwig
  2014-11-25 14:50 ` [PATCH 2/2] ibmvfc: remove unused tag variable Christoph Hellwig
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christoph Hellwig @ 2014-11-25 14:50 UTC (permalink / raw)
  To: linux-scsi

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>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c   | 6 +-----
 drivers/scsi/csiostor/csio_scsi.c | 5 +----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 4b56858..9ecca85 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -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,
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 4d0b6ce..6bd36c3 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] ibmvfc: remove unused tag variable
  2014-11-25 14:50 [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
@ 2014-11-25 14:50 ` Christoph Hellwig
  2014-12-03 14:10   ` Hannes Reinecke
  2014-12-04  2:24   ` Martin K. Petersen
  2014-12-03  9:31 ` [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2014-11-25 14:50 UTC (permalink / raw)
  To: linux-scsi

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/ibmvscsi/ibmvfc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index f58c6d8..8ac49cf 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -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))) ||
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0
  2014-11-25 14:50 [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
  2014-11-25 14:50 ` [PATCH 2/2] ibmvfc: remove unused tag variable Christoph Hellwig
@ 2014-12-03  9:31 ` Christoph Hellwig
  2014-12-03 14:09 ` Hannes Reinecke
  2014-12-04  2:24 ` Martin K. Petersen
  3 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2014-12-03  9:31 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-scsi, Hannes Reinecke, Martin K. Petersen, Ewan D. Milne

Any chance to get reviews for these two patches?

On Tue, Nov 25, 2014 at 03:50:09PM +0100, Christoph Hellwig wrote:
> 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>
> ---
>  drivers/scsi/bnx2fc/bnx2fc_io.c   | 6 +-----
>  drivers/scsi/csiostor/csio_scsi.c | 5 +----
>  2 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 4b56858..9ecca85 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -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,
> diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
> index 4d0b6ce..6bd36c3 100644
> --- a/drivers/scsi/csiostor/csio_scsi.c
> +++ b/drivers/scsi/csiostor/csio_scsi.c
> @@ -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)
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
---end quoted text---

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0
  2014-11-25 14:50 [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
  2014-11-25 14:50 ` [PATCH 2/2] ibmvfc: remove unused tag variable Christoph Hellwig
  2014-12-03  9:31 ` [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
@ 2014-12-03 14:09 ` Hannes Reinecke
  2014-12-04  2:24 ` Martin K. Petersen
  3 siblings, 0 replies; 8+ messages in thread
From: Hannes Reinecke @ 2014-12-03 14:09 UTC (permalink / raw)
  To: Christoph Hellwig, linux-scsi

On 11/25/2014 03:50 PM, Christoph Hellwig wrote:
> 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: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] ibmvfc: remove unused tag variable
  2014-11-25 14:50 ` [PATCH 2/2] ibmvfc: remove unused tag variable Christoph Hellwig
@ 2014-12-03 14:10   ` Hannes Reinecke
  2014-12-03 14:36     ` Brian King
  2014-12-04  2:24   ` Martin K. Petersen
  1 sibling, 1 reply; 8+ messages in thread
From: Hannes Reinecke @ 2014-12-03 14:10 UTC (permalink / raw)
  To: Christoph Hellwig, linux-scsi

On 11/25/2014 03:50 PM, Christoph Hellwig wrote:
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/scsi/ibmvscsi/ibmvfc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
> index f58c6d8..8ac49cf 100644
> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
> @@ -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))) ||
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] ibmvfc: remove unused tag variable
  2014-12-03 14:10   ` Hannes Reinecke
@ 2014-12-03 14:36     ` Brian King
  0 siblings, 0 replies; 8+ messages in thread
From: Brian King @ 2014-12-03 14:36 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig, linux-scsi

On 12/03/2014 08:10 AM, Hannes Reinecke wrote:
> On 11/25/2014 03:50 PM, Christoph Hellwig wrote:
>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>> ---
>>  drivers/scsi/ibmvscsi/ibmvfc.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
>> index f58c6d8..8ac49cf 100644
>> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
>> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
>> @@ -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))) ||
>>
> Reviewed-by: Hannes Reinecke <hare@suse.de>

Acked-by: Brian King <brking@linux.vnet.ibm.com>

Thanks,

Brian

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0
  2014-11-25 14:50 [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
                   ` (2 preceding siblings ...)
  2014-12-03 14:09 ` Hannes Reinecke
@ 2014-12-04  2:24 ` Martin K. Petersen
  3 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2014-12-04  2:24 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

>>>>> "Christoph" == Christoph Hellwig <hch@lst.de> writes:

Christoph> Not need to have an if/else to either assign FCP_PTA_SIMPLE
Christoph> or 0 to a variable.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] ibmvfc: remove unused tag variable
  2014-11-25 14:50 ` [PATCH 2/2] ibmvfc: remove unused tag variable Christoph Hellwig
  2014-12-03 14:10   ` Hannes Reinecke
@ 2014-12-04  2:24   ` Martin K. Petersen
  1 sibling, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2014-12-04  2:24 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

>>>>> "Christoph" == Christoph Hellwig <hch@lst.de> writes:

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-04  2:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-25 14:50 [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
2014-11-25 14:50 ` [PATCH 2/2] ibmvfc: remove unused tag variable Christoph Hellwig
2014-12-03 14:10   ` Hannes Reinecke
2014-12-03 14:36     ` Brian King
2014-12-04  2:24   ` Martin K. Petersen
2014-12-03  9:31 ` [PATCH 1/2] fc: FCP_PTA_SIMPLE is 0 Christoph Hellwig
2014-12-03 14:09 ` Hannes Reinecke
2014-12-04  2:24 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.