diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 15:17:17 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 15:16:47 +0100 |
commit | 7bf4074dd9d41d28447f1b106d91ad0ad0ea454a (patch) | |
tree | 30e86deed3af3140415067953cc0a5d7060ad3ed /drivers/s390/kvm/kvm_virtio.c | |
parent | 246ccea184423ccdec3be1ca3d400cc3c547404d (diff) | |
download | linux-7bf4074dd9d41d28447f1b106d91ad0ad0ea454a.tar.bz2 |
[S390] sparse: fix sparse symbol shadow warning
to_kvmdev and dev_to_virtio both use container_of. Avoid to nest the
two macros to quiet the following sparse warning:
drivers/s390/kvm/kvm_virtio.c:337:20: warning: symbol '__mptr' shadows an earlier one
drivers/s390/kvm/kvm_virtio.c:337:20: originally declared here
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/kvm/kvm_virtio.c')
-rw-r--r-- | drivers/s390/kvm/kvm_virtio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 83c69fbc43fc..3c2c923d5c0a 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c @@ -334,10 +334,10 @@ static void scan_devices(void) */ static int match_desc(struct device *dev, void *data) { - if ((ulong)to_kvmdev(dev_to_virtio(dev))->desc == (ulong)data) - return 1; + struct virtio_device *vdev = dev_to_virtio(dev); + struct kvm_device *kdev = to_kvmdev(vdev); - return 0; + return kdev->desc == data; } /* |