[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv3TM7Dip=3peaiRRi_MRwr9iFhFC8S0pw7yZfc7nU8TOA@mail.gmail.com>
Date: Thu, 10 Aug 2023 14:03:11 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Yang Yingliang <yangyingliang@...wei.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com
Subject: Re: [PATCH net-next] net: ethernet: 8390: ne2k-pci: use
module_pci_driver() macro
On Thu, Aug 10, 2023 at 7:19 AM Yang Yingliang <yangyingliang@...wei.com> wrote:
>
> The driver init/exit() function don't do anything special, it
> can use the module_pci_driver() macro to eliminate boilerplate
> code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> drivers/net/ethernet/8390/ne2k-pci.c | 16 +---------------
> 1 file changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/drivers/net/ethernet/8390/ne2k-pci.c b/drivers/net/ethernet/8390/ne2k-pci.c
> index 2c6bd36d2f31..65f56a98c0a0 100644
> --- a/drivers/net/ethernet/8390/ne2k-pci.c
> +++ b/drivers/net/ethernet/8390/ne2k-pci.c
> @@ -731,18 +731,4 @@ static struct pci_driver ne2k_driver = {
> .id_table = ne2k_pci_tbl,
> .driver.pm = &ne2k_pci_pm_ops,
> };
> -
> -
> -static int __init ne2k_pci_init(void)
> -{
> - return pci_register_driver(&ne2k_driver);
> -}
> -
> -
> -static void __exit ne2k_pci_cleanup(void)
> -{
> - pci_unregister_driver(&ne2k_driver);
> -}
> -
> -module_init(ne2k_pci_init);
> -module_exit(ne2k_pci_cleanup);
> +module_pci_driver(ne2k_driver);
> --
> 2.25.1
>
>
LGTM.
Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists