Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697062

Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface

From Aviad Krawczyk <aviad.krawczyk@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface
Date 2017-07-26 14:50 +0200
Message-ID <u7tVg-mT-19@gated-at.bofh.it> (permalink)
References (2 earlier) <u55Nn-6BP-3@gated-at.bofh.it> <u6msN-6n3-1@gated-at.bofh.it> <u6UEa-3ig-23@gated-at.bofh.it> <u79tw-45h-27@gated-at.bofh.it> <u7ejx-7oV-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


OK, we will use module_pci_driver although it is not very common in the same segment.

On 7/25/2017 11:02 PM, Francois Romieu wrote:
> Aviad Krawczyk <aviad.krawczyk@huawei.com> :
> [...]
>> module_pci_driver - is not used in other drivers in the same segments, it
>> is necessary ?
> 
> /me checks... Ok, there seems to be some overenthusiastic copy'paste.
> 
> See drivers/net/ethernet/intel/ixgb/ixgb_main.c:
> [...]
> /**
>  * ixgb_init_module - Driver Registration Routine
>  *
>  * ixgb_init_module is the first routine called when the driver is
>  * loaded. All it does is register with the PCI subsystem.
>  **/
> 
> static int __init
> ixgb_init_module(void)
> {
> 	pr_info("%s - version %s\n", ixgb_driver_string, ixgb_driver_version);
> 	pr_info("%s\n", ixgb_copyright);
> 
> 	return pci_register_driver(&ixgb_driver);
> }
> 
> module_init(ixgb_init_module);
> 
> /**
>  * ixgb_exit_module - Driver Exit Cleanup Routine
>  *
>  * ixgb_exit_module is called just before the driver is removed
>  * from memory.
>  **/
> 
> static void __exit
> ixgb_exit_module(void)
> {
> 	pci_unregister_driver(&ixgb_driver);
> }
> 
> module_exit(ixgb_exit_module);
> 
> Driver version ought to be fed through ethtool, if ever. Copyright message
> mildly contributes to a better world. So the whole stuff above could be:
> 
> module_pci_driver(ixgb_driver);
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-07-19 11:30 +0200
  Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Francois Romieu <romieu@fr.zoreil.com> - 2017-07-20 00:40 +0200
    Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-07-23 12:40 +0200
      Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Francois Romieu <romieu@fr.zoreil.com> - 2017-07-25 01:10 +0200
        Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-07-25 17:00 +0200
          Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Francois Romieu <romieu@fr.zoreil.com> - 2017-07-25 22:10 +0200
            Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-07-26 14:50 +0200

csiph-web