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] [day] [month] [year] [list]
Date:   Tue, 6 Sep 2022 22:19:29 +0800
From:   "zhangjianhua (E)" <chris.zjh@...wei.com>
To:     Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
        <a.zummo@...ertech.it>, <alexandre.belloni@...tlin.com>
CC:     <linux-rtc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next v3] rtc: fsl-ftm-alarm: Use module_init and add
 module_exit

This is a good idea, thanks.

在 2022/9/5 21:17, Rasmus Villemoes 写道:
> On 05/09/2022 08.26, Zhang Jianhua wrote:
>> fsl-ftm-alarm driver can be built out of tree, so change the
>> macro device_initcall() to module_init() for standard usage.
> "out of tree" usually refers to modules that are not part of the
> mainline kernel.
>
> "can be built as a module" is more accurate and less confusing.
>
>> fsl-ftm-alarm registers a platform driver in module_init function,
>> however there is no module_exit function to unregister it, and it will
>> occur resource leak, so add ftm_alarm_exit() function for module_exit.
> It seems that you can avoid a lot of boilerplate using the
> module_platform_driver macro. The single line
>
> module_platform_driver(ftm_rtc_driver);
>
> should/could replace the ftm_alarm_init/ftm_alarm_exit functions and the
> explicit module_init()/module_exit() lines.
>
> Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ