diff mbox series

[v2,18/44] fnic: Fix a tracing statement

Message ID 20220208172514.3481-19-bvanassche@acm.org
State Superseded
Headers show
Series Remove the SCSI pointer from struct scsi_cmnd | expand

Commit Message

Bart Van Assche Feb. 8, 2022, 5:24 p.m. UTC
Report both the command flags and command state instead of only the
command state.

Cc: Hiral Patel <hiralpat@cisco.com>
Fixes: 4d7007b49d52 ("[SCSI] fnic: Fnic Trace Utility")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/fnic/fnic_scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hannes Reinecke Feb. 9, 2022, 7:46 a.m. UTC | #1
On 2/8/22 18:24, Bart Van Assche wrote:
> Report both the command flags and command state instead of only the
> command state.
> 
> Cc: Hiral Patel <hiralpat@cisco.com>
> Fixes: 4d7007b49d52 ("[SCSI] fnic: Fnic Trace Utility")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>   drivers/scsi/fnic/fnic_scsi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
> index 88c549f257db..549754245f7a 100644
> --- a/drivers/scsi/fnic/fnic_scsi.c
> +++ b/drivers/scsi/fnic/fnic_scsi.c
> @@ -604,7 +604,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc)
>   
>   	FNIC_TRACE(fnic_queuecommand, sc->device->host->host_no,
>   		  tag, sc, io_req, sg_count, cmd_trace,
> -		  (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc)));
> +		  (((u64)CMD_FLAGS(sc) << 32) | CMD_STATE(sc)));
>   
>   	/* if only we issued IO, will we have the io lock */
>   	if (io_lock_acquired)

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Himanshu Madhani Feb. 9, 2022, 6:05 p.m. UTC | #2
> On Feb 8, 2022, at 9:24 AM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> Report both the command flags and command state instead of only the
> command state.
> 
> Cc: Hiral Patel <hiralpat@cisco.com>
> Fixes: 4d7007b49d52 ("[SCSI] fnic: Fnic Trace Utility")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/fnic/fnic_scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
> index 88c549f257db..549754245f7a 100644
> --- a/drivers/scsi/fnic/fnic_scsi.c
> +++ b/drivers/scsi/fnic/fnic_scsi.c
> @@ -604,7 +604,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc)
> 
> 	FNIC_TRACE(fnic_queuecommand, sc->device->host->host_no,
> 		  tag, sc, io_req, sg_count, cmd_trace,
> -		  (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc)));
> +		  (((u64)CMD_FLAGS(sc) << 32) | CMD_STATE(sc)));
> 
> 	/* if only we issued IO, will we have the io lock */
> 	if (io_lock_acquired)

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 88c549f257db..549754245f7a 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -604,7 +604,7 @@  static int fnic_queuecommand_lck(struct scsi_cmnd *sc)
 
 	FNIC_TRACE(fnic_queuecommand, sc->device->host->host_no,
 		  tag, sc, io_req, sg_count, cmd_trace,
-		  (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc)));
+		  (((u64)CMD_FLAGS(sc) << 32) | CMD_STATE(sc)));
 
 	/* if only we issued IO, will we have the io lock */
 	if (io_lock_acquired)