* [PATCH] virtio scsi: fix unused variable warning
@ 2015-06-30 0:59 Stephen Rothwell
2015-07-03 16:04 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2015-06-30 0:59 UTC (permalink / raw)
To: James Bottomley
Cc: linux-scsi, linux-kernel, Christoph Hellwig, Michael S. Tsirkin
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
Fixes:
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>
---
drivers/scsi/virtio_scsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 285f77544c36..7dbbb29d24c6 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -949,7 +949,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;
@@ -1009,6 +1009,8 @@ static int virtscsi_probe(struct virtio_device *vdev)
#ifdef CONFIG_BLK_DEV_INTEGRITY
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;
--
2.1.4
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio scsi: fix unused variable warning
2015-06-30 0:59 [PATCH] virtio scsi: fix unused variable warning Stephen Rothwell
@ 2015-07-03 16:04 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2015-07-03 16:04 UTC (permalink / raw)
To: Stephen Rothwell
Cc: James Bottomley, linux-scsi, linux-kernel, Christoph Hellwig,
Michael S. Tsirkin
On Tue, Jun 30, 2015 at 10:59:04AM +1000, Stephen Rothwell wrote:
> Fixes:
>
> 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>
Thanks, this looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-03 16:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-30 0:59 [PATCH] virtio scsi: fix unused variable warning Stephen Rothwell
2015-07-03 16:04 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).