diff mbox series

scsi: target: tcmu: Remove unnecessary bit TCMU_CMD_BIT_INFLIGHT

Message ID 20200619173806.5016-1-bstroesser@ts.fujitsu.com (mailing list archive)
State Accepted
Commit da3f28da1c27fed718d697bcf46bdc491563c274
Headers show
Series scsi: target: tcmu: Remove unnecessary bit TCMU_CMD_BIT_INFLIGHT | expand

Commit Message

Bodo Stroesser June 19, 2020, 5:38 p.m. UTC
Since
commit 61fb24822166 ("scsi: target: tcmu: Userspace must not complete
 queued commands")
tcmu_cmd bit TCMU_CMD_BIT_INFLIGHT is set but never checked.
So we can remove it safely.

Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
---
 drivers/target/target_core_user.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mike Christie June 19, 2020, 11:27 p.m. UTC | #1
> On Jun 19, 2020, at 12:38 PM, Bodo Stroesser <bstroesser@ts.fujitsu.com> wrote:
> 
> Since
> commit 61fb24822166 ("scsi: target: tcmu: Userspace must not complete
> queued commands")
> tcmu_cmd bit TCMU_CMD_BIT_INFLIGHT is set but never checked.
> So we can remove it safely.
> 
> Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
> ---
> drivers/target/target_core_user.c | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
> index 560bfec933bc..b38da27e033f 100644
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -181,7 +181,6 @@ struct tcmu_cmd {
> 	unsigned long deadline;
> 
> #define TCMU_CMD_BIT_EXPIRED 0
> -#define TCMU_CMD_BIT_INFLIGHT 1
> 	unsigned long flags;
> };
> /*
> @@ -1078,7 +1077,6 @@ static int queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, sense_reason_t *scsi_err)
> 	tcmu_flush_dcache_range(mb, sizeof(*mb));
> 
> 	list_add_tail(&tcmu_cmd->queue_entry, &udev->inflight_queue);
> -	set_bit(TCMU_CMD_BIT_INFLIGHT, &tcmu_cmd->flags);
> 
> 	/* TODO: only if FLUSH and FUA? */
> 	uio_event_notify(&udev->uio_info);

Acked-by: Mike Christie <michael.crhsitie@oracle.com>
Martin K. Petersen June 20, 2020, 3:26 a.m. UTC | #2
On Fri, 19 Jun 2020 19:38:06 +0200, Bodo Stroesser wrote:

> Since
> commit 61fb24822166 ("scsi: target: tcmu: Userspace must not complete
>  queued commands")
> tcmu_cmd bit TCMU_CMD_BIT_INFLIGHT is set but never checked.
> So we can remove it safely.

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: target: tcmu: Remove unnecessary bit TCMU_CMD_BIT_INFLIGHT
      https://git.kernel.org/mkp/scsi/c/da3f28da1c27
diff mbox series

Patch

diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 560bfec933bc..b38da27e033f 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -181,7 +181,6 @@  struct tcmu_cmd {
 	unsigned long deadline;
 
 #define TCMU_CMD_BIT_EXPIRED 0
-#define TCMU_CMD_BIT_INFLIGHT 1
 	unsigned long flags;
 };
 /*
@@ -1078,7 +1077,6 @@  static int queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, sense_reason_t *scsi_err)
 	tcmu_flush_dcache_range(mb, sizeof(*mb));
 
 	list_add_tail(&tcmu_cmd->queue_entry, &udev->inflight_queue);
-	set_bit(TCMU_CMD_BIT_INFLIGHT, &tcmu_cmd->flags);
 
 	/* TODO: only if FLUSH and FUA? */
 	uio_event_notify(&udev->uio_info);