lkml.org 
[lkml]   [2021]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 4/6] hisi-acc-vfio-pci: add new vfio_pci driver for HiSilicon ACC devices
Date


> -----Original Message-----
> From: Jason Gunthorpe [mailto:jgg@nvidia.com]
> Sent: 15 September 2021 13:52
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-crypto@vger.kernel.org; alex.williamson@redhat.com;
> mgurtovoy@nvidia.com; Linuxarm <linuxarm@huawei.com>; liulongfang
> <liulongfang@huawei.com>; Zengtao (B) <prime.zeng@hisilicon.com>;
> Jonathan Cameron <jonathan.cameron@huawei.com>; Wangzhou (B)
> <wangzhou1@hisilicon.com>
> Subject: Re: [PATCH v3 4/6] hisi-acc-vfio-pci: add new vfio_pci driver for
> HiSilicon ACC devices
>
> On Wed, Sep 15, 2021 at 10:50:35AM +0100, Shameer Kolothum wrote:
> > +static const struct vfio_device_ops hisi_acc_vfio_pci_ops = {
> > + .name = "hisi-acc-vfio-pci",
> > + .open_device = hisi_acc_vfio_pci_open_device,
> > + .close_device = vfio_pci_core_close_device,
> > + .ioctl = vfio_pci_core_ioctl,
> > + .read = vfio_pci_core_read,
> > + .write = vfio_pci_core_write,
> > + .mmap = vfio_pci_core_mmap,
> > + .request = vfio_pci_core_request,
> > + .match = vfio_pci_core_match,
> > +};
>
> Avoid horizontal alignments please

Sure.

>
> > +static void hisi_acc_vfio_pci_remove(struct pci_dev *pdev) {
> > + struct vfio_pci_core_device *vdev = dev_get_drvdata(&pdev->dev);
> > +
> > + vfio_pci_core_unregister_device(vdev);
> > + vfio_pci_core_uninit_device(vdev);
> > + kfree(vdev);
> > +}
> > +
> > +static const struct pci_device_id hisi_acc_vfio_pci_table[] = {
> > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI,
> SEC_VF_PCI_DEVICE_ID) },
> > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI,
> HPRE_VF_PCI_DEVICE_ID) },
> > + { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_HUAWEI,
> ZIP_VF_PCI_DEVICE_ID) },
> > + { 0, }
>
> Just {}

Ok.


> > +};
> > +
> > +MODULE_DEVICE_TABLE(pci, hisi_acc_vfio_pci_table);
> > +
> > +static struct pci_driver hisi_acc_vfio_pci_driver = {
> > + .name = "hisi-acc-vfio-pci",
>
> This shoud be KBUILD_MODNAME, the string must always match the module
> name

Ok. Will update.

Thanks,
Shameer

\
 
 \ /
  Last update: 2021-09-15 15:37    [W:0.571 / U:3.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site