Patch "virtio-mmio: Use to_virtio_mmio_device() to simply code" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    virtio-mmio: Use to_virtio_mmio_device() to simply code

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     virtio-mmio-use-to_virtio_mmio_device-to-simply-code.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9b36c3848a5d3108803e51ac4d9f3701e0389b84
Author: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
Date:   Mon Feb 22 13:57:24 2021 +0800

    virtio-mmio: Use to_virtio_mmio_device() to simply code
    
    [ Upstream commit da98b54d02981de5b07d8044b2a632bf6ba3ac45 ]
    
    The file virtio_mmio.c has defined the function to_virtio_mmio_device,
    so use it instead of container_of() to simply code.
    
    Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210222055724.220-1-tangbin@xxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Stable-dep-of: 55c91fedd03d ("virtio-mmio: don't break lifecycle of vm_dev")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index dd8fec8738564..e39b530b218a2 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -542,8 +542,7 @@ static void virtio_mmio_release_dev(struct device *_d)
 {
 	struct virtio_device *vdev =
 			container_of(_d, struct virtio_device, dev);
-	struct virtio_mmio_device *vm_dev =
-			container_of(vdev, struct virtio_mmio_device, vdev);
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
 	struct platform_device *pdev = vm_dev->pdev;
 
 	devm_kfree(&pdev->dev, vm_dev);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux