* [PATCH net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro
@ 2023-08-10 1:46 Yang Yingliang
2023-08-10 8:33 ` Pavan Chebbi
2023-08-11 2:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2023-08-10 1:46 UTC (permalink / raw)
To: netdev; +Cc: davem, edumazet, kuba, pabeni, yangyingliang
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@huawei.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro
2023-08-10 1:46 [PATCH net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro Yang Yingliang
@ 2023-08-10 8:33 ` Pavan Chebbi
2023-08-11 2:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Pavan Chebbi @ 2023-08-10 8:33 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, davem, edumazet, kuba, pabeni
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
On Thu, Aug 10, 2023 at 7:19 AM Yang Yingliang <yangyingliang@huawei.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@huawei.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@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro
2023-08-10 1:46 [PATCH net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro Yang Yingliang
2023-08-10 8:33 ` Pavan Chebbi
@ 2023-08-11 2:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-11 2:40 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, davem, edumazet, kuba, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 10 Aug 2023 09:46:33 +0800 you 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@huawei.com>
> ---
> drivers/net/ethernet/8390/ne2k-pci.c | 16 +---------------
> 1 file changed, 1 insertion(+), 15 deletions(-)
Here is the summary with links:
- [net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro
https://git.kernel.org/netdev/net-next/c/5604ac35cb6e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-11 2:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 1:46 [PATCH net-next] net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro Yang Yingliang
2023-08-10 8:33 ` Pavan Chebbi
2023-08-11 2:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).