From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03DC8C433FE for ; Wed, 15 Sep 2021 13:36:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5FEF61251 for ; Wed, 15 Sep 2021 13:36:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233440AbhIONhT convert rfc822-to-8bit (ORCPT ); Wed, 15 Sep 2021 09:37:19 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3822 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233472AbhIONhT (ORCPT ); Wed, 15 Sep 2021 09:37:19 -0400 Received: from fraeml703-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4H8h4q2gZdz67Mx2; Wed, 15 Sep 2021 21:33:47 +0800 (CST) Received: from lhreml719-chm.china.huawei.com (10.201.108.70) by fraeml703-chm.china.huawei.com (10.206.15.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Wed, 15 Sep 2021 15:35:58 +0200 Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by lhreml719-chm.china.huawei.com (10.201.108.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 15 Sep 2021 14:35:57 +0100 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2308.008; Wed, 15 Sep 2021 14:35:57 +0100 From: Shameerali Kolothum Thodi To: Jason Gunthorpe , Shameerali Kolothum Thodi CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "alex.williamson@redhat.com" , "mgurtovoy@nvidia.com" , liulongfang , "Zengtao (B)" , "Jonathan Cameron" , "Wangzhou (B)" Subject: RE: [PATCH v3 4/6] hisi-acc-vfio-pci: add new vfio_pci driver for HiSilicon ACC devices Thread-Topic: [PATCH v3 4/6] hisi-acc-vfio-pci: add new vfio_pci driver for HiSilicon ACC devices Thread-Index: AQHXqhdFSlg0yljEzk6Hfj1kozgJ0quk++8AgAAMoPA= Date: Wed, 15 Sep 2021 13:35:57 +0000 Message-ID: References: <20210915095037.1149-1-shameerali.kolothum.thodi@huawei.com> <20210915095037.1149-5-shameerali.kolothum.thodi@huawei.com> <20210915125146.GI4065468@nvidia.com> In-Reply-To: <20210915125146.GI4065468@nvidia.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.83.177] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org > -----Original Message----- > From: Jason Gunthorpe [mailto:jgg@nvidia.com] > Sent: 15 September 2021 13:52 > To: Shameerali Kolothum Thodi > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-crypto@vger.kernel.org; alex.williamson@redhat.com; > mgurtovoy@nvidia.com; Linuxarm ; liulongfang > ; Zengtao (B) ; > Jonathan Cameron ; Wangzhou (B) > > 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