Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio scsi: fix unused variable warning

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>

authored by

Stephen Rothwell and committed by
Michael S. Tsirkin
908a5544 bcfeacab

+3 -1
+3 -1
drivers/scsi/virtio_scsi.c
··· 944 944 { 945 945 struct Scsi_Host *shost; 946 946 struct virtio_scsi *vscsi; 947 - int err, host_prot; 947 + int err; 948 948 u32 sg_elems, num_targets; 949 949 u32 cmd_per_lun; 950 950 u32 num_queues; ··· 1003 1003 shost->nr_hw_queues = num_queues; 1004 1004 1005 1005 if (virtio_has_feature(vdev, VIRTIO_SCSI_F_T10_PI)) { 1006 + int host_prot; 1007 + 1006 1008 host_prot = SHOST_DIF_TYPE1_PROTECTION | SHOST_DIF_TYPE2_PROTECTION | 1007 1009 SHOST_DIF_TYPE3_PROTECTION | SHOST_DIX_TYPE1_PROTECTION | 1008 1010 SHOST_DIX_TYPE2_PROTECTION | SHOST_DIX_TYPE3_PROTECTION;