Skip to contentSkip to conversation

virtio_balloon: Adjust label in virtballoon_probe

PATCH In review Nathan Chancellor 2 participants 5 messages Feb 16, 2020 – Feb 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_balloon: Adjust label in virtballoon_probe

Clang warns when CONFIG_BALLOON_COMPACTION is unset:

../drivers/virtio/virtio_balloon.c:963:1: warning: unused label 'out_del_vqs' [-Wunused-label]
out_del_vqs:
^~~~~~~~~~~~
1 warning generated.

Move the label within the preprocessor block since it is only used when CONFIG_BALLOON_COMPACTION is set.

Fixes 1ad6f58ea936 ("virtio_balloon: Fix memory leaks on errors in virtballoon_probe()")
---
 drivers/virtio/virtio_balloon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_balloon.c +1 -1
index 7bfe365d9372..341458fd95ca 100644
@@ -959,8 +959,8 @@ static int virtballoon_probe(struct virtio_device *vdev)
 	iput(vb->vb_dev_info.inode);
 out_kern_unmount:
 	kern_unmount(balloon_mnt);
-#endif
 out_del_vqs:
+#endif
 	vdev->config->del_vqs(vdev);
 out_free_vb:
 	kfree(vb);
Signature · 1 line
2.25.0
#1 lore raw
Quoted 4 lines

Am 16.02.2020 um 01:41 schrieb Nathan Chancellor <[email protected]>:

Quoted 8 lines

Clang warns when CONFIG_BALLOON_COMPACTION is unset:

../drivers/virtio/virtio_balloon.c:963:1: warning: unused label 'out_del_vqs' [-Wunused-label]
out_del_vqs:
^~~~~~~~~~~~
1 warning generated.

Thanks, there is already „ [PATCH] virtio_balloon: Fix unused label warning“ from Boris on the list.

Cheers!

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#2 lore raw
Quoted 13 lines · David Hildenbrand
Quoted 4 lines

Am 16.02.2020 um 01:41 schrieb Nathan Chancellor <[email protected]>:

Quoted 8 lines

Clang warns when CONFIG_BALLOON_COMPACTION is unset:

../drivers/virtio/virtio_balloon.c:963:1: warning: unused label 'out_del_vqs' [-Wunused-label]
out_del_vqs:
^~~~~~~~~~~~
1 warning generated.

Quoted 4 lines

Thanks, there is already „ [PATCH] virtio_balloon: Fix unused label warning“ from Boris on the list.

Cheers!

Sorry for the noise, I thought I did a search for duplicate patches but seems I missed it :/ I've commented on that patch.

Cheers,
Nathan

#3 lore raw
Quoted 18 lines

Am 16.02.2020 um 08:47 schrieb Nathan Chancellor <[email protected]>:

Quoted 13 lines · David Hildenbrand
Quoted 12 lines
Quoted 3 lines

Am 16.02.2020 um 01:41 schrieb Nathan Chancellor <[email protected]>:

Clang warns when CONFIG_BALLOON_COMPACTION is unset:

../drivers/virtio/virtio_balloon.c:963:1: warning: unused label 'out_del_vqs' [-Wunused-label]
out_del_vqs:
^~~~~~~~~~~~
1 warning generated.

Quoted 7 lines
Quoted 4 lines

Thanks, there is already „ [PATCH] virtio_balloon: Fix unused label warning“ from Boris on the list.

Cheers!

Sorry for the noise, I thought I did a search for duplicate patches but seems I missed it :/ I've commented on that patch.

Your patch should be the correct one! :)

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reviewed-by on v1 1/1
#4 lore raw
In reply to Nathan Chancellor
Quoted 24 lines · Nathan Chancellor

Clang warns when CONFIG_BALLOON_COMPACTION is unset:

../drivers/virtio/virtio_balloon.c:963:1: warning: unused label 'out_del_vqs' [-Wunused-label]
out_del_vqs:
^~~~~~~~~~~~
1 warning generated.

Move the label within the preprocessor block since it is only used when CONFIG_BALLOON_COMPACTION is set.

Fixes 1ad6f58ea936 ("virtio_balloon: Fix memory leaks on errors in virtballoon_probe()")
---
 drivers/virtio/virtio_balloon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_balloon.c +0 -0
index 7bfe365d9372..341458fd95ca 100644

drivers/virtio/virtio_balloon.c static int virtballoon_probe(struct virtio_device *vdev) · line 966

Quoted 9 lines
drivers/virtio/virtio_balloon.c +1 -1
@@ -959,8 +959,8 @@ static int virtballoon_probe(struct virtio_device *vdev)
 	iput(vb->vb_dev_info.inode);
 out_kern_unmount:
 	kern_unmount(balloon_mnt);
-#endif
 out_del_vqs:
+#endif
 	vdev->config->del_vqs(vdev);
 out_free_vb:
 	kfree(vb);
Signature · 3 lines
Thanks,

David / dhildenb