Skip to content

Commit

Permalink
virtio scsi: fix unused variable warning
Browse files Browse the repository at this point in the history
drivers/scsi/virtio_scsi.c: In function 'virtscsi_probe':
drivers/scsi/virtio_scsi.c:952:11: warning: unused variable 'host_prot' [-Wunused-variable]
  int err, host_prot;
           ^

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Stephen Rothwell authored and Michael S. Tsirkin committed Jul 7, 2015
1 parent bcfeaca commit 908a554
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/virtio_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ static int virtscsi_probe(struct virtio_device *vdev)
{
struct Scsi_Host *shost;
struct virtio_scsi *vscsi;
int err, host_prot;
int err;
u32 sg_elems, num_targets;
u32 cmd_per_lun;
u32 num_queues;
Expand Down Expand Up @@ -1003,6 +1003,8 @@ static int virtscsi_probe(struct virtio_device *vdev)
shost->nr_hw_queues = num_queues;

if (virtio_has_feature(vdev, VIRTIO_SCSI_F_T10_PI)) {
int host_prot;

host_prot = SHOST_DIF_TYPE1_PROTECTION | SHOST_DIF_TYPE2_PROTECTION |
SHOST_DIF_TYPE3_PROTECTION | SHOST_DIX_TYPE1_PROTECTION |
SHOST_DIX_TYPE2_PROTECTION | SHOST_DIX_TYPE3_PROTECTION;
Expand Down

0 comments on commit 908a554

Please sign in to comment.