Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861AbdGZMsc (ORCPT ); Wed, 26 Jul 2017 08:48:32 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:9860 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbdGZMsb (ORCPT ); Wed, 26 Jul 2017 08:48:31 -0400 Subject: Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface To: Francois Romieu CC: , , , , , , References: <0febc61414e7908a7c8c0c2fa7c2b06b0f7524f7.1500454998.git.aviad.krawczyk@huawei.com> <20170719222740.GA1755@electric-eye.fr.zoreil.com> <33fbbf34-cdbe-81a8-dc33-2cd6cb6cf4ee@huawei.com> <20170724230318.GA26260@electric-eye.fr.zoreil.com> <01800b7a-c11d-980f-0e5e-d4684eaa0f2a@huawei.com> <20170725200205.GA984@electric-eye.fr.zoreil.com> From: Aviad Krawczyk Message-ID: <3e9608c6-55f5-4115-b486-657a0f90fefb@huawei.com> Date: Wed, 26 Jul 2017 15:48:08 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170725200205.GA984@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.206.50.78] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.59788F99.0095,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: ec85ac064ff4713a5c9fdd3b4d3aa8bc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1355 Lines: 50 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 : > [...] >> 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); >