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]
Message-ID: <CAGXv+5GfwY2+55UupTUNYVudg3-YDQtkkfhT=M53CJwdqG=ERg@mail.gmail.com>
Date:   Tue, 7 Feb 2023 14:33:10 +0800
From:   Chen-Yu Tsai <wenst@...omium.org>
To:     AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     mturquette@...libre.com, sboyd@...nel.org, matthias.bgg@...il.com,
        johnson.wang@...iatek.com, miles.chen@...iatek.com,
        chun-jie.chen@...iatek.com, daniel@...rotopia.org,
        fparent@...libre.com, msp@...libre.com, nfraprado@...labora.com,
        rex-bc.chen@...iatek.com, zhaojh329@...il.com,
        sam.shih@...iatek.com, edward-jw.yang@...iatek.com,
        yangyingliang@...wei.com, granquet@...libre.com,
        pablo.sun@...iatek.com, sean.wang@...iatek.com,
        chen.zhong@...iatek.com, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH v1 09/45] clk: mediatek: mt2712: Change to use
 module_platform_driver macro

On Mon, Feb 6, 2023 at 11:29 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com> wrote:
>
> Now that all of the clocks in clk-mt2712.c are using the common
> mtk_clk_simple_{probe,remove}() callbacks we can safely migrate
> to module_platform_driver.

Instead of splitting the conversion into a module among many patches,
I'd do it in one go. With one patch we get a working module instead
of a half-baked one half way through the series.

The subject could say "Convert X driver from builtin to module". And
instead of "migrate to module_platform_driver", the body could say
"convert to module by switching to module_platform_driver, and adding
missing MODULE_* statements". I believe this constitutes one logical
change. Maybe the accompanying Kconfig change should be included as
well?

> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
>  drivers/clk/mediatek/clk-mt2712.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
> index c5fd76d1b9df..65c1cbcbd54e 100644
> --- a/drivers/clk/mediatek/clk-mt2712.c
> +++ b/drivers/clk/mediatek/clk-mt2712.c
> @@ -1028,7 +1028,7 @@ static const struct of_device_id of_match_clk_mt2712_simple[] = {
>         { /* sentinel */ }
>  };
>
> -static struct platform_driver clk_mt2712_simple_drv = {
> +static struct platform_driver clk_mt2712_drv = {

Why the name change? If you do change the name, could you also change
the of match table's name as well to be consistent, and also mention
the change in the commit log?

I'd just leave it alone though.


ChenYu

>         .probe = mtk_clk_simple_probe,
>         .remove = mtk_clk_simple_remove,
>         .driver = {
> @@ -1036,10 +1036,4 @@ static struct platform_driver clk_mt2712_simple_drv = {
>                 .of_match_table = of_match_clk_mt2712_simple,
>         },
>  };
> -
> -static int __init clk_mt2712_init(void)
> -{
> -       return platform_driver_register(&clk_mt2712_simple_drv);
> -}
> -
> -arch_initcall(clk_mt2712_init);
> +module_platform_driver(clk_mt2712_drv);
> --
> 2.39.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ