From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: ruanjinjie <ruanjinjie@huawei.com>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
"yishaih@nvidia.com" <yishaih@nvidia.com>,
"kevin.tian@intel.com" <kevin.tian@intel.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH -next] vfio/mlx5: use module_pci_driver
Date: Wed, 9 Nov 2022 13:47:18 +0000 [thread overview]
Message-ID: <3f95546cfb8a43d8b33b9b5e32203289@huawei.com> (raw)
In-Reply-To: <20221109093703.3551036-1-ruanjinjie@huawei.com>
> -----Original Message-----
> From: ruanjinjie
> Sent: 09 November 2022 09:37
> To: jgg@ziepe.ca; yishaih@nvidia.com; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@huawei.com>; kevin.tian@intel.com;
> alex.williamson@redhat.com; cohuck@redhat.com; kvm@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Cc: ruanjinjie <ruanjinjie@huawei.com>
> Subject: [PATCH -next] vfio/mlx5: use module_pci_driver
>
> mlx5vf_pci_init and mlx5vf_pci_cleanup with module_init and module_exit
> calls can be replaced with the module_pci_driver call, as they are similar
> to what module_pci_driver does
There is already a patch out there,
https://lore.kernel.org/kvm/20220922123507.11222-1-shangxiaojing@huawei.com/
Thanks,
Shameer
> Signed-off-by: ruanjinjie <ruanjinjie@huawei.com>
> ---
> drivers/vfio/pci/mlx5/main.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
> index fd6ccb8454a2..457138b92f13 100644
> --- a/drivers/vfio/pci/mlx5/main.c
> +++ b/drivers/vfio/pci/mlx5/main.c
> @@ -676,18 +676,7 @@ static struct pci_driver mlx5vf_pci_driver = {
> .driver_managed_dma = true,
> };
>
> -static void __exit mlx5vf_pci_cleanup(void)
> -{
> - pci_unregister_driver(&mlx5vf_pci_driver);
> -}
> -
> -static int __init mlx5vf_pci_init(void)
> -{
> - return pci_register_driver(&mlx5vf_pci_driver);
> -}
> -
> -module_init(mlx5vf_pci_init);
> -module_exit(mlx5vf_pci_cleanup);
> +module_pci_driver(mlx5vf_pci_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Max Gurtovoy <mgurtovoy@nvidia.com>");
> --
> 2.25.1
next prev parent reply other threads:[~2022-11-09 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 9:37 ruanjinjie
2022-11-09 13:47 ` Shameerali Kolothum Thodi [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-09 8:57 ruanjinjie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f95546cfb8a43d8b33b9b5e32203289@huawei.com \
--to=shameerali.kolothum.thodi@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=yishaih@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®