Re: [PATCH v3 47/51] virtio_scsi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 23, 2021 at 08:08:52PM -0700, Bart Van Assche wrote:
> Prepare for removal of the request pointer by using scsi_cmd_to_rq()
> instead. This patch does not change any functionality.
> 
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>

If everyone else does it, I don't mind
Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>

> ---
>  drivers/scsi/virtio_scsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index b9c86a7e3b97..8ae4b8441519 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -521,7 +521,7 @@ static void virtio_scsi_init_hdr_pi(struct virtio_device *vdev,
>  				    struct virtio_scsi_cmd_req_pi *cmd_pi,
>  				    struct scsi_cmnd *sc)
>  {
> -	struct request *rq = sc->request;
> +	struct request *rq = scsi_cmd_to_rq(sc);
>  	struct blk_integrity *bi;
>  
>  	virtio_scsi_init_hdr(vdev, (struct virtio_scsi_cmd_req *)cmd_pi, sc);
> @@ -545,7 +545,7 @@ static void virtio_scsi_init_hdr_pi(struct virtio_device *vdev,
>  static struct virtio_scsi_vq *virtscsi_pick_vq_mq(struct virtio_scsi *vscsi,
>  						  struct scsi_cmnd *sc)
>  {
> -	u32 tag = blk_mq_unique_tag(sc->request);
> +	u32 tag = blk_mq_unique_tag(scsi_cmd_to_rq(sc));
>  	u16 hwq = blk_mq_unique_tag_to_hwq(tag);
>  
>  	return &vscsi->req_vqs[hwq];




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux