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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Nov 2020 11:42:59 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Peter Chen <peter.chen@....com>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "balbi@...nel.org" <balbi@...nel.org>,
        "colin.king@...onical.com" <colin.king@...onical.com>,
        "rogerq@...com" <rogerq@...com>, Rahul Kumar <kurahul@...ence.com>,
        "nsekhar@...com" <nsekhar@...com>
Subject: RE: [PATCH v2 03/10] usb: cdns3: Moves reusable code to separate
 module

>
>On Tue, Nov 10, 2020 at 11:21:22AM +0000, Peter Chen wrote:
>> On 20-11-10 09:20:54, Pawel Laszczak wrote:
>> > Hi,
>> >
>> > >>
>> > >>  int cdns3_hw_role_switch(struct cdns3 *cdns);
>> > >> -int cdns3_init(struct cdns3 *cdns);
>> > >> -int cdns3_remove(struct cdns3 *cdns);
>> > >> +extern int cdns3_init(struct cdns3 *cdns);
>> > >> +extern int cdns3_remove(struct cdns3 *cdns);
>> > >
>> > >Why add "extern" here and below?
>> > >
>> >
>> > These functions are the API between cdnsp and cdns3 modules.
>> > It's looks like a common approach in kernel.
>> > Many or even most of API function in kernel has "extern".
>> >
>>
>> Even you have not written "extern" keyword, the "extern" is
>> added implicitly by compiler. Usually, we use "extern" for variable
>> or the function is defined at assembly. You could see some
>> "extern" keyword use cases at include/linux/device.h.
>
>We are moving away from using this keyword for functions now, if at all
>possible please.  Only use it for variables, I think checkpatch now
>catches it as well.
>

Ok, I will remove all extern from driver. 
Removing it also will remove checkpatch.pl warmings.

Thanks
Pawel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ