Skip to content

Commit

Permalink
[S390] sparse: fix sparse symbol shadow warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Schwidefsky committed Oct 30, 2011
1 parent 246ccea commit 7bf4074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/s390/kvm/kvm_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 7bf4074

Please sign in to comment.