lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3f95546cfb8a43d8b33b9b5e32203289@huawei.com>
Date:   Wed, 9 Nov 2022 13:47:18 +0000
From:   Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
To:     ruanjinjie <ruanjinjie@...wei.com>, "jgg@...pe.ca" <jgg@...pe.ca>,
        "yishaih@...dia.com" <yishaih@...dia.com>,
        "kevin.tian@...el.com" <kevin.tian@...el.com>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "cohuck@...hat.com" <cohuck@...hat.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH -next] vfio/mlx5: use module_pci_driver



> -----Original Message-----
> From: ruanjinjie
> Sent: 09 November 2022 09:37
> To: jgg@...pe.ca; yishaih@...dia.com; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@...wei.com>; kevin.tian@...el.com;
> alex.williamson@...hat.com; cohuck@...hat.com; kvm@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Cc: ruanjinjie <ruanjinjie@...wei.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@...wei.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@...dia.com>");
> --
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ