]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hisi_acc_vfio_pci: extract public functions for container_of
authorLongfang Liu <liulongfang@huawei.com>
Tue, 12 Nov 2024 07:33:19 +0000 (15:33 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 12 Nov 2024 21:23:10 +0000 (14:23 -0700)
commitece8a2c77b881a379d24fee4656195d809161867
treef9f89a997ee4c8a9c5a86821b1d04695b295ce40
parent9283b7392570421c22a6c8058614f5b76a46b81c
hisi_acc_vfio_pci: extract public functions for container_of

In the current driver, vdev is obtained from struct
hisi_acc_vf_core_device through the container_of function.
This method is used in many places in the driver. In order to
reduce this repetitive operation, It was extracted into
a public function.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Link: https://lore.kernel.org/r/20241112073322.54550-2-liulongfang@huawei.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c