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: <cda5c16b444038de9bf2a5411d1a963e88a312ba.camel@mediatek.com>
Date: Fri, 14 Feb 2025 03:03:51 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC: "robh@...nel.org" <robh@...nel.org>, "jie.qiu@...iatek.com"
	<jie.qiu@...iatek.com>, "tzimmermann@...e.de" <tzimmermann@...e.de>,
	"simona@...ll.ch" <simona@...ll.ch>, "mripard@...nel.org"
	<mripard@...nel.org>, Jitao Shi (石记涛)
	<jitao.shi@...iatek.com>, "linux-mediatek@...ts.infradead.org"
	<linux-mediatek@...ts.infradead.org>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "maarten.lankhorst@...ux.intel.com"
	<maarten.lankhorst@...ux.intel.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "kernel@...labora.com" <kernel@...labora.com>,
	"dmitry.baryshkov@...aro.org" <dmitry.baryshkov@...aro.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
	Lewis Liao (廖柏鈞) <Lewis.Liao@...iatek.com>,
	"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>, "conor+dt@...nel.org"
	<conor+dt@...nel.org>, TommyYL Chen (陳彥良)
	<TommyYL.Chen@...iatek.com>, Ives Chenjh (陳俊弘)
	<Ives.Chenjh@...iatek.com>, "airlied@...il.com" <airlied@...il.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
	<matthias.bgg@...il.com>, Jason-JH Lin (林睿祥)
	<Jason-JH.Lin@...iatek.com>, "junzhi.zhao@...iatek.com"
	<junzhi.zhao@...iatek.com>, Alexandre Mergnat <amergnat@...libre.com>
Subject: Re: [PATCH v6 15/42] drm/mediatek: mtk_hdmi: Convert to
 module_platform_driver macro

On Tue, 2025-02-11 at 12:33 +0100, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
> 
> 
> Now that all of the mtk_hdmi subdrivers are a platform driver on
> their own it is possible to remove the custom init/exit functions
> in this driver and just use the module_platform_driver() macro.
> 
> While at it, also compress struct of_device_id entries and remove
> stray commas in mtk_hdmi_driver assignments.
> 
> Reviewed-by: Alexandre Mergnat <amergnat@...libre.com>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_hdmi.c | 37 ++++++-----------------------
>  1 file changed, 7 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index e648fb5714e7..a5471abf16dd 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -1780,15 +1780,10 @@ static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8167 = {
>  };
> 
>  static const struct of_device_id mtk_hdmi_of_ids[] = {
> -       { .compatible = "mediatek,mt2701-hdmi",
> -         .data = &mtk_hdmi_conf_mt2701,
> -       },
> -       { .compatible = "mediatek,mt8167-hdmi",
> -         .data = &mtk_hdmi_conf_mt8167,
> -       },
> -       { .compatible = "mediatek,mt8173-hdmi",
> -       },
> -       {}
> +       { .compatible = "mediatek,mt2701-hdmi", .data = &mtk_hdmi_conf_mt2701 },
> +       { .compatible = "mediatek,mt8167-hdmi", .data = &mtk_hdmi_conf_mt8167 },
> +       { .compatible = "mediatek,mt8173-hdmi" },
> +       { /* sentinel */ }

This is not related to the title, separate this to another patch.

>  };
>  MODULE_DEVICE_TABLE(of, mtk_hdmi_of_ids);
> 
> @@ -1798,28 +1793,10 @@ static struct platform_driver mtk_hdmi_driver = {
>         .driver = {
>                 .name = "mediatek-drm-hdmi",
>                 .of_match_table = mtk_hdmi_of_ids,
> -               .pm = &mtk_hdmi_pm_ops,
> -       },
> -};
> -
> -static struct platform_driver * const mtk_hdmi_drivers[] = {
> -       &mtk_hdmi_driver,
> +               .pm = &mtk_hdmi_pm_ops

This is not related to the title, separate this to another patch.

After above modification,

Reviewed-by: CK Hu <ck.hu@...iatek.com>

> +       }
>  };
> -
> -static int __init mtk_hdmitx_init(void)
> -{
> -       return platform_register_drivers(mtk_hdmi_drivers,
> -                                        ARRAY_SIZE(mtk_hdmi_drivers));
> -}
> -
> -static void __exit mtk_hdmitx_exit(void)
> -{
> -       platform_unregister_drivers(mtk_hdmi_drivers,
> -                                   ARRAY_SIZE(mtk_hdmi_drivers));
> -}
> -
> -module_init(mtk_hdmitx_init);
> -module_exit(mtk_hdmitx_exit);
> +module_platform_driver(mtk_hdmi_driver);
> 
>  MODULE_AUTHOR("Jie Qiu <jie.qiu@...iatek.com>");
>  MODULE_DESCRIPTION("MediaTek HDMI Driver");
> --
> 2.48.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ