diff mbox

[v2,11/12] virtio: Remove code that zeroes driver-private command data

Message ID 20170601232711.29062-12-bart.vanassche@sandisk.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Bart Van Assche June 1, 2017, 11:27 p.m. UTC
Since the SCSI core zeroes driver-private command data, remove
that code from the virtio driver.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/virtio_scsi.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Christoph Hellwig June 2, 2017, 7:23 a.m. UTC | #1
Nit: the driver name is virtio_scsi, not just virtio.

Otherwise this looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Bart Van Assche June 2, 2017, 9:01 p.m. UTC | #2
On Fri, 2017-06-02 at 09:23 +0200, Christoph Hellwig wrote:
> Nit: the driver name is virtio_scsi, not just virtio.

Hello Christoph,

I will update the patch title.

Bart.
diff mbox

Patch

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index f8dbfeee6c63..dc2e97c543a5 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -547,7 +547,6 @@  static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
 	dev_dbg(&sc->device->sdev_gendev,
 		"cmd %p CDB: %#02x\n", sc, sc->cmnd[0]);
 
-	memset(cmd, 0, sizeof(*cmd));
 	cmd->sc = sc;
 
 	BUG_ON(sc->cmd_len > VIRTIO_SCSI_CDB_SIZE);